Merge "Change the thread for handling shutdown of PowerManagerService." into oc-dev

am: 614636e926

Change-Id: If95c56ec0f9d1e03c8d57ae8fda81ba2696b7405
This commit is contained in:
Michael Wright
2017-05-31 12:22:39 +00:00
committed by android-build-merger

View File

@@ -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) {