Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ef48c89 authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Fixes the touched activity not getting focus in AE" into udc-dev am: d7e96cf6

parents ee94a884 d7e96cf6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2008,7 +2008,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            return;
        }

        if (r.isState(RESUMED) && r == mRootWindowContainer.getTopResumedActivity()) {
        if ((touchedActivity == null || r == touchedActivity) && r.isState(RESUMED)
                && r == mRootWindowContainer.getTopResumedActivity()) {
            setLastResumedActivityUncheckLocked(r, "setFocusedTask-alreadyTop");
            return;
        }
+9 −0
Original line number Diff line number Diff line
@@ -586,6 +586,15 @@ public class TaskFragmentTest extends WindowTestsBase {
        // Making the activity0 be the focused activity and ensure the focused app is updated.
        activity0.moveFocusableActivityToTop("test");
        assertEquals(activity0, mDisplayContent.mFocusedApp);

        // Moving activity1 to top and make both the two activities resumed.
        activity1.moveFocusableActivityToTop("test");
        activity0.setState(RESUMED, "test");
        activity1.setState(RESUMED, "test");

        // Verifies that the focus app can be updated to an Activity in the adjacent TF
        mAtm.setFocusedTask(task.mTaskId, activity0);
        assertEquals(activity0, mDisplayContent.mFocusedApp);
    }

    @Test