diff options
Diffstat (limited to 'services/java/com/android/server/WindowManagerService.java')
| -rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 44c9f0f..05d340e 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -7193,14 +7193,6 @@ public class WindowManagerService extends IWindowManager.Stub return mAppToken != null ? mAppToken.firstWindowDrawn : false; } - public boolean hasAppStartingIcon() { - return mAppToken != null ? (mAppToken.startingData != null) : false; - } - - public WindowManagerPolicy.WindowState getAppStartingWindow() { - return mAppToken != null ? mAppToken.startingWindow : null; - } - public void setAnimation(Animation anim) { if (localLOGV) Log.v( TAG, "Setting animation in " + this + ": " + anim); @@ -9326,6 +9318,7 @@ public class WindowManagerService extends IWindowManager.Stub boolean orientationChangeComplete = true; Session holdScreen = null; float screenBrightness = -1; + float buttonBrightness = -1; boolean focusDisplayed = false; boolean animating = false; @@ -9419,15 +9412,6 @@ public class WindowManagerService extends IWindowManager.Stub & WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER) != 0) { wallpaperMayChange = true; } - if (changed && !forceHiding - && (mCurrentFocus == null) - && (mFocusedApp != null)) { - // It's possible that the last focus recalculation left no - // current focused window even though the app has come to the - // foreground already. In this case, we make sure to recalculate - // focus when we show a window. - focusMayChange = true; - } } mPolicy.animatingWindowLw(w, attrs); @@ -10094,6 +10078,10 @@ public class WindowManagerService extends IWindowManager.Stub && screenBrightness < 0) { screenBrightness = w.mAttrs.screenBrightness; } + if (!syswin && w.mAttrs.buttonBrightness >= 0 + && buttonBrightness < 0) { + buttonBrightness = w.mAttrs.buttonBrightness; + } if (attrs.type == WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG || attrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD || attrs.type == WindowManager.LayoutParams.TYPE_SYSTEM_ERROR) { @@ -10340,6 +10328,12 @@ public class WindowManagerService extends IWindowManager.Stub 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); |
