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

Commit e442860c authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Correct visible status of an activity if no more transition will...

Merge "Correct visible status of an activity if no more transition will happen" into tm-qpr-dev am: dd2f2901 am: 9d387116

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19728398



Change-Id: I1099889cf50cf4403a4fd96af111241b768fa169
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7dcf414c 9d387116
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Slog;
import android.util.SparseArray;
import android.view.Display;
import android.view.SurfaceControl;
import android.view.WindowManager;
import android.window.RemoteTransition;
@@ -698,7 +699,11 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
                // remove the surfaces yet. If it is currently visible, but not expected-visible,
                // then doing commitVisibility here would actually be out-of-order and leave the
                // activity in a bad state.
                if (!visibleAtTransitionEnd && !ar.isVisibleRequested()) {
                // TODO (b/243755838) Create a screen off transition to correct the visible status
                // of activities.
                final boolean isScreenOff = ar.mDisplayContent == null
                        || ar.mDisplayContent.getDisplayInfo().state == Display.STATE_OFF;
                if ((!visibleAtTransitionEnd || isScreenOff) && !ar.isVisibleRequested()) {
                    final boolean commitVisibility = !checkEnterPipOnFinish(ar);
                    // Avoid commit visibility if entering pip or else we will get a sudden
                    // "flash" / surface going invisible for a split second.