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

Commit d6afd39e authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Ensure Statusbar icon color is reset after predictive back

Bug: 309582913
Test: Manual, i.e. verifying cross task back animation and cross activity back animation on device
Change-Id: I89dafac90558f00451272ee86988213941b8a40c
parent ad960239
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -130,7 +130,14 @@ public class BackAnimationBackground {
                    mStartBounds);
            mCustomizer.customizeStatusBarAppearance(region);
        } else {
            mCustomizer.customizeStatusBarAppearance(null);
            resetStatusBarCustomization();
        }
    }

    /**
     * Resets the statusbar customization
     */
    public void resetStatusBarCustomization() {
        mCustomizer.customizeStatusBarAppearance(null);
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.view.RemoteAnimationTarget.MODE_OPENING;

import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY;
import static com.android.wm.shell.back.BackAnimationConstants.PROGRESS_COMMIT_THRESHOLD;
import static com.android.wm.shell.back.BackAnimationConstants.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BACK_PREVIEW;

import android.animation.Animator;
@@ -272,12 +273,16 @@ public class CrossActivityAnimation extends ShellBackAnimation {
        valueAnimator.addUpdateListener(animation -> {
            float progress = animation.getAnimatedFraction();
            updatePostCommitEnteringAnimation(progress);
            if (progress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD) {
                mBackground.resetStatusBarCustomization();
            }
            mTransaction.apply();
        });

        valueAnimator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                mBackground.resetStatusBarCustomization();
                finishAnimation();
            }
        });
+5 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.view.RemoteAnimationTarget.MODE_CLOSING;
import static android.view.RemoteAnimationTarget.MODE_OPENING;

import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_CROSS_TASK;
import static com.android.wm.shell.back.BackAnimationConstants.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BACK_PREVIEW;

import android.animation.Animator;
@@ -287,12 +288,16 @@ public class CrossTaskBackAnimation extends ShellBackAnimation {
            float progress = animation.getAnimatedFraction();
            updatePostCommitEnteringAnimation(progress);
            updatePostCommitClosingAnimation(progress);
            if (progress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD) {
                mBackground.resetStatusBarCustomization();
            }
            mTransaction.apply();
        });

        valueAnimator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                mBackground.resetStatusBarCustomization();
                finishAnimation();
            }
        });