diff options
Diffstat (limited to 'services/core/java/com/android/server/wm')
-rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index d4b3dab..6bf68e8 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -332,6 +332,7 @@ public class WindowManagerService extends IWindowManager.Stub final boolean mHasPermanentDpad; final long mDrawLockTimeoutMillis; + final boolean mAllowAnimationsInLowPowerMode; final boolean mAllowBootMessages; @@ -899,6 +900,8 @@ public class WindowManagerService extends IWindowManager.Stub com.android.internal.R.bool.config_defaultInTouchMode); mDrawLockTimeoutMillis = context.getResources().getInteger( com.android.internal.R.integer.config_drawLockTimeoutMillis); + mAllowAnimationsInLowPowerMode = context.getResources().getBoolean( + com.android.internal.R.bool.config_allowAnimationsInLowPowerMode); mInputManager = inputManager; // Must be before createDisplayContentLocked. mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class); mDisplaySettings = new DisplaySettings(); @@ -924,7 +927,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void onLowPowerModeChanged(boolean enabled) { synchronized (mWindowMap) { - if (mAnimationsDisabled != enabled) { + if (mAnimationsDisabled != enabled && !mAllowAnimationsInLowPowerMode) { mAnimationsDisabled = enabled; dispatchNewAnimatorScaleLocked(null); } |