Merge "Skip screen animation if it is off" into udc-dev am: 61f4503d08
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23358306 Change-Id: Ib50853f61ec4e0298da4c896a8c3c49ac29df0f9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -554,6 +554,13 @@ public interface WindowManager extends ViewManager {
|
|||||||
*/
|
*/
|
||||||
int TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT = (1 << 9); // 0x200
|
int TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT = (1 << 9); // 0x200
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transition flag: The transition is prepared when nothing is visible on screen, e.g. screen
|
||||||
|
* is off. The animation handlers can decide whether to skip animations.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
int TRANSIT_FLAG_INVISIBLE = (1 << 10); // 0x400
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@@ -567,7 +574,8 @@ public interface WindowManager extends ViewManager {
|
|||||||
TRANSIT_FLAG_KEYGUARD_LOCKED,
|
TRANSIT_FLAG_KEYGUARD_LOCKED,
|
||||||
TRANSIT_FLAG_IS_RECENTS,
|
TRANSIT_FLAG_IS_RECENTS,
|
||||||
TRANSIT_FLAG_KEYGUARD_GOING_AWAY,
|
TRANSIT_FLAG_KEYGUARD_GOING_AWAY,
|
||||||
TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT
|
TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT,
|
||||||
|
TRANSIT_FLAG_INVISIBLE,
|
||||||
})
|
})
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@interface TransitionFlags {}
|
@interface TransitionFlags {}
|
||||||
|
|||||||
@@ -299,7 +299,8 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Early check if the transition doesn't warrant an animation.
|
// Early check if the transition doesn't warrant an animation.
|
||||||
if (Transitions.isAllNoAnimation(info) || Transitions.isAllOrderOnly(info)) {
|
if (Transitions.isAllNoAnimation(info) || Transitions.isAllOrderOnly(info)
|
||||||
|
|| (info.getFlags() & WindowManager.TRANSIT_FLAG_INVISIBLE) != 0) {
|
||||||
startTransaction.apply();
|
startTransaction.apply();
|
||||||
finishTransaction.apply();
|
finishTransaction.apply();
|
||||||
finishCallback.onTransitionFinished(null /* wct */, null /* wctCB */);
|
finishCallback.onTransitionFinished(null /* wct */, null /* wctCB */);
|
||||||
|
|||||||
@@ -513,6 +513,7 @@ public class DisplayRotation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mDisplayContent.inTransition()
|
if (mDisplayContent.inTransition()
|
||||||
|
&& mDisplayContent.getDisplayPolicy().isScreenOnFully()
|
||||||
&& !mDisplayContent.mTransitionController.useShellTransitionsRotation()) {
|
&& !mDisplayContent.mTransitionController.useShellTransitionsRotation()) {
|
||||||
// Rotation updates cannot be performed while the previous rotation change animation
|
// Rotation updates cannot be performed while the previous rotation change animation
|
||||||
// is still in progress. Skip this update. We will try updating again after the
|
// is still in progress. Skip this update. We will try updating again after the
|
||||||
|
|||||||
@@ -687,7 +687,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
|||||||
// All windows are synced already.
|
// All windows are synced already.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!isInTransition(wc)) return;
|
if (wc.mDisplayContent == null || !isInTransition(wc)) return;
|
||||||
|
if (!wc.mDisplayContent.getDisplayPolicy().isScreenOnFully()
|
||||||
|
|| wc.mDisplayContent.getDisplayInfo().state == Display.STATE_OFF) {
|
||||||
|
mFlags |= WindowManager.TRANSIT_FLAG_INVISIBLE;
|
||||||
|
}
|
||||||
|
|
||||||
if (mContainerFreezer == null) {
|
if (mContainerFreezer == null) {
|
||||||
mContainerFreezer = new ScreenshotFreezer();
|
mContainerFreezer = new ScreenshotFreezer();
|
||||||
|
|||||||
Reference in New Issue
Block a user