Merge "Don't even think about changing keyguard transit" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3e3bb5f762
@@ -2044,7 +2044,10 @@ public class AppTransition implements Dump {
|
|||||||
if (forceOverride || isKeyguardTransit(transit) || !isTransitionSet()
|
if (forceOverride || isKeyguardTransit(transit) || !isTransitionSet()
|
||||||
|| mNextAppTransition == TRANSIT_NONE) {
|
|| mNextAppTransition == TRANSIT_NONE) {
|
||||||
setAppTransition(transit, flags);
|
setAppTransition(transit, flags);
|
||||||
} else if (!alwaysKeepCurrent) {
|
}
|
||||||
|
// We never want to change from a Keyguard transit to a non-Keyguard transit, as our logic
|
||||||
|
// relies on the fact that we always execute a Keyguard transition after preparing one.
|
||||||
|
else if (!alwaysKeepCurrent && !isKeyguardTransit(transit)) {
|
||||||
if (transit == TRANSIT_TASK_OPEN && isTransitionEqual(TRANSIT_TASK_CLOSE)) {
|
if (transit == TRANSIT_TASK_OPEN && isTransitionEqual(TRANSIT_TASK_CLOSE)) {
|
||||||
// Opening a new task always supersedes a close for the anim.
|
// Opening a new task always supersedes a close for the anim.
|
||||||
setAppTransition(transit, flags);
|
setAppTransition(transit, flags);
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import static com.android.server.wm.AppTransition.TRANSIT_WALLPAPER_CLOSE;
|
|||||||
import static com.android.server.wm.AppTransition.TRANSIT_WALLPAPER_INTRA_CLOSE;
|
import static com.android.server.wm.AppTransition.TRANSIT_WALLPAPER_INTRA_CLOSE;
|
||||||
import static com.android.server.wm.AppTransition.TRANSIT_WALLPAPER_INTRA_OPEN;
|
import static com.android.server.wm.AppTransition.TRANSIT_WALLPAPER_INTRA_OPEN;
|
||||||
import static com.android.server.wm.AppTransition.TRANSIT_WALLPAPER_OPEN;
|
import static com.android.server.wm.AppTransition.TRANSIT_WALLPAPER_OPEN;
|
||||||
|
import static com.android.server.wm.AppTransition.isKeyguardGoingAwayTransit;
|
||||||
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG;
|
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG;
|
||||||
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS;
|
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS;
|
||||||
import static com.android.server.wm.WindowManagerDebugConfig.SHOW_LIGHT_TRANSACTIONS;
|
import static com.android.server.wm.WindowManagerDebugConfig.SHOW_LIGHT_TRANSACTIONS;
|
||||||
@@ -239,7 +240,7 @@ class WindowSurfacePlacer {
|
|||||||
|
|
||||||
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "**** GOOD TO GO");
|
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "**** GOOD TO GO");
|
||||||
int transit = mService.mAppTransition.getAppTransition();
|
int transit = mService.mAppTransition.getAppTransition();
|
||||||
if (mService.mSkipAppTransitionAnimation) {
|
if (mService.mSkipAppTransitionAnimation && !isKeyguardGoingAwayTransit(transit)) {
|
||||||
transit = AppTransition.TRANSIT_UNSET;
|
transit = AppTransition.TRANSIT_UNSET;
|
||||||
}
|
}
|
||||||
mService.mSkipAppTransitionAnimation = false;
|
mService.mSkipAppTransitionAnimation = false;
|
||||||
@@ -598,6 +599,14 @@ class WindowSurfacePlacer {
|
|||||||
+ ", openingApps=" + openingApps
|
+ ", openingApps=" + openingApps
|
||||||
+ ", closingApps=" + closingApps);
|
+ ", closingApps=" + closingApps);
|
||||||
mService.mAnimateWallpaperWithTarget = false;
|
mService.mAnimateWallpaperWithTarget = false;
|
||||||
|
if (openingCanBeWallpaperTarget && transit == TRANSIT_KEYGUARD_GOING_AWAY) {
|
||||||
|
transit = TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER;
|
||||||
|
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
|
||||||
|
"New transit: " + AppTransition.appTransitionToString(transit));
|
||||||
|
}
|
||||||
|
// We never want to change from a Keyguard transit to a non-Keyguard transit, as our logic
|
||||||
|
// relies on the fact that we always execute a Keyguard transition after preparing one.
|
||||||
|
else if (!isKeyguardGoingAwayTransit(transit)) {
|
||||||
if (closingAppHasWallpaper && openingAppHasWallpaper) {
|
if (closingAppHasWallpaper && openingAppHasWallpaper) {
|
||||||
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Wallpaper animation!");
|
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Wallpaper animation!");
|
||||||
switch (transit) {
|
switch (transit) {
|
||||||
@@ -614,10 +623,6 @@ class WindowSurfacePlacer {
|
|||||||
}
|
}
|
||||||
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
|
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
|
||||||
"New transit: " + AppTransition.appTransitionToString(transit));
|
"New transit: " + AppTransition.appTransitionToString(transit));
|
||||||
} else if (openingCanBeWallpaperTarget && transit == TRANSIT_KEYGUARD_GOING_AWAY) {
|
|
||||||
transit = TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER;
|
|
||||||
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
|
|
||||||
"New transit: " + AppTransition.appTransitionToString(transit));
|
|
||||||
} else if (oldWallpaper != null && !mService.mOpeningApps.isEmpty()
|
} else if (oldWallpaper != null && !mService.mOpeningApps.isEmpty()
|
||||||
&& !openingApps.contains(oldWallpaper.mAppToken)
|
&& !openingApps.contains(oldWallpaper.mAppToken)
|
||||||
&& closingApps.contains(oldWallpaper.mAppToken)) {
|
&& closingApps.contains(oldWallpaper.mAppToken)) {
|
||||||
@@ -635,6 +640,7 @@ class WindowSurfacePlacer {
|
|||||||
} else {
|
} else {
|
||||||
mService.mAnimateWallpaperWithTarget = true;
|
mService.mAnimateWallpaperWithTarget = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return transit;
|
return transit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user