diff options
author | Wale Ogunwale <ogunwale@google.com> | 2015-05-14 01:51:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-14 01:51:50 +0000 |
commit | 8a2978c9ab5edd97e1de97fdc2ac6c6e2f7bb02b (patch) | |
tree | 564e126c155a828b26c63e1d6cbc891a440ff45a /services/core/java/com/android/server/wm | |
parent | 822f1aaf2b35f8a89efcdace187a73f1232b1961 (diff) | |
parent | 8ebc82a63f7e4818bb615cf980b961757c8d6587 (diff) | |
download | frameworks_base-8a2978c9ab5edd97e1de97fdc2ac6c6e2f7bb02b.zip frameworks_base-8a2978c9ab5edd97e1de97fdc2ac6c6e2f7bb02b.tar.gz frameworks_base-8a2978c9ab5edd97e1de97fdc2ac6c6e2f7bb02b.tar.bz2 |
Merge "Don't stop animation when starting windows app token changes" into mnc-dev
Diffstat (limited to 'services/core/java/com/android/server/wm')
3 files changed, 109 insertions, 90 deletions
diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java index 9033c9c..0357de2 100644 --- a/services/core/java/com/android/server/wm/AppTransition.java +++ b/services/core/java/com/android/server/wm/AppTransition.java @@ -289,11 +289,13 @@ public class AppTransition implements Dump { return mNextAppTransitionStartY; } - void prepare() { + boolean prepare() { if (!isRunning()) { mAppTransitionState = APP_STATE_IDLE; notifyAppTransitionPendingLocked(); + return true; } + return false; } void goodToGo(AppWindowAnimator openingAppAnimator, AppWindowAnimator closingAppAnimator) { @@ -953,8 +955,8 @@ public class AppTransition implements Dump { : com.android.internal.R.anim.voice_activity_open_exit); if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) Slog.v(TAG, "applyAnimation voice:" - + " anim=" + a + " transit=" + transit + " isEntrance=" + enter - + " Callers=" + Debug.getCallers(3)); + + " anim=" + a + " transit=" + appTransitionToString(transit) + + " isEntrance=" + enter + " Callers=" + Debug.getCallers(3)); } else if (isVoiceInteraction && (transit == TRANSIT_ACTIVITY_CLOSE || transit == TRANSIT_TASK_CLOSE || transit == TRANSIT_TASK_TO_BACK)) { @@ -963,22 +965,23 @@ public class AppTransition implements Dump { : com.android.internal.R.anim.voice_activity_close_exit); if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) Slog.v(TAG, "applyAnimation voice:" - + " anim=" + a + " transit=" + transit + " isEntrance=" + enter - + " Callers=" + Debug.getCallers(3)); + + " anim=" + a + " transit=" + appTransitionToString(transit) + + " isEntrance=" + enter + " Callers=" + Debug.getCallers(3)); } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_CUSTOM) { a = loadAnimationRes(mNextAppTransitionPackage, enter ? mNextAppTransitionEnter : mNextAppTransitionExit); if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) Slog.v(TAG, "applyAnimation:" + " anim=" + a + " nextAppTransition=ANIM_CUSTOM" - + " transit=" + transit + " isEntrance=" + enter + + " transit=" + appTransitionToString(transit) + " isEntrance=" + enter + " Callers=" + Debug.getCallers(3)); } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_CUSTOM_IN_PLACE) { a = loadAnimationRes(mNextAppTransitionPackage, mNextAppTransitionInPlace); if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) Slog.v(TAG, "applyAnimation:" - + " anim=" + a + " nextAppTransition=ANIM_CUSTOM_IN_PLACE" - + " transit=" + transit + " Callers=" + Debug.getCallers(3)); + + " anim=" + a + " nextAppTransition=ANIM_CUSTOM_IN_PLACE" + + " transit=" + appTransitionToString(transit) + + " Callers=" + Debug.getCallers(3)); } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_CLIP_REVEAL) { a = createClipRevealAnimationLocked(transit, enter, appFrame); if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) Slog.v(TAG, @@ -990,7 +993,7 @@ public class AppTransition implements Dump { if (DEBUG_APP_TRANSITIONS || DEBUG_ANIM) Slog.v(TAG, "applyAnimation:" + " anim=" + a + " nextAppTransition=ANIM_SCALE_UP" - + " transit=" + transit + " isEntrance=" + enter + + " transit=" + appTransitionToString(transit) + " isEntrance=" + enter + " Callers=" + Debug.getCallers(3)); } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_UP || mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_SCALE_DOWN) { @@ -1003,7 +1006,7 @@ public class AppTransition implements Dump { "ANIM_THUMBNAIL_SCALE_UP" : "ANIM_THUMBNAIL_SCALE_DOWN"; Slog.v(TAG, "applyAnimation:" + " anim=" + a + " nextAppTransition=" + animName - + " transit=" + transit + " isEntrance=" + enter + + " transit=" + appTransitionToString(transit) + " isEntrance=" + enter + " Callers=" + Debug.getCallers(3)); } } else if (mNextAppTransitionType == NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP || @@ -1018,7 +1021,7 @@ public class AppTransition implements Dump { "ANIM_THUMBNAIL_ASPECT_SCALE_UP" : "ANIM_THUMBNAIL_ASPECT_SCALE_DOWN"; Slog.v(TAG, "applyAnimation:" + " anim=" + a + " nextAppTransition=" + animName - + " transit=" + transit + " isEntrance=" + enter + + " transit=" + appTransitionToString(transit) + " isEntrance=" + enter + " Callers=" + Debug.getCallers(3)); } } else { @@ -1084,7 +1087,7 @@ public class AppTransition implements Dump { "applyAnimation:" + " anim=" + a + " animAttr=0x" + Integer.toHexString(animAttr) - + " transit=" + transit + " isEntrance=" + enter + + " transit=" + appTransitionToString(transit) + " isEntrance=" + enter + " Callers=" + Debug.getCallers(3)); } return a; @@ -1188,7 +1191,7 @@ public class AppTransition implements Dump { @Override public String toString() { - return "mNextAppTransition=0x" + Integer.toHexString(mNextAppTransition); + return "mNextAppTransition=" + appTransitionToString(mNextAppTransition); } /** diff --git a/services/core/java/com/android/server/wm/AppWindowAnimator.java b/services/core/java/com/android/server/wm/AppWindowAnimator.java index 21011e8..3feec82 100644 --- a/services/core/java/com/android/server/wm/AppWindowAnimator.java +++ b/services/core/java/com/android/server/wm/AppWindowAnimator.java @@ -16,6 +16,11 @@ package com.android.server.wm; +import static com.android.server.wm.WindowManagerService.DEBUG_ANIM; +import static com.android.server.wm.WindowManagerService.DEBUG_LAYERS; +import static com.android.server.wm.WindowManagerService.SHOW_TRANSACTIONS; +import static com.android.server.wm.WindowManagerService.TYPE_LAYER_OFFSET; + import android.graphics.Matrix; import android.util.Slog; import android.util.TimeUtils; @@ -78,7 +83,11 @@ public class AppWindowAnimator { boolean deferFinalFrameCleanup; /** WindowStateAnimator from mAppAnimator.allAppWindows as of last performLayout */ - ArrayList<WindowStateAnimator> mAllAppWinAnimators = new ArrayList<WindowStateAnimator>(); + ArrayList<WindowStateAnimator> mAllAppWinAnimators = new ArrayList<>(); + + /** True if the current animation was transferred from another AppWindowAnimator. + * See {@link #transferCurrentAnimation}*/ + boolean usingTransferredAnimation = false; static final Animation sDummyAnimation = new DummyAnimation(); @@ -102,9 +111,9 @@ public class AppWindowAnimator { int zorder = anim.getZAdjustment(); int adj = 0; if (zorder == Animation.ZORDER_TOP) { - adj = WindowManagerService.TYPE_LAYER_OFFSET; + adj = TYPE_LAYER_OFFSET; } else if (zorder == Animation.ZORDER_BOTTOM) { - adj = -WindowManagerService.TYPE_LAYER_OFFSET; + adj = -TYPE_LAYER_OFFSET; } if (animLayerAdjustment != adj) { @@ -140,6 +149,7 @@ public class AppWindowAnimator { mAppToken.allDrawn = false; mAppToken.deferClearAllDrawn = false; } + usingTransferredAnimation = false; } public boolean isAnimating() { @@ -154,19 +164,38 @@ public class AppWindowAnimator { deferThumbnailDestruction = false; } + void transferCurrentAnimation( + AppWindowAnimator toAppAnimator, WindowStateAnimator transferWinAnimator) { + + if (animation != null) { + toAppAnimator.animation = animation; + animation = null; + toAppAnimator.animating = animating; + toAppAnimator.animLayerAdjustment = animLayerAdjustment; + animLayerAdjustment = 0; + toAppAnimator.updateLayers(); + updateLayers(); + toAppAnimator.usingTransferredAnimation = true; + } + if (transferWinAnimator != null) { + mAllAppWinAnimators.remove(transferWinAnimator); + toAppAnimator.mAllAppWinAnimators.add(transferWinAnimator); + transferWinAnimator.mAppAnimator = toAppAnimator; + } + } + void updateLayers() { - final int N = mAppToken.allAppWindows.size(); + final int windowCount = mAppToken.allAppWindows.size(); final int adj = animLayerAdjustment; thumbnailLayer = -1; - for (int i=0; i<N; i++) { + for (int i = 0; i < windowCount; i++) { final WindowState w = mAppToken.allAppWindows.get(i); final WindowStateAnimator winAnimator = w.mWinAnimator; winAnimator.mAnimLayer = w.mLayer + adj; if (winAnimator.mAnimLayer > thumbnailLayer) { thumbnailLayer = winAnimator.mAnimLayer; } - if (WindowManagerService.DEBUG_LAYERS) Slog.v(TAG, "Updating layer " + w + ": " - + winAnimator.mAnimLayer); + if (DEBUG_LAYERS) Slog.v(TAG, "Updating layer " + w + ": " + winAnimator.mAnimLayer); if (w == mService.mInputMethodTarget && !mService.mInputMethodTargetWaitingAnim) { mService.setInputMethodAnimLayerAdjustment(adj); } @@ -191,11 +220,11 @@ public class AppWindowAnimator { // cache often used attributes locally final float tmpFloats[] = mService.mTmpFloats; thumbnailTransformation.getMatrix().getValues(tmpFloats); - if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(thumbnail, + if (SHOW_TRANSACTIONS) WindowManagerService.logSurface(thumbnail, "thumbnail", "POS " + tmpFloats[Matrix.MTRANS_X] + ", " + tmpFloats[Matrix.MTRANS_Y], null); thumbnail.setPosition(tmpFloats[Matrix.MTRANS_X], tmpFloats[Matrix.MTRANS_Y]); - if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(thumbnail, + if (SHOW_TRANSACTIONS) WindowManagerService.logSurface(thumbnail, "thumbnail", "alpha=" + thumbnailTransformation.getAlpha() + " layer=" + thumbnailLayer + " matrix=[" + tmpFloats[Matrix.MSCALE_X] @@ -228,14 +257,14 @@ public class AppWindowAnimator { deferFinalFrameCleanup = true; hasMoreFrames = true; } else { - if (false && WindowManagerService.DEBUG_ANIM) Slog.v( - TAG, "Stepped animation in " + mAppToken + ": more=" + hasMoreFrames + - ", xform=" + transformation); + if (false && DEBUG_ANIM) Slog.v(TAG, + "Stepped animation in " + mAppToken + ": more=" + hasMoreFrames + + ", xform=" + transformation); deferFinalFrameCleanup = false; animation = null; clearThumbnail(); - if (WindowManagerService.DEBUG_ANIM) Slog.v( - TAG, "Finished animation in " + mAppToken + " @ " + currentTime); + if (DEBUG_ANIM) Slog.v(TAG, + "Finished animation in " + mAppToken + " @ " + currentTime); } } hasTransformation = hasMoreFrames; @@ -258,8 +287,8 @@ public class AppWindowAnimator { if ((mAppToken.allDrawn || animating || mAppToken.startingDisplayed) && animation != null) { if (!animating) { - if (WindowManagerService.DEBUG_ANIM) Slog.v( - TAG, "Starting animation in " + mAppToken + + if (DEBUG_ANIM) Slog.v(TAG, + "Starting animation in " + mAppToken + " @ " + currentTime + " scale=" + mService.getTransitionAnimationScaleLocked() + " allDrawn=" + mAppToken.allDrawn + " animating=" + animating); @@ -306,8 +335,8 @@ public class AppWindowAnimator { mService.moveInputMethodWindowsIfNeededLocked(true); } - if (WindowManagerService.DEBUG_ANIM) Slog.v( - TAG, "Animation done in " + mAppToken + if (DEBUG_ANIM) Slog.v(TAG, + "Animation done in " + mAppToken + ": reportedVisible=" + mAppToken.reportedVisible); transformation.clear(); diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 77694b6..4972ce4 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -495,7 +495,7 @@ public class WindowManagerService extends IWindowManager.Stub String mLastANRState; /** All DisplayContents in the world, kept here */ - SparseArray<DisplayContent> mDisplayContents = new SparseArray<DisplayContent>(2); + SparseArray<DisplayContent> mDisplayContents = new SparseArray<>(2); int mRotation = 0; int mForcedAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; @@ -511,7 +511,7 @@ public class WindowManagerService extends IWindowManager.Stub deathRecipient = d; } } - ArrayList<RotationWatcher> mRotationWatchers = new ArrayList<RotationWatcher>(); + ArrayList<RotationWatcher> mRotationWatchers = new ArrayList<>(); int mDeferredRotationPauseCount; int mSystemDecorLayer = 0; @@ -552,11 +552,10 @@ public class WindowManagerService extends IWindowManager.Stub private final PowerManager.WakeLock mScreenFrozenLock; final AppTransition mAppTransition; - boolean mStartingIconInTransition = false; boolean mSkipAppTransitionAnimation = false; - final ArraySet<AppWindowToken> mOpeningApps = new ArraySet<AppWindowToken>(); - final ArraySet<AppWindowToken> mClosingApps = new ArraySet<AppWindowToken>(); + final ArraySet<AppWindowToken> mOpeningApps = new ArraySet<>(); + final ArraySet<AppWindowToken> mClosingApps = new ArraySet<>(); boolean mIsTouchDevice; @@ -581,7 +580,7 @@ public class WindowManagerService extends IWindowManager.Stub int mInputMethodAnimLayerAdjustment; WindowState mInputMethodWindow = null; - final ArrayList<WindowState> mInputMethodDialogs = new ArrayList<WindowState>(); + final ArrayList<WindowState> mInputMethodDialogs = new ArrayList<>(); /** Temporary list for comparison. Always clear this after use so we don't end up with * orphaned windows references */ @@ -4146,8 +4145,8 @@ public class WindowManagerService extends IWindowManager.Stub } synchronized(mWindowMap) { - if (DEBUG_APP_TRANSITIONS) Slog.v( - TAG, "Prepare app transition: transit=" + transit + if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Prepare app transition:" + + " transit=" + AppTransition.appTransitionToString(transit) + " " + mAppTransition + " alwaysKeepCurrent=" + alwaysKeepCurrent + " Callers=" + Debug.getCallers(3)); @@ -4166,9 +4165,7 @@ public class WindowManagerService extends IWindowManager.Stub mAppTransition.setAppTransition(transit); } } - if (okToDisplay()) { - mAppTransition.prepare(); - mStartingIconInTransition = false; + if (okToDisplay() && mAppTransition.prepare()) { mSkipAppTransitionAnimation = false; } if (mAppTransition.isTransitionSet()) { @@ -4295,19 +4292,16 @@ public class WindowManagerService extends IWindowManager.Stub if (ttoken != null) { WindowState startingWindow = ttoken.startingWindow; if (startingWindow != null) { - if (mStartingIconInTransition) { - // In this case, the starting icon has already - // been displayed, so start letting windows get - // shown immediately without any more transitions. - mSkipAppTransitionAnimation = true; - } + // In this case, the starting icon has already been displayed, so start + // letting windows get shown immediately without any more transitions. + mSkipAppTransitionAnimation = true; + if (DEBUG_STARTING_WINDOW) Slog.v(TAG, "Moving existing starting " + startingWindow + " from " + ttoken + " to " + wtoken); final long origId = Binder.clearCallingIdentity(); - // Transfer the starting window over to the new - // token. + // Transfer the starting window over to the new token. wtoken.startingData = ttoken.startingData; wtoken.startingView = ttoken.startingView; wtoken.startingDisplayed = ttoken.startingDisplayed; @@ -4321,7 +4315,6 @@ public class WindowManagerService extends IWindowManager.Stub startingWindow.mToken = wtoken; startingWindow.mRootToken = wtoken; startingWindow.mAppToken = wtoken; - startingWindow.mWinAnimator.mAppAnimator = wtoken.mAppAnimator; if (DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE || DEBUG_STARTING_WINDOW) { Slog.v(TAG, "Removing starting window: " + startingWindow); @@ -4355,17 +4348,8 @@ public class WindowManagerService extends IWindowManager.Stub wtoken.clientHidden = ttoken.clientHidden; wtoken.sendAppVisibilityToClients(); } - final AppWindowAnimator tAppAnimator = ttoken.mAppAnimator; - final AppWindowAnimator wAppAnimator = wtoken.mAppAnimator; - if (tAppAnimator.animation != null) { - wAppAnimator.animation = tAppAnimator.animation; - wAppAnimator.animating = tAppAnimator.animating; - wAppAnimator.animLayerAdjustment = tAppAnimator.animLayerAdjustment; - tAppAnimator.animation = null; - tAppAnimator.animLayerAdjustment = 0; - wAppAnimator.updateLayers(); - tAppAnimator.updateLayers(); - } + ttoken.mAppAnimator.transferCurrentAnimation( + wtoken.mAppAnimator, startingWindow.mWinAnimator); updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES, true /*updateInputWindows*/); @@ -4465,7 +4449,6 @@ public class WindowManagerService extends IWindowManager.Stub } if (DEBUG_STARTING_WINDOW) Slog.v(TAG, "Creating StartingData"); - mStartingIconInTransition = true; wtoken.startingData = new StartingData(pkg, theme, compatInfo, nonLocalizedLabel, labelRes, icon, logo, windowFlags); Message m = mH.obtainMessage(H.ADD_STARTING, wtoken); @@ -4566,8 +4549,8 @@ public class WindowManagerService extends IWindowManager.Stub changed = true; } - final int N = wtoken.allAppWindows.size(); - for (int i=0; i<N; i++) { + final int windowsCount = wtoken.allAppWindows.size(); + for (int i = 0; i < windowsCount; i++) { WindowState win = wtoken.allAppWindows.get(i); if (win == wtoken.startingWindow) { continue; @@ -4696,7 +4679,7 @@ public class WindowManagerService extends IWindowManager.Stub // If we are preparing an app transition, then delay changing // the visibility of this token until we execute that transition. if (okToDisplay() && mAppTransition.isTransitionSet()) { - if (!wtoken.startingDisplayed) { + if (!wtoken.startingDisplayed || mSkipAppTransitionAnimation) { if (DEBUG_APP_TRANSITIONS) Slog.v( TAG, "Setting dummy animation on: " + wtoken); wtoken.mAppAnimator.setDummyAnimation(); @@ -9178,14 +9161,14 @@ public class WindowManagerService extends IWindowManager.Stub public int handleAppTransitionReadyLocked(WindowList windows) { int changes = 0; int i; - int NN = mOpeningApps.size(); + int appsCount = mOpeningApps.size(); boolean goodToGo = true; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, - "Checking " + NN + " opening apps (frozen=" + "Checking " + appsCount + " opening apps (frozen=" + mDisplayFrozen + " timeout=" + mAppTransition.isTimeout() + ")..."); if (!mAppTransition.isTimeout()) { - for (i=0; i<NN && goodToGo; i++) { + for (i = 0; i < appsCount && goodToGo; i++) { AppWindowToken wtoken = mOpeningApps.valueAt(i); if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Check opening app=" + wtoken + ": allDrawn=" @@ -9238,7 +9221,6 @@ public class WindowManagerService extends IWindowManager.Stub if (mSkipAppTransitionAnimation) { transit = AppTransition.TRANSIT_UNSET; } - mStartingIconInTransition = false; mSkipAppTransitionAnimation = false; mH.removeMessages(H.APP_TRANSITION_TIMEOUT); @@ -9287,17 +9269,17 @@ public class WindowManagerService extends IWindowManager.Stub // (2) Find the layout params of the top-most // application window in the tokens, which is // what will control the animation theme. - final int NC = mClosingApps.size(); - NN = NC + mOpeningApps.size(); - for (i=0; i<NN; i++) { + final int closingAppsCount = mClosingApps.size(); + appsCount = closingAppsCount + mOpeningApps.size(); + for (i = 0; i < appsCount; i++) { final AppWindowToken wtoken; - if (i < NC) { + if (i < closingAppsCount) { wtoken = mClosingApps.valueAt(i); if (wtoken == lowerWallpaperAppToken || wtoken == upperWallpaperAppToken) { closingAppHasWallpaper = true; } } else { - wtoken = mOpeningApps.valueAt(i - NC); + wtoken = mOpeningApps.valueAt(i - closingAppsCount); if (wtoken == lowerWallpaperAppToken || wtoken == upperWallpaperAppToken) { openingAppHasWallpaper = true; } @@ -9338,20 +9320,23 @@ public class WindowManagerService extends IWindowManager.Stub transit = AppTransition.TRANSIT_WALLPAPER_INTRA_CLOSE; break; } - if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "New transit: " + transit); + if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, + "New transit: " + AppTransition.appTransitionToString(transit)); } else if ((oldWallpaper != null) && !mOpeningApps.isEmpty() && !mOpeningApps.contains(oldWallpaper.mAppToken)) { // We are transitioning from an activity with // a wallpaper to one without. transit = AppTransition.TRANSIT_WALLPAPER_CLOSE; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, - "New transit away from wallpaper: " + transit); + "New transit away from wallpaper: " + + AppTransition.appTransitionToString(transit)); } else if (mWallpaperTarget != null && mWallpaperTarget.isVisibleLw()) { // We are transitioning from an activity without // a wallpaper to now showing the wallpaper transit = AppTransition.TRANSIT_WALLPAPER_OPEN; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, - "New transit into wallpaper: " + transit); + "New transit into wallpaper: " + + AppTransition.appTransitionToString(transit)); } else { mAnimateWallpaperWithTarget = true; } @@ -9395,21 +9380,24 @@ public class WindowManagerService extends IWindowManager.Stub } } - NN = mOpeningApps.size(); - for (i=0; i<NN; i++) { + appsCount = mOpeningApps.size(); + for (i = 0; i < appsCount; i++) { AppWindowToken wtoken = mOpeningApps.valueAt(i); final AppWindowAnimator appAnimator = wtoken.mAppAnimator; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now opening app" + wtoken); - appAnimator.clearThumbnail(); - appAnimator.animation = null; + + if (!appAnimator.usingTransferredAnimation) { + appAnimator.clearThumbnail(); + appAnimator.animation = null; + } wtoken.inPendingTransaction = false; setTokenVisibilityLocked(wtoken, animLp, true, transit, false, voiceInteraction); wtoken.updateReportedVisibilityLocked(); wtoken.waitingToShow = false; appAnimator.mAllAppWinAnimators.clear(); - final int N = wtoken.allAppWindows.size(); - for (int j = 0; j < N; j++) { + final int windowsCount = wtoken.allAppWindows.size(); + for (int j = 0; j < windowsCount; j++) { appAnimator.mAllAppWinAnimators.add(wtoken.allAppWindows.get(j).mWinAnimator); } mAnimator.mAnimating |= appAnimator.showAllWindowsLocked(); @@ -9417,7 +9405,7 @@ public class WindowManagerService extends IWindowManager.Stub if (animLp != null) { int layer = -1; - for (int j=0; j<wtoken.windows.size(); j++) { + for (int j = 0; j < wtoken.windows.size(); j++) { WindowState win = wtoken.windows.get(j); if (win.mWinAnimator.mAnimLayer > layer) { layer = win.mWinAnimator.mAnimLayer; @@ -9429,8 +9417,8 @@ public class WindowManagerService extends IWindowManager.Stub } } } - NN = mClosingApps.size(); - for (i=0; i<NN; i++) { + appsCount = mClosingApps.size(); + for (i = 0; i < appsCount; i++) { AppWindowToken wtoken = mClosingApps.valueAt(i); final AppWindowAnimator appAnimator = wtoken.mAppAnimator; if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now closing app " + wtoken); @@ -9454,7 +9442,7 @@ public class WindowManagerService extends IWindowManager.Stub if (animLp != null) { int layer = -1; - for (int j=0; j<wtoken.windows.size(); j++) { + for (int j = 0; j < wtoken.windows.size(); j++) { WindowState win = wtoken.windows.get(j); if (win.mWinAnimator.mAnimLayer > layer) { layer = win.mWinAnimator.mAnimLayer; @@ -11407,8 +11395,7 @@ public class WindowManagerService extends IWindowManager.Stub pw.print(" transition="); pw.print(mTransitionAnimationScaleSetting); pw.print(" animator="); pw.println(mAnimatorDurationScaleSetting); pw.print(" mTraversalScheduled="); pw.println(mTraversalScheduled); - pw.print(" mStartingIconInTransition="); pw.print(mStartingIconInTransition); - pw.print(" mSkipAppTransitionAnimation="); pw.println(mSkipAppTransitionAnimation); + pw.print(" mSkipAppTransitionAnimation="); pw.println(mSkipAppTransitionAnimation); pw.println(" mLayoutToAnim:"); mAppTransition.dump(pw, " "); } |