Fix black frame flicker in UNOCCLUDE transition. am: f5a613e528
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16117045 Change-Id: I6ac227678fbb9fbb2767b3166e297a2ef3b430ae
This commit is contained in:
@@ -4630,6 +4630,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
return mKeyguardDelegate.isInputRestricted();
|
return mKeyguardDelegate.isInputRestricted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
|
@Override
|
||||||
|
public boolean isKeyguardUnoccluding() {
|
||||||
|
return keyguardOn() && !mWindowManagerFuncs.isAppTransitionStateIdle();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dismissKeyguardLw(IKeyguardDismissCallback callback, CharSequence message) {
|
public void dismissKeyguardLw(IKeyguardDismissCallback callback, CharSequence message) {
|
||||||
if (mKeyguardDelegate != null && mKeyguardDelegate.isShowing()) {
|
if (mKeyguardDelegate != null && mKeyguardDelegate.isShowing()) {
|
||||||
|
|||||||
@@ -367,6 +367,12 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
|
|||||||
* as the top display.
|
* as the top display.
|
||||||
*/
|
*/
|
||||||
void moveDisplayToTop(int displayId);
|
void moveDisplayToTop(int displayId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether the app transition state is idle.
|
||||||
|
* @return {@code true} if app transition state is idle on the default display.
|
||||||
|
*/
|
||||||
|
boolean isAppTransitionStateIdle();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -973,6 +979,14 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
|
|||||||
*/
|
*/
|
||||||
public boolean isKeyguardOccluded();
|
public boolean isKeyguardOccluded();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether the keyguard is unoccluding.
|
||||||
|
* @return {@code true} if the keyguard is unoccluding.
|
||||||
|
*/
|
||||||
|
default boolean isKeyguardUnoccluding() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true if in keyguard is on.
|
* @return true if in keyguard is on.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -365,6 +365,10 @@ public class AppTransition implements Dump {
|
|||||||
setAppTransitionState(APP_STATE_IDLE);
|
setAppTransitionState(APP_STATE_IDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isIdle() {
|
||||||
|
return mAppTransitionState == APP_STATE_IDLE;
|
||||||
|
}
|
||||||
|
|
||||||
boolean isTimeout() {
|
boolean isTimeout() {
|
||||||
return mAppTransitionState == APP_STATE_TIMEOUT;
|
return mAppTransitionState == APP_STATE_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,7 +159,8 @@ class WallpaperController {
|
|||||||
boolean needsShowWhenLockedWallpaper = false;
|
boolean needsShowWhenLockedWallpaper = false;
|
||||||
if ((w.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0
|
if ((w.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0
|
||||||
&& mService.mPolicy.isKeyguardLocked()
|
&& mService.mPolicy.isKeyguardLocked()
|
||||||
&& mService.mPolicy.isKeyguardOccluded()) {
|
&& (mService.mPolicy.isKeyguardOccluded()
|
||||||
|
|| mService.mPolicy.isKeyguardUnoccluding())) {
|
||||||
// The lowest show when locked window decides whether we need to put the wallpaper
|
// The lowest show when locked window decides whether we need to put the wallpaper
|
||||||
// behind.
|
// behind.
|
||||||
needsShowWhenLockedWallpaper = !isFullscreen(w.mAttrs)
|
needsShowWhenLockedWallpaper = !isFullscreen(w.mAttrs)
|
||||||
|
|||||||
@@ -3071,6 +3071,11 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
syncInputTransactions(true /* waitForAnimations */);
|
syncInputTransactions(true /* waitForAnimations */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAppTransitionStateIdle() {
|
||||||
|
return getDefaultDisplayContentLocked().mAppTransition.isIdle();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies activity manager that some Keyguard flags have changed and that it needs to
|
* Notifies activity manager that some Keyguard flags have changed and that it needs to
|
||||||
* reevaluate the visibilities of the activities.
|
* reevaluate the visibilities of the activities.
|
||||||
|
|||||||
Reference in New Issue
Block a user