Loading services/core/java/com/android/server/wm/ActivityStarter.java +13 −6 Original line number Diff line number Diff line Loading @@ -936,13 +936,8 @@ 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 ActivityRecord previousStart = mLastStartActivityRecord; final IApplicationThread caller = request.caller; Intent intent = request.intent; NeededUriGrants intentGrants = request.intentGrants; Loading Loading @@ -1370,6 +1365,18 @@ class ActivityStarter { request.outActivity[0] = mLastStartActivityRecord; } // Reset the ActivityRecord#mCurrentLaunchCanTurnScreenOn state of activity started // before this one if it is no longer the top-most focusable activity. // Doing so in case the state is not yet consumed during rapid activity launch. if (previousStart != null && !previousStart.finishing && previousStart.isAttached() && previousStart.currentLaunchCanTurnScreenOn()) { final ActivityRecord topFocusable = previousStart.getDisplayContent().getActivity( ar -> ar.isFocusable() && !ar.finishing); if (previousStart != topFocusable) { previousStart.setCurrentLaunchCanTurnScreenOn(false); } } return mLastStartActivityResult; } Loading Loading
services/core/java/com/android/server/wm/ActivityStarter.java +13 −6 Original line number Diff line number Diff line Loading @@ -936,13 +936,8 @@ 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 ActivityRecord previousStart = mLastStartActivityRecord; final IApplicationThread caller = request.caller; Intent intent = request.intent; NeededUriGrants intentGrants = request.intentGrants; Loading Loading @@ -1370,6 +1365,18 @@ class ActivityStarter { request.outActivity[0] = mLastStartActivityRecord; } // Reset the ActivityRecord#mCurrentLaunchCanTurnScreenOn state of activity started // before this one if it is no longer the top-most focusable activity. // Doing so in case the state is not yet consumed during rapid activity launch. if (previousStart != null && !previousStart.finishing && previousStart.isAttached() && previousStart.currentLaunchCanTurnScreenOn()) { final ActivityRecord topFocusable = previousStart.getDisplayContent().getActivity( ar -> ar.isFocusable() && !ar.finishing); if (previousStart != topFocusable) { previousStart.setCurrentLaunchCanTurnScreenOn(false); } } return mLastStartActivityResult; } Loading