Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13428b50 authored by Bryce Lee's avatar Bryce Lee Committed by Android Git Automerger
Browse files

am f626c679: am a7f07fc3: Merge "Add configuration to allow animations during...

am f626c679: am a7f07fc3: Merge "Add configuration to allow animations during low power mode." into lmp-mr1-modular-dev

* commit 'f626c679':
  Add configuration to allow animations during low power mode.
parents c2180dd5 f626c679
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2138,4 +2138,7 @@

    <!-- This config is used to force VoiceInteractionService to start on certain low ram devices. -->
    <bool name="config_forceEnableVoiceInteractionService">false</bool>

    <!-- This config is ued to determine whether animations are allowed in low power mode. -->
    <bool name="config_allowAnimationsInLowPowerMode">false</bool>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -281,6 +281,7 @@
  <java-symbol type="bool" name="config_bluetooth_default_profiles" />
  <java-symbol type="bool" name="config_enableWifiDisplay" />
  <java-symbol type="bool" name="config_forceEnableVoiceInteractionService" />
  <java-symbol type="bool" name="config_allowAnimationsInLowPowerMode" />
  <java-symbol type="bool" name="config_useDevInputEventForAudioJack" />
  <java-symbol type="bool" name="config_safe_media_volume_enabled" />
  <java-symbol type="bool" name="config_camera_sound_forced" />
+4 −1
Original line number Diff line number Diff line
@@ -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);
                    }