Loading services/core/java/com/android/server/wm/ActivityRecord.java +6 −1 Original line number Diff line number Diff line Loading @@ -1853,9 +1853,14 @@ final class ActivityRecord extends ConfigurationContainer { final ActivityRecord next = getDisplay().topRunningActivity( true /* considerKeyguardState */); final boolean isVisible = visible || 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.visible); final ActivityStack stack = getActivityStack(); final boolean notFocusedStack = stack != mRootActivityContainer.getTopDisplayFocusedStack(); if (isVisible && next != null && !next.nowVisible) { if (isVisible && isNextNotYetVisible) { addToStopping(false /* scheduleIdle */, false /* idleDelayed */, "completeFinishing"); if (DEBUG_STATES) { Loading services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +1 −0 Original line number Diff line number Diff line Loading @@ -1060,6 +1060,7 @@ public class ActivityRecordTests extends ActivityTestsBase { // simulates finishing in non-focused stack in split-screen. final ActivityStack stack = new StackBuilder(mRootActivityContainer).build(); stack.getChildAt(0).getChildAt(0).nowVisible = true; stack.getChildAt(0).getChildAt(0).visible = true; topActivity.completeFinishing("test"); Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +6 −1 Original line number Diff line number Diff line Loading @@ -1853,9 +1853,14 @@ final class ActivityRecord extends ConfigurationContainer { final ActivityRecord next = getDisplay().topRunningActivity( true /* considerKeyguardState */); final boolean isVisible = visible || 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.visible); final ActivityStack stack = getActivityStack(); final boolean notFocusedStack = stack != mRootActivityContainer.getTopDisplayFocusedStack(); if (isVisible && next != null && !next.nowVisible) { if (isVisible && isNextNotYetVisible) { addToStopping(false /* scheduleIdle */, false /* idleDelayed */, "completeFinishing"); if (DEBUG_STATES) { Loading
services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +1 −0 Original line number Diff line number Diff line Loading @@ -1060,6 +1060,7 @@ public class ActivityRecordTests extends ActivityTestsBase { // simulates finishing in non-focused stack in split-screen. final ActivityStack stack = new StackBuilder(mRootActivityContainer).build(); stack.getChildAt(0).getChildAt(0).nowVisible = true; stack.getChildAt(0).getChildAt(0).visible = true; topActivity.completeFinishing("test"); Loading