Loading services/core/java/com/android/server/wm/TaskFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -665,9 +665,11 @@ class TaskFragment extends WindowContainer<WindowContainer> { mResumedActivity = r; final ActivityRecord topResumed = mTaskSupervisor.updateTopResumedActivityIfNeeded(reason); if (mResumedActivity != null && topResumed != null && topResumed.isEmbedded() && topResumed.getTaskFragment().isAdjacentTo(this)) { && topResumed.getTaskFragment().isAdjacentTo(this) && topResumed.getTaskFragment().isPinned()) { // Explicitly updates the last resumed Activity if the resumed activity is // adjacent to the top-resumed embedded activity. // adjacent to the top-resumed embedded activity and the top-resumed TaskFragment is // pinned. mAtmService.setLastResumedActivityUncheckLocked(mResumedActivity, reason); } if (r == null && prevR.mDisplayContent != null Loading services/tests/wmtests/src/com/android/server/wm/TaskFragmentTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -1235,9 +1235,9 @@ public class TaskFragmentTest extends WindowTestsBase { taskFragmentRight.setResumedActivity(appRightTop, "test"); assertEquals(appRightTop, task.getDisplayContent().mFocusedApp); // Ensure the focused app is updated when the left activity resumed. // Ensure the focused app is NOT updated when the left activity resumed. taskFragmentLeft.setResumedActivity(appLeftTop, "test"); assertEquals(appLeftTop, task.getDisplayContent().mFocusedApp); assertEquals(appRightTop, task.getDisplayContent().mFocusedApp); } @Test Loading Loading
services/core/java/com/android/server/wm/TaskFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -665,9 +665,11 @@ class TaskFragment extends WindowContainer<WindowContainer> { mResumedActivity = r; final ActivityRecord topResumed = mTaskSupervisor.updateTopResumedActivityIfNeeded(reason); if (mResumedActivity != null && topResumed != null && topResumed.isEmbedded() && topResumed.getTaskFragment().isAdjacentTo(this)) { && topResumed.getTaskFragment().isAdjacentTo(this) && topResumed.getTaskFragment().isPinned()) { // Explicitly updates the last resumed Activity if the resumed activity is // adjacent to the top-resumed embedded activity. // adjacent to the top-resumed embedded activity and the top-resumed TaskFragment is // pinned. mAtmService.setLastResumedActivityUncheckLocked(mResumedActivity, reason); } if (r == null && prevR.mDisplayContent != null Loading
services/tests/wmtests/src/com/android/server/wm/TaskFragmentTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -1235,9 +1235,9 @@ public class TaskFragmentTest extends WindowTestsBase { taskFragmentRight.setResumedActivity(appRightTop, "test"); assertEquals(appRightTop, task.getDisplayContent().mFocusedApp); // Ensure the focused app is updated when the left activity resumed. // Ensure the focused app is NOT updated when the left activity resumed. taskFragmentLeft.setResumedActivity(appLeftTop, "test"); assertEquals(appLeftTop, task.getDisplayContent().mFocusedApp); assertEquals(appRightTop, task.getDisplayContent().mFocusedApp); } @Test Loading