Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7661eed authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

am 6704a48b: Merge "Fixes to Starting window and Wallpaper windows." into jb-mr1-dev

* commit '6704a48b':
  Fixes to Starting window and Wallpaper windows.
parents 7788b759 6704a48b
Loading
Loading
Loading
Loading
+21 −13
Original line number Diff line number Diff line
@@ -1643,7 +1643,8 @@ public class WindowManagerService extends IWindowManager.Stub
            }
        }

        if (mWallpaperTarget != foundW) {
        if (mWallpaperTarget != foundW
                && (mLowerWallpaperTarget == null || mLowerWallpaperTarget != foundW)) {
            if (DEBUG_WALLPAPER) {
                Slog.v(TAG, "New wallpaper target: " + foundW
                        + " oldTarget: " + mWallpaperTarget);
@@ -3386,7 +3387,7 @@ public class WindowManagerService extends IWindowManager.Stub
            // Exiting app
            if (scaleUp) {
                // noop animation
                a = new AlphaAnimation(1, 1);
                a = new AlphaAnimation(1, 0);
                a.setDuration(duration);
            } else {
                float scaleW = thumbWidth / displayInfo.appWidth;
@@ -3435,7 +3436,7 @@ public class WindowManagerService extends IWindowManager.Stub
                        "applyAnimation: atoken=" + atoken
                        + " anim=" + a + " nextAppTransition=ANIM_CUSTOM"
                        + " transit=" + transit + " isEntrance=" + enter
                        + " Callers " + Debug.getCallers(3));
                        + " Callers=" + Debug.getCallers(3));
            } else if (mNextAppTransitionType == ActivityOptions.ANIM_SCALE_UP) {
                a = createScaleUpAnimationLocked(transit, enter);
                initialized = true;
@@ -3443,7 +3444,7 @@ public class WindowManagerService extends IWindowManager.Stub
                        "applyAnimation: atoken=" + atoken
                        + " anim=" + a + " nextAppTransition=ANIM_SCALE_UP"
                        + " transit=" + transit + " isEntrance=" + enter
                        + " Callers " + Debug.getCallers(3));
                        + " Callers=" + Debug.getCallers(3));
            } else if (mNextAppTransitionType == ActivityOptions.ANIM_THUMBNAIL_SCALE_UP ||
                    mNextAppTransitionType == ActivityOptions.ANIM_THUMBNAIL_SCALE_DOWN) {
                boolean scaleUp = (mNextAppTransitionType == ActivityOptions.ANIM_THUMBNAIL_SCALE_UP);
@@ -3454,7 +3455,7 @@ public class WindowManagerService extends IWindowManager.Stub
                    Slog.v(TAG, "applyAnimation: atoken=" + atoken
                            + " anim=" + a + " nextAppTransition=" + animName
                            + " transit=" + transit + " isEntrance=" + enter
                            + " Callers " + Debug.getCallers(3));
                            + " Callers=" + Debug.getCallers(3));
                }
            } else {
                int animAttr = 0;
@@ -3516,7 +3517,7 @@ public class WindowManagerService extends IWindowManager.Stub
                        + " anim=" + a
                        + " animAttr=0x" + Integer.toHexString(animAttr)
                        + " transit=" + transit + " isEntrance=" + enter
                        + " Callers " + Debug.getCallers(3));
                        + " Callers=" + Debug.getCallers(3));
            }
            if (a != null) {
                if (DEBUG_ANIM) {
@@ -4188,7 +4189,7 @@ public class WindowManagerService extends IWindowManager.Stub

        synchronized(mWindowMap) {
            if (DEBUG_STARTING_WINDOW) Slog.v(
                    TAG, "setAppStartingIcon: token=" + token + " pkg=" + pkg
                    TAG, "setAppStartingWindow: token=" + token + " pkg=" + pkg
                    + " transferFrom=" + transferFrom);

            AppWindowToken wtoken = findAppWindowToken(token);
@@ -4220,7 +4221,7 @@ public class WindowManagerService extends IWindowManager.Stub
                            mSkipAppTransitionAnimation = true;
                        }
                        if (DEBUG_STARTING_WINDOW) Slog.v(TAG,
                                "Moving existing starting from " + ttoken
                                "Moving existing starting " + startingWindow + " from " + ttoken
                                + " to " + wtoken);
                        final long origId = Binder.clearCallingIdentity();

@@ -4229,6 +4230,7 @@ public class WindowManagerService extends IWindowManager.Stub
                        wtoken.startingData = ttoken.startingData;
                        wtoken.startingView = ttoken.startingView;
                        wtoken.startingDisplayed = ttoken.startingDisplayed;
                        ttoken.startingDisplayed = false;
                        wtoken.startingWindow = startingWindow;
                        wtoken.reportedVisible = ttoken.reportedVisible;
                        ttoken.startingData = null;
@@ -4238,6 +4240,8 @@ 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);
                        }
@@ -4545,9 +4549,9 @@ public class WindowManagerService extends IWindowManager.Stub
                }
                wtoken.hiddenRequested = !visible;

                if (!wtoken.startingDisplayed) {
                    if (DEBUG_APP_TRANSITIONS) Slog.v(
                            TAG, "Setting dummy animation on: " + wtoken);
                if (!wtoken.startingDisplayed) {
                    wtoken.mAppAnimator.setDummyAnimation();
                }
                mOpeningApps.remove(wtoken);
@@ -8149,7 +8153,11 @@ public class WindowManagerService extends IWindowManager.Stub
                updateLayoutToAnimationLocked();
            }
            if (DEBUG_LAYERS) Slog.v(TAG, "Assign layer " + w + ": "
                    + winAnimator.mAnimLayer);
                    + "mBase=" + w.mBaseLayer
                    + " mLayer=" + w.mLayer
                    + (w.mAppToken == null ?
                            "" : " mAppLayer=" + w.mAppToken.mAppAnimator.animLayerAdjustment)
                    + " =mAnimLayer=" + winAnimator.mAnimLayer);
            //System.out.println(
            //    "Assigned layer " + curLayer + " to " + w.mClient.asBinder());
        }
@@ -8541,7 +8549,7 @@ public class WindowManagerService extends IWindowManager.Stub
                transit = WindowManagerPolicy.TRANSIT_WALLPAPER_CLOSE;
                if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
                        "New transit away from wallpaper: " + transit);
            } else if (mWallpaperTarget != null) {
            } else if (mWallpaperTarget != null && mWallpaperTarget.isVisibleLw()) {
                // We are transitioning from an activity without
                // a wallpaper to now showing the wallpaper
                transit = WindowManagerPolicy.TRANSIT_WALLPAPER_OPEN;
+2 −2
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ class WindowStateAnimator {
    final WindowState mWin;
    final WindowStateAnimator mAttachedWinAnimator;
    final WindowAnimator mAnimator;
    final AppWindowAnimator mAppAnimator;
    AppWindowAnimator mAppAnimator;
    final Session mSession;
    final WindowManagerPolicy mPolicy;
    final Context mContext;
@@ -1520,7 +1520,7 @@ class WindowStateAnimator {
                    "applyAnimation: win=" + this
                    + " anim=" + anim + " attr=0x" + Integer.toHexString(attr)
                    + " a=" + a
                    + " mAnimation=" + mAnimation
                    + " transit=" + transit
                    + " isEntrance=" + isEntrance + " Callers " + Debug.getCallers(3));
            if (a != null) {
                if (WindowManagerService.DEBUG_ANIM) {