diff options
Diffstat (limited to 'services/java/com/android/server/PowerManagerService.java')
-rw-r--r-- | services/java/com/android/server/PowerManagerService.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java index d1f8216..44eb228 100644 --- a/services/java/com/android/server/PowerManagerService.java +++ b/services/java/com/android/server/PowerManagerService.java @@ -73,6 +73,8 @@ import static android.provider.Settings.System.WINDOW_ANIMATION_SCALE; import static android.provider.Settings.System.TRANSITION_ANIMATION_SCALE; import static android.provider.Settings.System.TORCH_STATE; +import com.android.internal.app.ThemeUtils; + import java.io.FileDescriptor; import java.io.IOException; import java.io.PrintWriter; @@ -201,6 +203,7 @@ class PowerManagerService extends IPowerManager.Stub private Intent mScreenOnIntent; private LightsService mLightsService; private Context mContext; + private Context mUiContext; private LightsService.Light mLcdLight; private LightsService.Light mButtonLight; private LightsService.Light mKeyboardLight; @@ -2698,7 +2701,7 @@ class PowerManagerService extends IPowerManager.Stub Runnable runnable = new Runnable() { public void run() { synchronized (this) { - ShutdownThread.reboot(mContext, finalReason, false); + ShutdownThread.reboot(getUiContext(), finalReason, false); } } @@ -2735,6 +2738,13 @@ class PowerManagerService extends IPowerManager.Stub } } + private Context getUiContext() { + if (mUiContext == null) { + mUiContext = ThemeUtils.createUiContext(mContext); + } + return mUiContext != null ? mUiContext : mContext; + } + private void goToSleepLocked(long time, int reason) { if (mLastEventTime <= time) { |