Revert "Hold a wakelock during dumpstate."

This reverts commit d7803db0e98809e5a17e78885d452479349f339f.

Change-Id: I20066ca30a1b53507099dc62f27c3275781c61ee
diff --git a/cmds/dumpstate/Android.mk b/cmds/dumpstate/Android.mk
index 7a9f9ad..791a7c4 100644
--- a/cmds/dumpstate/Android.mk
+++ b/cmds/dumpstate/Android.mk
@@ -14,7 +14,7 @@
 
 LOCAL_MODULE := dumpstate
 
-LOCAL_SHARED_LIBRARIES := libcutils liblog libselinux libbase libhardware_legacy
+LOCAL_SHARED_LIBRARIES := libcutils liblog libselinux libbase
 # ZipArchive support, the order matters here to get all symbols.
 LOCAL_STATIC_LIBRARIES := libziparchive libz libmincrypt
 LOCAL_HAL_STATIC_LIBRARIES := libdumpstate
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index ca00539..aa8c9ae 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -37,7 +37,6 @@
 #include <android-base/stringprintf.h>
 #include <android-base/file.h>
 #include <cutils/properties.h>
-#include <hardware_legacy/power.h>
 
 #include "private/android_filesystem_config.h"
 
@@ -83,7 +82,6 @@
 #define TOMBSTONE_MAX_LEN (sizeof(TOMBSTONE_FILE_PREFIX) + 4)
 #define NUM_TOMBSTONES  10
 #define WLUTIL "/vendor/xbin/wlutil"
-#define WAKE_LOCK_NAME "dumpstate_wakelock"
 
 typedef struct {
   char name[TOMBSTONE_MAX_LEN];
@@ -1200,10 +1198,6 @@
     return std::string(hash_buffer);
 }
 
-static void wake_lock_releaser() {
-    release_wake_lock(WAKE_LOCK_NAME);
-}
-
 int main(int argc, char *argv[]) {
     struct sigaction sigact;
     int do_add_date = 0;
@@ -1222,9 +1216,6 @@
 
     MYLOGI("begin\n");
 
-    acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_NAME);
-    atexit(wake_lock_releaser);
-
     /* gets the sequential id */
     char last_id[PROPERTY_VALUE_MAX];
     property_get("dumpstate.last_id", last_id, "0");