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

Commit 99c82fd1 authored by George Mount's avatar George Mount
Browse files

Additional fixes for "back" with translucent windows.

Ensure background is mutated before changing its alpha.
Ensure resetViews is called when activity options is set.

Bug 16215650

Change-Id: I8482532777652a93b2c0d05c1b902516d281baf0
parent 6906771d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ class ActivityTransitionState {
            mEnterActivityOptions = options;
            mIsEnterTriggered = false;
            if (mEnterActivityOptions.isReturning()) {
                restoreExitedViews();
                int result = mEnterActivityOptions.getResultCode();
                if (result != 0) {
                    activity.onActivityReenter(result, mEnterActivityOptions.getResultData());
+1 −0
Original line number Diff line number Diff line
@@ -466,6 +466,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator {
            Drawable background = getDecor().getBackground();
            if (background != null) {
                background = background.mutate();
                getWindow().setBackgroundDrawable(background);
                mBackgroundAnimator = ObjectAnimator.ofInt(background, "alpha", 255);
                mBackgroundAnimator.setDuration(getFadeDuration());
                mBackgroundAnimator.addListener(new AnimatorListenerAdapter() {
+2 −0
Original line number Diff line number Diff line
@@ -259,6 +259,8 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
            ViewGroup decor = getDecor();
            Drawable background;
            if (decor != null && (background = decor.getBackground()) != null) {
                background = background.mutate();
                getWindow().setBackgroundDrawable(background);
                mBackgroundAnimator = ObjectAnimator.ofInt(background, "alpha", 0);
                mBackgroundAnimator.addListener(new AnimatorListenerAdapter() {
                    @Override