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

Commit 0bc7afcd authored by Jing Ji's avatar Jing Ji Committed by Automerger Merge Worker
Browse files

Merge "Fix the flaky sched group with the BIND_SCHEDULE_LIKE_TOP_APP" into...

Merge "Fix the flaky sched group with the BIND_SCHEDULE_LIKE_TOP_APP" into udc-qpr-dev am: 0d033113

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24709102



Change-Id: I4ad05dad623a004caad97d9e71225fbc52ef5387
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 265626ba 0d033113
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2513,9 +2513,7 @@ public class OomAdjuster {
                            }
                        }

                        if (schedGroup < SCHED_GROUP_TOP_APP
                                && cr.hasFlag(Context.BIND_SCHEDULE_LIKE_TOP_APP)
                                && clientIsSystem) {
                        if (cr.hasFlag(Context.BIND_SCHEDULE_LIKE_TOP_APP) && clientIsSystem) {
                            schedGroup = SCHED_GROUP_TOP_APP;
                            scheduleLikeTopApp = true;
                        }
+7 −0
Original line number Diff line number Diff line
@@ -1863,6 +1863,13 @@ public class MockingOomAdjusterTests {
        assertProcStates(app2, PROCESS_STATE_FOREGROUND_SERVICE, PERCEPTIBLE_APP_ADJ,
                SCHED_GROUP_DEFAULT);
        assertBfsl(app2);

        bindService(client2, app1, null, 0, mock(IBinder.class));
        bindService(app1, client2, null, 0, mock(IBinder.class));
        client2.mServices.setHasForegroundServices(false, 0, /* hasNoneType=*/false);
        updateOomAdj(app1, client1, client2);
        assertProcStates(app1, PROCESS_STATE_IMPORTANT_FOREGROUND, VISIBLE_APP_ADJ,
                SCHED_GROUP_TOP_APP);
    }

    @SuppressWarnings("GuardedBy")