Loading services/core/java/com/android/server/wm/ActivityMetricsLogger.java +4 −4 Original line number Diff line number Diff line Loading @@ -726,7 +726,7 @@ class ActivityMetricsLogger { // visible such as after the top task is finished. for (int i = mTransitionInfoList.size() - 2; i >= 0; i--) { final TransitionInfo prevInfo = mTransitionInfoList.get(i); if (prevInfo.mIsDrawn || !prevInfo.mLastLaunchedActivity.mVisibleRequested) { if (prevInfo.mIsDrawn || !prevInfo.mLastLaunchedActivity.isVisibleRequested()) { scheduleCheckActivityToBeDrawn(prevInfo.mLastLaunchedActivity, 0 /* delay */); } } Loading Loading @@ -851,7 +851,7 @@ class ActivityMetricsLogger { return; } if (DEBUG_METRICS) { Slog.i(TAG, "notifyVisibilityChanged " + r + " visible=" + r.mVisibleRequested Slog.i(TAG, "notifyVisibilityChanged " + r + " visible=" + r.isVisibleRequested() + " state=" + r.getState() + " finishing=" + r.finishing); } if (r.isState(ActivityRecord.State.RESUMED) && r.mDisplayContent.isSleeping()) { Loading @@ -860,7 +860,7 @@ class ActivityMetricsLogger { // the tracking of launch event. return; } if (!r.mVisibleRequested || r.finishing) { if (!r.isVisibleRequested() || r.finishing) { // Check if the tracker can be cancelled because the last launched activity may be // no longer visible. scheduleCheckActivityToBeDrawn(r, 0 /* delay */); Loading Loading @@ -893,7 +893,7 @@ class ActivityMetricsLogger { // activities in this task may be finished, invisible or drawn, so the transition event // should be cancelled. if (t != null && t.forAllActivities( a -> a.mVisibleRequested && !a.isReportedDrawn() && !a.finishing)) { a -> a.isVisibleRequested() && !a.isReportedDrawn() && !a.finishing)) { return; } Loading services/core/java/com/android/server/wm/ActivityRecord.java +6 −5 Original line number Diff line number Diff line Loading @@ -800,7 +800,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // it will sometimes be true a little earlier: when the activity record has // been shown, but is still waiting for its app transition to execute // before making its windows shown. boolean mVisibleRequested; private boolean mVisibleRequested; // Last visibility state we reported to the app token. boolean reportedVisible; Loading Loading @@ -3632,7 +3632,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // implied that the current finishing activity should be added into stopping list rather // than destroy immediately. final boolean isNextNotYetVisible = next != null && (!next.nowVisible || !next.mVisibleRequested); && (!next.nowVisible || !next.isVisibleRequested()); // Clear last paused activity to ensure top activity can be resumed during sleeping. if (isNextNotYetVisible && mDisplayContent.isSleeping() Loading Loading @@ -4450,7 +4450,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A void transferStartingWindowFromHiddenAboveTokenIfNeeded() { task.forAllActivities(fromActivity -> { if (fromActivity == this) return true; return !fromActivity.mVisibleRequested && transferStartingWindow(fromActivity); return !fromActivity.isVisibleRequested() && transferStartingWindow(fromActivity); }); } Loading Loading @@ -5115,7 +5115,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A * This is the only place that writes {@link #mVisibleRequested} (except unit test). The caller * outside of this class should use {@link #setVisibility}. */ private void setVisibleRequested(boolean visible) { @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) void setVisibleRequested(boolean visible) { if (visible == mVisibleRequested) { return; } Loading Loading @@ -6561,7 +6562,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (associatedTask == null) { removeStartingWindow(); } else if (associatedTask.getActivity( r -> r.mVisibleRequested && !r.firstWindowDrawn) == null) { r -> r.isVisibleRequested() && !r.firstWindowDrawn) == null) { // The last drawn activity may not be the one that owns the starting window. final ActivityRecord r = associatedTask.topActivityContainsStartingWindow(); if (r != null) { Loading services/core/java/com/android/server/wm/ActivityServiceConnectionsHolder.java +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public class ActivityServiceConnectionsHolder<T> { public boolean isActivityVisible() { synchronized (mService.mGlobalLock) { return mActivity.mVisibleRequested || mActivity.isState(RESUMED, PAUSING); return mActivity.isVisibleRequested() || mActivity.isState(RESUMED, PAUSING); } } Loading services/core/java/com/android/server/wm/ActivityStartController.java +1 −1 Original line number Diff line number Diff line Loading @@ -558,7 +558,7 @@ public class ActivityStartController { if (rootTask == null) return false; final RemoteTransition remote = options.getRemoteTransition(); final ActivityRecord r = rootTask.topRunningActivity(); if (r == null || r.mVisibleRequested || !r.attachedToProcess() || remote == null if (r == null || r.isVisibleRequested() || !r.attachedToProcess() || remote == null || !r.mActivityComponent.equals(intent.getComponent()) // Recents keeps invisible while device is locked. || r.mDisplayContent.isKeyguardLocked()) { Loading services/core/java/com/android/server/wm/ActivityStarter.java +1 −1 Original line number Diff line number Diff line Loading @@ -2928,7 +2928,7 @@ class ActivityStarter { // If the activity is visible in multi-windowing mode, it may already be on // the top (visible to user but not the global top), then the result code // should be START_DELIVERED_TO_TOP instead of START_TASK_TO_FRONT. final boolean wasTopOfVisibleRootTask = intentActivity.mVisibleRequested final boolean wasTopOfVisibleRootTask = intentActivity.isVisibleRequested() && intentActivity.inMultiWindowMode() && intentActivity == mTargetRootTask.topRunningActivity(); // We only want to move to the front, if we aren't going to launch on a Loading Loading
services/core/java/com/android/server/wm/ActivityMetricsLogger.java +4 −4 Original line number Diff line number Diff line Loading @@ -726,7 +726,7 @@ class ActivityMetricsLogger { // visible such as after the top task is finished. for (int i = mTransitionInfoList.size() - 2; i >= 0; i--) { final TransitionInfo prevInfo = mTransitionInfoList.get(i); if (prevInfo.mIsDrawn || !prevInfo.mLastLaunchedActivity.mVisibleRequested) { if (prevInfo.mIsDrawn || !prevInfo.mLastLaunchedActivity.isVisibleRequested()) { scheduleCheckActivityToBeDrawn(prevInfo.mLastLaunchedActivity, 0 /* delay */); } } Loading Loading @@ -851,7 +851,7 @@ class ActivityMetricsLogger { return; } if (DEBUG_METRICS) { Slog.i(TAG, "notifyVisibilityChanged " + r + " visible=" + r.mVisibleRequested Slog.i(TAG, "notifyVisibilityChanged " + r + " visible=" + r.isVisibleRequested() + " state=" + r.getState() + " finishing=" + r.finishing); } if (r.isState(ActivityRecord.State.RESUMED) && r.mDisplayContent.isSleeping()) { Loading @@ -860,7 +860,7 @@ class ActivityMetricsLogger { // the tracking of launch event. return; } if (!r.mVisibleRequested || r.finishing) { if (!r.isVisibleRequested() || r.finishing) { // Check if the tracker can be cancelled because the last launched activity may be // no longer visible. scheduleCheckActivityToBeDrawn(r, 0 /* delay */); Loading Loading @@ -893,7 +893,7 @@ class ActivityMetricsLogger { // activities in this task may be finished, invisible or drawn, so the transition event // should be cancelled. if (t != null && t.forAllActivities( a -> a.mVisibleRequested && !a.isReportedDrawn() && !a.finishing)) { a -> a.isVisibleRequested() && !a.isReportedDrawn() && !a.finishing)) { return; } Loading
services/core/java/com/android/server/wm/ActivityRecord.java +6 −5 Original line number Diff line number Diff line Loading @@ -800,7 +800,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // it will sometimes be true a little earlier: when the activity record has // been shown, but is still waiting for its app transition to execute // before making its windows shown. boolean mVisibleRequested; private boolean mVisibleRequested; // Last visibility state we reported to the app token. boolean reportedVisible; Loading Loading @@ -3632,7 +3632,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // implied that the current finishing activity should be added into stopping list rather // than destroy immediately. final boolean isNextNotYetVisible = next != null && (!next.nowVisible || !next.mVisibleRequested); && (!next.nowVisible || !next.isVisibleRequested()); // Clear last paused activity to ensure top activity can be resumed during sleeping. if (isNextNotYetVisible && mDisplayContent.isSleeping() Loading Loading @@ -4450,7 +4450,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A void transferStartingWindowFromHiddenAboveTokenIfNeeded() { task.forAllActivities(fromActivity -> { if (fromActivity == this) return true; return !fromActivity.mVisibleRequested && transferStartingWindow(fromActivity); return !fromActivity.isVisibleRequested() && transferStartingWindow(fromActivity); }); } Loading Loading @@ -5115,7 +5115,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A * This is the only place that writes {@link #mVisibleRequested} (except unit test). The caller * outside of this class should use {@link #setVisibility}. */ private void setVisibleRequested(boolean visible) { @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) void setVisibleRequested(boolean visible) { if (visible == mVisibleRequested) { return; } Loading Loading @@ -6561,7 +6562,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (associatedTask == null) { removeStartingWindow(); } else if (associatedTask.getActivity( r -> r.mVisibleRequested && !r.firstWindowDrawn) == null) { r -> r.isVisibleRequested() && !r.firstWindowDrawn) == null) { // The last drawn activity may not be the one that owns the starting window. final ActivityRecord r = associatedTask.topActivityContainsStartingWindow(); if (r != null) { Loading
services/core/java/com/android/server/wm/ActivityServiceConnectionsHolder.java +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ public class ActivityServiceConnectionsHolder<T> { public boolean isActivityVisible() { synchronized (mService.mGlobalLock) { return mActivity.mVisibleRequested || mActivity.isState(RESUMED, PAUSING); return mActivity.isVisibleRequested() || mActivity.isState(RESUMED, PAUSING); } } Loading
services/core/java/com/android/server/wm/ActivityStartController.java +1 −1 Original line number Diff line number Diff line Loading @@ -558,7 +558,7 @@ public class ActivityStartController { if (rootTask == null) return false; final RemoteTransition remote = options.getRemoteTransition(); final ActivityRecord r = rootTask.topRunningActivity(); if (r == null || r.mVisibleRequested || !r.attachedToProcess() || remote == null if (r == null || r.isVisibleRequested() || !r.attachedToProcess() || remote == null || !r.mActivityComponent.equals(intent.getComponent()) // Recents keeps invisible while device is locked. || r.mDisplayContent.isKeyguardLocked()) { Loading
services/core/java/com/android/server/wm/ActivityStarter.java +1 −1 Original line number Diff line number Diff line Loading @@ -2928,7 +2928,7 @@ class ActivityStarter { // If the activity is visible in multi-windowing mode, it may already be on // the top (visible to user but not the global top), then the result code // should be START_DELIVERED_TO_TOP instead of START_TASK_TO_FRONT. final boolean wasTopOfVisibleRootTask = intentActivity.mVisibleRequested final boolean wasTopOfVisibleRootTask = intentActivity.isVisibleRequested() && intentActivity.inMultiWindowMode() && intentActivity == mTargetRootTask.topRunningActivity(); // We only want to move to the front, if we aren't going to launch on a Loading