summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/power/PowerManagerService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index ed98d1cbc5b2..3b5db29de9e0 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -87,6 +87,7 @@ import com.android.server.LockGuard;
import com.android.server.RescueParty;
import com.android.server.ServiceThread;
import com.android.server.SystemService;
+import com.android.server.UiThread;
import com.android.server.Watchdog;
import com.android.server.am.BatteryStatsService;
import com.android.server.lights.Light;
@@ -2729,9 +2730,9 @@ public final class PowerManagerService extends SystemService
};
// ShutdownThread must run on a looper capable of displaying the UI.
- Message msg = Message.obtain(mHandler, runnable);
+ Message msg = Message.obtain(UiThread.getHandler(), runnable);
msg.setAsynchronous(true);
- mHandler.sendMessage(msg);
+ UiThread.getHandler().sendMessage(msg);
// PowerManager.reboot() is documented not to return so just wait for the inevitable.
if (wait) {