diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-04-13 18:08:17 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-04-13 18:08:17 -0700 |
commit | 6d1127228564b4506c78ad13cd681ea96d336525 (patch) | |
tree | 015f47da7b6b9fe9015e95d0014a6cba0eee0d1d /services | |
parent | b7d9e8e17baad481ec834bc545e980ba21d7f67b (diff) | |
parent | cd616247db69bdae8ab781be1f1d646ac7abf755 (diff) | |
download | frameworks_base-6d1127228564b4506c78ad13cd681ea96d336525.zip frameworks_base-6d1127228564b4506c78ad13cd681ea96d336525.tar.gz frameworks_base-6d1127228564b4506c78ad13cd681ea96d336525.tar.bz2 |
am cd616247: am ce73c1e5: Framework change for #2583442: Navigation dies when night mode changes
Merge commit 'cd616247db69bdae8ab781be1f1d646ac7abf755' into kraken
* commit 'cd616247db69bdae8ab781be1f1d646ac7abf755':
Framework change for #2583442: Navigation dies when night mode changes
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 972935e..7547570 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -148,6 +148,7 @@ public class WindowManagerService extends IWindowManager.Stub static final boolean DEBUG_STARTING_WINDOW = false; static final boolean DEBUG_REORDER = false; static final boolean DEBUG_WALLPAPER = false; + static final boolean DEBUG_FREEZE = false; static final boolean SHOW_TRANSACTIONS = false; static final boolean HIDE_STACK_CRAWLS = true; static final boolean MEASURE_LATENCY = false; @@ -10696,23 +10697,28 @@ public class WindowManagerService extends IWindowManager.Stub } else if (animating) { requestAnimationLocked(currentTime+(1000/60)-SystemClock.uptimeMillis()); } - mQueue.setHoldScreenLocked(holdScreen != null); - if (screenBrightness < 0 || screenBrightness > 1.0f) { - mPowerManager.setScreenBrightnessOverride(-1); - } else { - mPowerManager.setScreenBrightnessOverride((int) - (screenBrightness * Power.BRIGHTNESS_ON)); - } - if (buttonBrightness < 0 || buttonBrightness > 1.0f) { - mPowerManager.setButtonBrightnessOverride(-1); - } else { - mPowerManager.setButtonBrightnessOverride((int) - (buttonBrightness * Power.BRIGHTNESS_ON)); - } - if (holdScreen != mHoldingScreenOn) { - mHoldingScreenOn = holdScreen; - Message m = mH.obtainMessage(H.HOLD_SCREEN_CHANGED, holdScreen); - mH.sendMessage(m); + + if (DEBUG_FREEZE) Slog.v(TAG, "Layout: mDisplayFrozen=" + mDisplayFrozen + + " holdScreen=" + holdScreen); + if (!mDisplayFrozen) { + mQueue.setHoldScreenLocked(holdScreen != null); + if (screenBrightness < 0 || screenBrightness > 1.0f) { + mPowerManager.setScreenBrightnessOverride(-1); + } else { + mPowerManager.setScreenBrightnessOverride((int) + (screenBrightness * Power.BRIGHTNESS_ON)); + } + if (buttonBrightness < 0 || buttonBrightness > 1.0f) { + mPowerManager.setButtonBrightnessOverride(-1); + } else { + mPowerManager.setButtonBrightnessOverride((int) + (buttonBrightness * Power.BRIGHTNESS_ON)); + } + if (holdScreen != mHoldingScreenOn) { + mHoldingScreenOn = holdScreen; + Message m = mH.obtainMessage(H.HOLD_SCREEN_CHANGED, holdScreen); + mH.sendMessage(m); + } } if (mTurnOnScreen) { @@ -10989,6 +10995,8 @@ public class WindowManagerService extends IWindowManager.Stub mFreezeGcPending = now; } + if (DEBUG_FREEZE) Slog.v(TAG, "*** FREEZING DISPLAY", new RuntimeException()); + mDisplayFrozen = true; if (mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) { mNextAppTransition = WindowManagerPolicy.TRANSIT_UNSET; @@ -11012,6 +11020,8 @@ public class WindowManagerService extends IWindowManager.Stub return; } + if (DEBUG_FREEZE) Slog.v(TAG, "*** UNFREEZING DISPLAY", new RuntimeException()); + mDisplayFrozen = false; mH.removeMessages(H.APP_FREEZE_TIMEOUT); if (PROFILE_ORIENTATION) { |