Merge "Correct visible status of an activity if no more transition will happen" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
dd2f290170
@@ -80,6 +80,7 @@ import android.util.ArrayMap;
|
|||||||
import android.util.ArraySet;
|
import android.util.ArraySet;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
|
import android.view.Display;
|
||||||
import android.view.SurfaceControl;
|
import android.view.SurfaceControl;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
@@ -706,7 +707,11 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
|
|||||||
// remove the surfaces yet. If it is currently visible, but not expected-visible,
|
// 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
|
// then doing commitVisibility here would actually be out-of-order and leave the
|
||||||
// activity in a bad state.
|
// 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);
|
final boolean commitVisibility = !checkEnterPipOnFinish(ar);
|
||||||
// Avoid commit visibility if entering pip or else we will get a sudden
|
// Avoid commit visibility if entering pip or else we will get a sudden
|
||||||
// "flash" / surface going invisible for a split second.
|
// "flash" / surface going invisible for a split second.
|
||||||
|
|||||||
Reference in New Issue
Block a user