Merge "Fix Home key causes wrong animation" into jb-dev

This commit is contained in:
Craig Mautner
2012-05-02 16:17:24 -07:00
committed by Android (Google) Code Review
3 changed files with 35 additions and 16 deletions

View File

@@ -140,6 +140,8 @@ public class WindowAnimator {
mService.debugLayoutRepeats("appToken " + appAnimator.mAppToken + " done",
mPendingLayoutChanges);
}
if (WindowManagerService.DEBUG_ANIM) Slog.v(TAG,
"updateWindowsApps...: done animating " + appAnimator.mAppToken);
}
}
@@ -154,9 +156,11 @@ public class WindowAnimator {
// stopped animating, do one more pass through the layout
mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
if (WindowManagerService.DEBUG_LAYOUT_REPEATS) {
mService.debugLayoutRepeats("exiting appToken " + appAnimator.mAppToken
mService.debugLayoutRepeats("exiting appToken " + appAnimator.mAppToken
+ " done", mPendingLayoutChanges);
}
if (WindowManagerService.DEBUG_ANIM) Slog.v(TAG,
"updateWindowsApps...: done animating exiting " + appAnimator.mAppToken);
}
}
@@ -246,9 +250,9 @@ public class WindowAnimator {
if (mPolicy.doesForceHide(win, win.mAttrs)) {
if (!wasAnimating && nowAnimating) {
if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(TAG,
"Animation started that could impact force hide: "
+ win);
if (WindowManagerService.DEBUG_ANIM ||
WindowManagerService.DEBUG_VISIBILITY) Slog.v(TAG,
"Animation started that could impact force hide: " + win);
mBulkUpdateParams |= SET_FORCE_HIDING_CHANGED;
mPendingLayoutChanges |= WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
if (WindowManagerService.DEBUG_LAYOUT_REPEATS) {

View File

@@ -130,8 +130,6 @@ import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import android.view.animation.ScaleAnimation;
import android.view.animation.Transformation;
import android.view.animation.TranslateAnimation;
import java.io.BufferedWriter;
import java.io.DataInputStream;
@@ -3245,12 +3243,21 @@ public class WindowManagerService extends IWindowManager.Stub
if (mNextAppTransitionType == ActivityOptions.ANIM_CUSTOM) {
a = loadAnimation(mNextAppTransitionPackage, enter ?
mNextAppTransitionEnter : mNextAppTransitionExit);
if (DEBUG_ANIM) Slog.v(TAG, "applyAnimation: wtoken=" + wtoken
+ " anim=" + a + " nextAppTransition=ANIM_CUSTOM"
+ " transit=" + transit + " Callers " + Debug.getCallers(3));
} else if (mNextAppTransitionType == ActivityOptions.ANIM_SCALE_UP) {
a = createScaleUpAnimationLocked(transit, enter);
initialized = true;
if (DEBUG_ANIM) Slog.v(TAG, "applyAnimation: wtoken=" + wtoken
+ " anim=" + a + " nextAppTransition=ANIM_SCALE_UP"
+ " transit=" + transit + " Callers " + Debug.getCallers(3));
} else if (mNextAppTransitionType == ActivityOptions.ANIM_THUMBNAIL) {
a = createThumbnailAnimationLocked(transit, enter, false);
initialized = true;
if (DEBUG_ANIM) Slog.v(TAG, "applyAnimation: wtoken=" + wtoken
+ " anim=" + a + " nextAppTransition=ANIM_THUMBNAIL"
+ " transit=" + transit + " Callers " + Debug.getCallers(3));
} else {
int animAttr = 0;
switch (transit) {
@@ -3309,7 +3316,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (DEBUG_ANIM) Slog.v(TAG, "applyAnimation: wtoken=" + wtoken
+ " anim=" + a
+ " animAttr=0x" + Integer.toHexString(animAttr)
+ " transit=" + transit);
+ " transit=" + transit + " Callers " + Debug.getCallers(3));
}
if (a != null) {
if (DEBUG_ANIM) {
@@ -7856,7 +7863,9 @@ public class WindowManagerService extends IWindowManager.Stub
mToTopApps.clear();
}
WindowState oldWallpaper = mWallpaperTarget;
WindowState oldWallpaper =
mWallpaperTarget != null && mWallpaperTarget.mWinAnimator.isAnimating()
? null : mWallpaperTarget;
adjustWallpaperWindowsLocked();
mInnerFields.mWallpaperMayChange = false;
@@ -8167,8 +8176,8 @@ public class WindowManagerService extends IWindowManager.Stub
// to go through the process of getting informed
// by the application when it has finished drawing.
if (w.mOrientationChanging) {
if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation start waiting for draw in "
if (DEBUG_ANIM || DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation start waiting for draw mDrawState=DRAW_PENDING in "
+ w + ", surface " + winAnimator.mSurface);
winAnimator.mDrawState = WindowStateAnimator.DRAW_PENDING;
if (w.mAppToken != null) {

View File

@@ -380,8 +380,9 @@ class WindowStateAnimator {
boolean finishDrawingLocked() {
if (mDrawState == DRAW_PENDING) {
if (SHOW_TRANSACTIONS || DEBUG_ORIENTATION) Slog.v(
TAG, "finishDrawingLocked: " + this + " in " + mSurface);
if (DEBUG_ANIM || SHOW_TRANSACTIONS || DEBUG_ORIENTATION) Slog.v(
TAG, "finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING " + this + " in "
+ mSurface);
mDrawState = COMMIT_DRAW_PENDING;
return true;
}
@@ -393,7 +394,8 @@ class WindowStateAnimator {
if (mDrawState != COMMIT_DRAW_PENDING) {
return false;
}
//Slog.i(TAG, "commitFinishDrawingLocked: Draw pending. " + mSurface);
if (DEBUG_ANIM)
Slog.i(TAG, "commitFinishDrawingLocked: mDrawState=READY_TO_SHOW " + mSurface);
mDrawState = READY_TO_SHOW;
final boolean starting = mWin.mAttrs.type == TYPE_APPLICATION_STARTING;
final AppWindowToken atoken = mWin.mAppToken;
@@ -526,8 +528,8 @@ class WindowStateAnimator {
if (mSurface == null) {
mReportDestroySurface = false;
mSurfacePendingDestroy = false;
if (DEBUG_ORIENTATION) Slog.i(TAG,
"createSurface " + this + ": DRAW NOW PENDING");
if (DEBUG_ANIM || DEBUG_ORIENTATION) Slog.i(TAG,
"createSurface " + this + ": mDrawState=DRAW_PENDING");
mDrawState = DRAW_PENDING;
if (mWin.mAppToken != null) {
mWin.mAppToken.allDrawn = false;
@@ -1062,6 +1064,9 @@ class WindowStateAnimator {
}
}
} else {
if (DEBUG_ANIM) {
Slog.v(TAG, "prepareSurface: No changes in animation for " + mWin);
}
displayed = true;
}
@@ -1145,6 +1150,7 @@ class WindowStateAnimator {
// Force the show in the next prepareSurfaceLocked() call.
mLastAlpha = -1;
if (DEBUG_ANIM) Slog.v(TAG, "performShowLocked: mDrawState=HAS_DRAWN");
mDrawState = HAS_DRAWN;
mService.scheduleAnimationLocked();
@@ -1285,7 +1291,7 @@ class WindowStateAnimator {
+ " anim=" + anim + " attr=0x" + Integer.toHexString(attr)
+ " a=" + a
+ " mAnimation=" + mAnimation
+ " isEntrance=" + isEntrance);
+ " isEntrance=" + isEntrance + " Callers " + Debug.getCallers(3));
if (a != null) {
if (WindowManagerService.DEBUG_ANIM) {
RuntimeException e = null;