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

Commit 2881630a authored by Craig Mautner's avatar Craig Mautner
Browse files

Reduce jank on incoming phone call during dream.

- Include dreams in the conditions that disable transition animations.
  This way there is no visibility of activities that are closing
  behind the keyguard when an activity that dismisses the keyguard
  starts up.

- Do not notify the keyguard mediator when the keyguard is dismissed
  because a dream is starting up. This keeps activities from resuming
  just because the keyguard is being dismissed.

Fixes bug 11064847.

Change-Id: I9d32fc96d518b1cdab511e187226a3cb889cf6d4
parent 619fc89a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -3509,7 +3509,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                            | FINISH_LAYOUT_REDO_CONFIG
                            | FINISH_LAYOUT_REDO_WALLPAPER;
                }
                if (!mShowingDream) {
                    mKeyguardDelegate.setHidden(true);
                }
            } else if (mDismissKeyguard != DISMISS_KEYGUARD_NONE) {
                // This is the case of keyguard isSecure() and not mHideLockScreen.
                if (mDismissKeyguard == DISMISS_KEYGUARD_START) {
@@ -3550,9 +3552,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    }

    public boolean allowAppAnimationsLw() {
        if (mKeyguard != null && mKeyguard.isVisibleLw() && !mKeyguard.isAnimatingLw()) {
            // If keyguard is currently visible, no reason to animate
            // behind it.
        if (mKeyguard != null && mKeyguard.isVisibleLw() || mShowingDream) {
            // If keyguard or dreams is currently visible, no reason to animate behind it.
            return false;
        }
        return true;
+4 −3
Original line number Diff line number Diff line
@@ -8520,6 +8520,8 @@ public class WindowManagerService extends IWindowManager.Stub
            // example, when this transition is being done behind
            // the lock screen.
            if (!mPolicy.allowAppAnimationsLw()) {
                if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
                        "Animations disallowed by keyguard or dream.");
                animLp = null;
            }

@@ -8562,8 +8564,7 @@ public class WindowManagerService extends IWindowManager.Stub
            NN = mClosingApps.size();
            for (i=0; i<NN; i++) {
                AppWindowToken wtoken = mClosingApps.get(i);
                if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
                        "Now closing app " + wtoken);
                if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Now closing app " + wtoken);
                wtoken.mAppAnimator.clearThumbnail();
                wtoken.inPendingTransaction = false;
                wtoken.mAppAnimator.animation = null;
+1 −1

File changed.

Contains only whitespace changes.