Loading services/core/java/com/android/server/wm/ActivityRecord.java +1 −2 Original line number Diff line number Diff line Loading @@ -2624,14 +2624,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // TODO(b/137329632): find the next activity directly underneath this one, not just anywhere final ActivityRecord next = getDisplay().topRunningActivity( true /* considerKeyguardState */); final boolean isVisible = mVisibleRequested || nowVisible; // isNextNotYetVisible is to check if the next activity is invisible, or it has been // requested to be invisible but its windows haven't reported as invisible. If so, it // 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); if (isVisible && isNextNotYetVisible) { if ((mVisibleRequested || isState(PAUSED)) && isNextNotYetVisible) { // Add this activity to the list of stopping activities. It will be processed and // destroyed when the next activity reports idle. addToStopping(false /* scheduleIdle */, false /* idleDelayed */, Loading services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -902,7 +902,7 @@ public class ActivityRecordTests extends ActivityTestsBase { topActivity.mVisibleRequested = false; topActivity.nowVisible = false; topActivity.finishing = true; topActivity.setState(PAUSED, "true"); topActivity.setState(STOPPED, "true"); // Mark the bottom activity as not visible, so that we would wait for it before removing // the top one. mActivity.mVisibleRequested = false; Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +1 −2 Original line number Diff line number Diff line Loading @@ -2624,14 +2624,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // TODO(b/137329632): find the next activity directly underneath this one, not just anywhere final ActivityRecord next = getDisplay().topRunningActivity( true /* considerKeyguardState */); final boolean isVisible = mVisibleRequested || nowVisible; // isNextNotYetVisible is to check if the next activity is invisible, or it has been // requested to be invisible but its windows haven't reported as invisible. If so, it // 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); if (isVisible && isNextNotYetVisible) { if ((mVisibleRequested || isState(PAUSED)) && isNextNotYetVisible) { // Add this activity to the list of stopping activities. It will be processed and // destroyed when the next activity reports idle. addToStopping(false /* scheduleIdle */, false /* idleDelayed */, Loading
services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +1 −1 Original line number Diff line number Diff line Loading @@ -902,7 +902,7 @@ public class ActivityRecordTests extends ActivityTestsBase { topActivity.mVisibleRequested = false; topActivity.nowVisible = false; topActivity.finishing = true; topActivity.setState(PAUSED, "true"); topActivity.setState(STOPPED, "true"); // Mark the bottom activity as not visible, so that we would wait for it before removing // the top one. mActivity.mVisibleRequested = false; Loading