am a7f07fc3: Merge "Add configuration to allow animations during low power mode." into lmp-mr1-modular-dev
* commit 'a7f07fc35ba647465503fe0cba3d4521b68d89c1': Add configuration to allow animations during low power mode.
This commit is contained in:
@@ -2102,4 +2102,7 @@
|
|||||||
|
|
||||||
<!-- This config is used to force VoiceInteractionService to start on certain low ram devices. -->
|
<!-- This config is used to force VoiceInteractionService to start on certain low ram devices. -->
|
||||||
<bool name="config_forceEnableVoiceInteractionService">false</bool>
|
<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>
|
</resources>
|
||||||
|
|||||||
@@ -282,6 +282,7 @@
|
|||||||
<java-symbol type="bool" name="config_bluetooth_default_profiles" />
|
<java-symbol type="bool" name="config_bluetooth_default_profiles" />
|
||||||
<java-symbol type="bool" name="config_enableWifiDisplay" />
|
<java-symbol type="bool" name="config_enableWifiDisplay" />
|
||||||
<java-symbol type="bool" name="config_forceEnableVoiceInteractionService" />
|
<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_useDevInputEventForAudioJack" />
|
||||||
<java-symbol type="bool" name="config_safe_media_volume_enabled" />
|
<java-symbol type="bool" name="config_safe_media_volume_enabled" />
|
||||||
<java-symbol type="bool" name="config_camera_sound_forced" />
|
<java-symbol type="bool" name="config_camera_sound_forced" />
|
||||||
|
|||||||
@@ -340,6 +340,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
|
|
||||||
final boolean mHasPermanentDpad;
|
final boolean mHasPermanentDpad;
|
||||||
final long mDrawLockTimeoutMillis;
|
final long mDrawLockTimeoutMillis;
|
||||||
|
final boolean mAllowAnimationsInLowPowerMode;
|
||||||
|
|
||||||
final boolean mAllowBootMessages;
|
final boolean mAllowBootMessages;
|
||||||
|
|
||||||
@@ -844,6 +845,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
com.android.internal.R.bool.config_defaultInTouchMode);
|
com.android.internal.R.bool.config_defaultInTouchMode);
|
||||||
mDrawLockTimeoutMillis = context.getResources().getInteger(
|
mDrawLockTimeoutMillis = context.getResources().getInteger(
|
||||||
com.android.internal.R.integer.config_drawLockTimeoutMillis);
|
com.android.internal.R.integer.config_drawLockTimeoutMillis);
|
||||||
|
mAllowAnimationsInLowPowerMode = context.getResources().getBoolean(
|
||||||
|
com.android.internal.R.bool.config_allowAnimationsInLowPowerMode);
|
||||||
mInputManager = inputManager; // Must be before createDisplayContentLocked.
|
mInputManager = inputManager; // Must be before createDisplayContentLocked.
|
||||||
mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);
|
mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);
|
||||||
mDisplaySettings = new DisplaySettings();
|
mDisplaySettings = new DisplaySettings();
|
||||||
@@ -869,7 +872,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
@Override
|
@Override
|
||||||
public void onLowPowerModeChanged(boolean enabled) {
|
public void onLowPowerModeChanged(boolean enabled) {
|
||||||
synchronized (mWindowMap) {
|
synchronized (mWindowMap) {
|
||||||
if (mAnimationsDisabled != enabled) {
|
if (mAnimationsDisabled != enabled && !mAllowAnimationsInLowPowerMode) {
|
||||||
mAnimationsDisabled = enabled;
|
mAnimationsDisabled = enabled;
|
||||||
dispatchNewAnimatorScaleLocked(null);
|
dispatchNewAnimatorScaleLocked(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user