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

Commit d5270898 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Clear idle state of destroyed activity" into main

parents b434d22c c2c4a32e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5890,6 +5890,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                    mAtmService.updateBatteryStats(this, false);
                }
                mAtmService.updateActivityUsageStats(this, Event.ACTIVITY_DESTROYED);
                idle = false;
                // Fall through.
            case DESTROYING:
                if (app != null && !app.hasActivities()) {
+2 −0
Original line number Diff line number Diff line
@@ -1723,10 +1723,12 @@ public class ActivityRecordTests extends WindowTestsBase {
    @Test
    public void testDestroyImmediately_hadApp_notFinishing() {
        final ActivityRecord activity = createActivityWithTask();
        activity.idle = true;
        activity.finishing = false;
        activity.destroyImmediately("test");

        assertEquals(DESTROYED, activity.getState());
        assertFalse(activity.idle);
    }

    /**