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

Commit 8cee482f authored by Alan Stokes's avatar Alan Stokes Committed by Android (Google) Code Review
Browse files

Merge "Allow second consecutive activity start." into qt-dev

parents 4aef4e57 ac9a1292
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ 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;
@@ -510,7 +511,14 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
                continue;
            }
            ActivityRecord topActivity = task.getTopActivity();
            if (topActivity != null && topActivity.visible) {
            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)) {
                return true;
            }
        }