Merge "Account for stopping activities when determining whether to restart" into rvc-dev am: 97b931681f

Change-Id: Iaca30c58a3393374fd90d88caa404059717ae9c9
This commit is contained in:
Winson Chung
2020-03-25 16:24:23 +00:00
committed by Automerger Merge Worker

View File

@@ -4618,6 +4618,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
} catch (Exception e) { } catch (Exception e) {
Slog.w(TAG, "Exception thrown sending start: " + intent.getComponent(), e); Slog.w(TAG, "Exception thrown sending start: " + intent.getComponent(), e);
} }
// The activity may be waiting for stop, but that is no longer appropriate if we are
// starting the activity again
mStackSupervisor.mStoppingActivities.remove(this);
} }
return false; return false;
} }
@@ -4667,7 +4670,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
* and {@link #shouldPauseActivity(ActivityRecord)}. * and {@link #shouldPauseActivity(ActivityRecord)}.
*/ */
private boolean shouldStartActivity() { private boolean shouldStartActivity() {
return mVisibleRequested && isState(STOPPED); return mVisibleRequested && (isState(STOPPED) || isState(STOPPING));
} }
/** /**