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

Commit b4558e7e authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Update window always on convertTo/FromTranslucent" into lmp-dev

parents 6a08b8f9 85b764e2
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.graphics.drawable.ColorDrawable;
@@ -222,10 +223,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator {
            delayCancel();
            moveSharedElementsToOverlay();
            if (getDecor().getBackground() == null) {
                ColorDrawable black = new ColorDrawable(0xFF000000);
                black.setAlpha(0);
                getWindow().setBackgroundDrawable(black);
                black.setAlpha(255);
                getWindow().setBackgroundDrawable(new ColorDrawable(Color.BLACK));
            }
            ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(mActivity, this,
                    mAllSharedElementNames, resultCode, data);
+8 −10
Original line number Diff line number Diff line
@@ -10272,13 +10272,13 @@ public final class ActivityManagerService extends ActivityManagerNative
                if (r == null) {
                    return false;
                }
                if (r.changeWindowTranslucency(true)) {
                    mWindowManager.setAppFullscreen(token, true);
                final boolean translucentChanged = r.changeWindowTranslucency(true);
                if (translucentChanged) {
                    r.task.stack.releaseBackgroundResources();
                    mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
                    return true;
                }
                return false;
                mWindowManager.setAppFullscreen(token, true);
                return translucentChanged;
            }
        } finally {
            Binder.restoreCallingIdentity(origId);
@@ -10299,15 +10299,13 @@ public final class ActivityManagerService extends ActivityManagerNative
                    ActivityRecord under = r.task.mActivities.get(index - 1);
                    under.returningOptions = options;
                }
                if (r.changeWindowTranslucency(false)) {
                final boolean translucentChanged = r.changeWindowTranslucency(false);
                if (translucentChanged) {
                    r.task.stack.convertToTranslucent(r);
                    mWindowManager.setAppFullscreen(token, false);
                    mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
                    return true;
                } else {
                    mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
                    return false;
                }
                mWindowManager.setAppFullscreen(token, false);
                return translucentChanged;
            }
        } finally {
            Binder.restoreCallingIdentity(origId);
+1 −5
Original line number Diff line number Diff line
@@ -4306,11 +4306,7 @@ public class WindowManagerService extends IWindowManager.Stub
        AppWindowToken atoken = findAppWindowToken(token);
        if (atoken != null) {
            atoken.appFullscreen = toOpaque;
            // When making translucent, wait until windows below have been drawn.
            if (toOpaque) {
                // Making opaque so do it now.
                setWindowOpaque(token, true);
            }
            setWindowOpaque(token, toOpaque);
            requestTraversal();
        }
    }