synchronized(mWindowMap) {
if (DEBUG_APP_TRANSITIONS) Slog.v(
TAG, "Prepare app transition: transit=" + transit
- + " mNextAppTransition=" + mNextAppTransition);
+ + " mNextAppTransition=" + mNextAppTransition
+ + "\nCallers=" + Debug.getCallers(3));
if (okToDisplay()) {
if (mNextAppTransition == WindowManagerPolicy.TRANSIT_UNSET
|| mNextAppTransition == WindowManagerPolicy.TRANSIT_NONE) {
e = new RuntimeException();
e.fillInStackTrace();
}
- Slog.v(TAG, "setAppVisibility(" + token + ", " + visible
+ Slog.v(TAG, "setAppVisibility(" + token + ", visible=" + visible
+ "): mNextAppTransition=" + mNextAppTransition
+ " hidden=" + wtoken.hidden
+ " hiddenRequested=" + wtoken.hiddenRequested, e);
mToTopApps.clear();
}
+ // if wallpaper is animating in or out set oldWallpaper to null else to wallpaper
WindowState oldWallpaper =
mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimating()
+ && !mWallpaperTarget.mWinAnimator.isDummyAnimation()
? null : mWallpaperTarget;
adjustWallpaperWindowsLocked();
|| atoken.inPendingTransaction));
}
+ /** Is the window animating the DummyAnimation? */
+ boolean isDummyAnimation() {
+ final AppWindowToken atoken = mWin.mAppToken;
+ return atoken != null
+ && atoken.mAppAnimator.animation == AppWindowAnimator.sDummyAnimation;
+ }
+
/** Is this window currently animating? */
boolean isWindowAnimating() {
return mAnimation != null;
mWin.mDestroying = true;
if (WindowState.SHOW_TRANSACTIONS) WindowManagerService.logSurface(
mWin, "HIDE (finishExit)", null);
- mSurfaceShown = false;
- try {
- mSurface.hide();
- } catch (RuntimeException e) {
- Slog.w(TAG, "Error hiding surface in " + this, e);
- }
- mLastHidden = true;
+ hide();
}
mWin.mExiting = false;
if (mWin.mRemoveOnExit) {
mService.mPendingRemove.add(mWin);
mWin.mRemoveOnExit = false;
}
+ if (mService.mWallpaperTarget == mWin) {
+ mAnimator.hideWallpapersLocked();
+ }
+ }
+
+ void hide() {
+ if (!mLastHidden) {
+ //dump();
+ mLastHidden = true;
+ if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(mWin,
+ "HIDE (performLayout)", null);
+ if (mSurface != null) {
+ mSurfaceShown = false;
+ try {
+ mSurface.hide();
+ } catch (RuntimeException e) {
+ Slog.w(TAG, "Exception hiding surface in " + mWin);
+ }
+ }
+ }
}
boolean finishDrawingLocked() {
setSurfaceBoundaries(recoveringMemory);
if (w.mAttachedHidden || !w.isReadyForDisplay()) {
- if (!mLastHidden) {
- //dump();
- mLastHidden = true;
- if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(w,
- "HIDE (performLayout)", null);
- if (mSurface != null) {
- mSurfaceShown = false;
- try {
- mSurface.hide();
- } catch (RuntimeException e) {
- Slog.w(TAG, "Exception hiding surface in " + w);
- }
- }
- }
+ hide();
// If we are waiting for this window to handle an
// orientation change, well, it is hidden, so
// doesn't really matter. Note that this does