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

Commit 0a252361 authored by Bernardo Rufino's avatar Bernardo Rufino Committed by Android (Google) Code Review
Browse files

Merge "Don't consider tasks with INITIALIZING top activity as visible" into qt-dev

parents 63c65616 7a294134
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import static android.view.Display.INVALID_DISPLAY;
import static com.android.server.am.ActivityManagerService.MY_PID;
import static com.android.server.wm.ActivityStack.ActivityState.DESTROYED;
import static com.android.server.wm.ActivityStack.ActivityState.DESTROYING;
import static com.android.server.wm.ActivityStack.ActivityState.INITIALIZING;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSED;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSING;
import static com.android.server.wm.ActivityStack.ActivityState.RESUMED;
@@ -546,14 +545,7 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
                continue;
            }
            ActivityRecord topActivity = task.getTopActivity();
            if (topActivity == null) {
                continue;
            }
            // If an activity has just been started it will not yet be visible, but
            // is expected to be soon. We treat this as if it were already visible.
            // This ensures a subsequent activity can be started even before this one
            // becomes visible.
            if (topActivity.visible || topActivity.isState(INITIALIZING)) {
            if (topActivity != null && topActivity.visible) {
                return true;
            }
        }