Merge "Avoid unexpected turning screen on when top activity finishes" into udc-qpr-dev

This commit is contained in:
Louis Chang
2023-06-07 03:46:37 +00:00
committed by Android (Google) Code Review

View File

@@ -898,6 +898,11 @@ class ActivityStarter {
}
mLastStartReason = request.reason;
mLastStartActivityTimeMs = System.currentTimeMillis();
// Reset the ActivityRecord#mCurrentLaunchCanTurnScreenOn state of last start activity in
// case the state is not yet consumed during rapid activity launch.
if (mLastStartActivityRecord != null) {
mLastStartActivityRecord.setCurrentLaunchCanTurnScreenOn(false);
}
mLastStartActivityRecord = null;
final IApplicationThread caller = request.caller;