DO NO MERGE -- Revert the following two commits as they're causing flickering
When double tapping Recents, need to reinvestigate. b/30831873 b/30790402 Revert "Clear WS.mDestroying on AWT.clearAnimatingFlags" This reverts commit c2661e52eae3161ac8c02e831290ad50ad395be2. Revert "Some fixes for transition animation selection" This reverts commit 73e9bc3f1557f0320c8af843dfb051f27187361d.
This commit is contained in:
@@ -17,9 +17,7 @@
|
|||||||
package com.android.server.wm;
|
package com.android.server.wm;
|
||||||
|
|
||||||
import static android.app.ActivityManager.StackId;
|
import static android.app.ActivityManager.StackId;
|
||||||
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
|
|
||||||
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
|
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
|
||||||
import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
|
|
||||||
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ANIM;
|
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ANIM;
|
||||||
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.DEBUG_ADD_REMOVE;
|
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE;
|
||||||
@@ -359,14 +357,8 @@ class AppWindowToken extends WindowToken {
|
|||||||
// placement for this window during this period, one or more frame will
|
// placement for this window during this period, one or more frame will
|
||||||
// show up with wrong position or scale.
|
// show up with wrong position or scale.
|
||||||
win.mWinAnimator.mAnimating = false;
|
win.mWinAnimator.mAnimating = false;
|
||||||
|
|
||||||
if (win.mDestroying) {
|
|
||||||
win.mDestroying = false;
|
|
||||||
service.mDestroySurface.remove(win);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
requestUpdateWallpaperIfNeeded();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroySurfaces() {
|
void destroySurfaces() {
|
||||||
@@ -414,9 +406,6 @@ class AppWindowToken extends WindowToken {
|
|||||||
if (displayContent != null && !displayList.contains(displayContent)) {
|
if (displayContent != null && !displayList.contains(displayContent)) {
|
||||||
displayList.add(displayContent);
|
displayList.add(displayContent);
|
||||||
}
|
}
|
||||||
if (cleanupOnResume) {
|
|
||||||
win.requestUpdateWallpaperIfNeeded();
|
|
||||||
}
|
|
||||||
win.mDestroying = false;
|
win.mDestroying = false;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < displayList.size(); i++) {
|
for (int i = 0; i < displayList.size(); i++) {
|
||||||
|
|||||||
@@ -590,9 +590,18 @@ class WallpaperController {
|
|||||||
"Animating wallpapers: old#" + oldI + "=" + oldW + "; new#"
|
"Animating wallpapers: old#" + oldI + "=" + oldW + "; new#"
|
||||||
+ wallpaperTargetIndex + "=" + wallpaperTarget);
|
+ wallpaperTargetIndex + "=" + wallpaperTarget);
|
||||||
|
|
||||||
// Set the upper and lower wallpaper targets correctly,
|
// Set the new target correctly.
|
||||||
|
if (wallpaperTarget.mAppToken != null
|
||||||
|
&& wallpaperTarget.mAppToken.hiddenRequested) {
|
||||||
|
if (DEBUG_WALLPAPER_LIGHT) Slog.v(TAG,
|
||||||
|
"Old wallpaper still the target.");
|
||||||
|
mWallpaperTarget = oldW;
|
||||||
|
wallpaperTarget = oldW;
|
||||||
|
wallpaperTargetIndex = oldI;
|
||||||
|
}
|
||||||
|
// Now set the upper and lower wallpaper targets correctly,
|
||||||
// and make sure that we are positioning the wallpaper below the lower.
|
// and make sure that we are positioning the wallpaper below the lower.
|
||||||
if (wallpaperTargetIndex > oldI) {
|
else if (wallpaperTargetIndex > oldI) {
|
||||||
// The new target is on top of the old one.
|
// The new target is on top of the old one.
|
||||||
if (DEBUG_WALLPAPER_LIGHT) Slog.v(TAG,
|
if (DEBUG_WALLPAPER_LIGHT) Slog.v(TAG,
|
||||||
"Found target above old target.");
|
"Found target above old target.");
|
||||||
@@ -607,16 +616,6 @@ class WallpaperController {
|
|||||||
mUpperWallpaperTarget = oldW;
|
mUpperWallpaperTarget = oldW;
|
||||||
mLowerWallpaperTarget = wallpaperTarget;
|
mLowerWallpaperTarget = wallpaperTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the new target is going hidden, set it back to the old target.
|
|
||||||
if (wallpaperTarget.mAppToken != null
|
|
||||||
&& wallpaperTarget.mAppToken.hiddenRequested) {
|
|
||||||
if (DEBUG_WALLPAPER_LIGHT) Slog.v(TAG,
|
|
||||||
"Old wallpaper still the target.");
|
|
||||||
mWallpaperTarget = oldW;
|
|
||||||
wallpaperTarget = oldW;
|
|
||||||
wallpaperTargetIndex = oldI;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1097,26 +1097,6 @@ class WindowSurfacePlacer {
|
|||||||
boolean fullscreenAnim = false;
|
boolean fullscreenAnim = false;
|
||||||
boolean voiceInteraction = false;
|
boolean voiceInteraction = false;
|
||||||
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < appsCount; i++) {
|
|
||||||
final AppWindowToken wtoken = mService.mOpeningApps.valueAt(i);
|
|
||||||
// Clearing the mAnimatingExit flag before entering animation. It's set to
|
|
||||||
// true if app window is removed, or window relayout to invisible.
|
|
||||||
// This also affects window visibility. We need to clear it *before*
|
|
||||||
// maybeUpdateTransitToWallpaper() as the transition selection depends on
|
|
||||||
// wallpaper target visibility.
|
|
||||||
wtoken.clearAnimatingFlags();
|
|
||||||
|
|
||||||
}
|
|
||||||
// Adjust wallpaper before we pull the lower/upper target, since pending changes
|
|
||||||
// (like the clearAnimatingFlags() above) might affect wallpaper target result.
|
|
||||||
final DisplayContent displayContent = mService.getDefaultDisplayContentLocked();
|
|
||||||
if ((displayContent.pendingLayoutChanges & FINISH_LAYOUT_REDO_WALLPAPER) != 0 &&
|
|
||||||
mWallpaperControllerLocked.adjustWallpaperWindows()) {
|
|
||||||
mService.mLayersController.assignLayersLocked(windows);
|
|
||||||
displayContent.layoutNeeded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
final WindowState lowerWallpaperTarget =
|
final WindowState lowerWallpaperTarget =
|
||||||
mWallpaperControllerLocked.getLowerWallpaperTarget();
|
mWallpaperControllerLocked.getLowerWallpaperTarget();
|
||||||
final WindowState upperWallpaperTarget =
|
final WindowState upperWallpaperTarget =
|
||||||
@@ -1133,6 +1113,7 @@ class WindowSurfacePlacer {
|
|||||||
upperWallpaperAppToken = upperWallpaperTarget.mAppToken;
|
upperWallpaperAppToken = upperWallpaperTarget.mAppToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int i;
|
||||||
// Do a first pass through the tokens for two
|
// Do a first pass through the tokens for two
|
||||||
// things:
|
// things:
|
||||||
// (1) Determine if both the closing and opening
|
// (1) Determine if both the closing and opening
|
||||||
@@ -1157,6 +1138,12 @@ class WindowSurfacePlacer {
|
|||||||
if (wtoken == lowerWallpaperAppToken || wtoken == upperWallpaperAppToken) {
|
if (wtoken == lowerWallpaperAppToken || wtoken == upperWallpaperAppToken) {
|
||||||
openingAppHasWallpaper = true;
|
openingAppHasWallpaper = true;
|
||||||
}
|
}
|
||||||
|
// Clearing the mAnimatingExit flag before entering animation. It's set to
|
||||||
|
// true if app window is removed, or window relayout to invisible.
|
||||||
|
// This also affects window visibility. We need to clear it *before*
|
||||||
|
// maybeUpdateTransitToWallpaper() as the transition selection depends on
|
||||||
|
// wallpaper target visibility.
|
||||||
|
wtoken.clearAnimatingFlags();
|
||||||
}
|
}
|
||||||
|
|
||||||
voiceInteraction |= wtoken.voiceInteraction;
|
voiceInteraction |= wtoken.voiceInteraction;
|
||||||
@@ -1219,7 +1206,7 @@ class WindowSurfacePlacer {
|
|||||||
|
|
||||||
// This has changed the visibility of windows, so perform
|
// This has changed the visibility of windows, so perform
|
||||||
// a new layout to get them all up-to-date.
|
// a new layout to get them all up-to-date.
|
||||||
displayContent.layoutNeeded = true;
|
mService.getDefaultDisplayContentLocked().layoutNeeded = true;
|
||||||
|
|
||||||
// TODO(multidisplay): IMEs are only supported on the default display.
|
// TODO(multidisplay): IMEs are only supported on the default display.
|
||||||
if (windows == mService.getDefaultWindowListLocked()
|
if (windows == mService.getDefaultWindowListLocked()
|
||||||
|
|||||||
Reference in New Issue
Block a user