Merge "Increase keyguardDrawnTimeout to reduce fold->AOD flickers" into tm-qpr-dev am: 191007fad0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21911630

Change-Id: I3571b8341dd4e5ceb038f054cd7a207f0bf0608d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Nicolò Mazzucato
2023-03-13 20:05:52 +00:00
committed by Automerger Merge Worker
3 changed files with 10 additions and 1 deletions

View File

@@ -711,6 +711,9 @@
mode. --> mode. -->
<integer name="config_unfoldTransitionHalfFoldedTimeout">1000</integer> <integer name="config_unfoldTransitionHalfFoldedTimeout">1000</integer>
<!-- Timeout for receiving the keyguard drawn event from System UI. -->
<integer name="config_keyguardDrawnTimeout">1000</integer>
<!-- Indicates that the device supports having more than one internal display on at the same <!-- Indicates that the device supports having more than one internal display on at the same
time. Only applicable to devices with more than one internal display. If this option is time. Only applicable to devices with more than one internal display. If this option is
set to false, DisplayManager will make additional effort to ensure no more than 1 internal set to false, DisplayManager will make additional effort to ensure no more than 1 internal

View File

@@ -1980,6 +1980,7 @@
<java-symbol type="bool" name="config_allowTheaterModeWakeFromDock" /> <java-symbol type="bool" name="config_allowTheaterModeWakeFromDock" />
<java-symbol type="bool" name="config_allowTheaterModeWakeFromWindowLayout" /> <java-symbol type="bool" name="config_allowTheaterModeWakeFromWindowLayout" />
<java-symbol type="bool" name="config_keepDreamingWhenUndocking" /> <java-symbol type="bool" name="config_keepDreamingWhenUndocking" />
<java-symbol type="integer" name="config_keyguardDrawnTimeout" />
<java-symbol type="bool" name="config_goToSleepOnButtonPressTheaterMode" /> <java-symbol type="bool" name="config_goToSleepOnButtonPressTheaterMode" />
<java-symbol type="bool" name="config_supportLongPressPowerWhenNonInteractive" /> <java-symbol type="bool" name="config_supportLongPressPowerWhenNonInteractive" />
<java-symbol type="bool" name="config_wimaxEnabled" /> <java-symbol type="bool" name="config_wimaxEnabled" />

View File

@@ -637,6 +637,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
private boolean mLockNowPending = false; private boolean mLockNowPending = false;
// Timeout for showing the keyguard after the screen is on, in case no "ready" is received.
private int mKeyguardDrawnTimeout = 1000;
private static final int MSG_DISPATCH_MEDIA_KEY_WITH_WAKE_LOCK = 3; private static final int MSG_DISPATCH_MEDIA_KEY_WITH_WAKE_LOCK = 3;
private static final int MSG_DISPATCH_MEDIA_KEY_REPEAT_WITH_WAKE_LOCK = 4; private static final int MSG_DISPATCH_MEDIA_KEY_REPEAT_WITH_WAKE_LOCK = 4;
private static final int MSG_KEYGUARD_DRAWN_COMPLETE = 5; private static final int MSG_KEYGUARD_DRAWN_COMPLETE = 5;
@@ -2176,6 +2179,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
} }
}); });
mKeyguardDrawnTimeout = mContext.getResources().getInteger(
com.android.internal.R.integer.config_keyguardDrawnTimeout);
mKeyguardDelegate = new KeyguardServiceDelegate(mContext, mKeyguardDelegate = new KeyguardServiceDelegate(mContext,
new StateCallback() { new StateCallback() {
@Override @Override
@@ -4813,7 +4818,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
final boolean bootCompleted = final boolean bootCompleted =
LocalServices.getService(SystemServiceManager.class).isBootCompleted(); LocalServices.getService(SystemServiceManager.class).isBootCompleted();
// Set longer timeout if it has not booted yet to prevent showing empty window. // Set longer timeout if it has not booted yet to prevent showing empty window.
return bootCompleted ? 1000 : 5000; return bootCompleted ? mKeyguardDrawnTimeout : 5000;
} }
// Called on the DisplayManager's DisplayPowerController thread. // Called on the DisplayManager's DisplayPowerController thread.