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

Commit 6aec1838 authored by Kevin Jeon's avatar Kevin Jeon Committed by Android (Google) Code Review
Browse files

Merge "Increase UI tier size from 5 to 10 apps" into main

parents 2874b274 1bae674c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1162,8 +1162,8 @@ public class OomAdjuster {
                    if (opt != null && opt.isFreezeExempt()) {
                        // BIND_WAIVE_PRIORITY and the like get oom_adj 900
                        targetAdj += 0;
                    } else if (state.hasShownUi() && uiTargetAdj < 15) {
                        // The most recent 5 apps that have shown UI get 910-914
                    } else if (state.hasShownUi() && uiTargetAdj < 20) {
                        // The most recent 10 apps that have shown UI get 910-919
                        targetAdj += uiTargetAdj++;
                    } else if ((state.getSetAdj() >= CACHED_APP_MIN_ADJ)
                            && (state.getLastStateTime()
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ public class MockingOomAdjusterTests {
            + ProcessList.CACHED_APP_IMPORTANCE_LEVELS;
    private static int sFirstUiCachedAdj = ProcessList.CACHED_APP_MIN_ADJ + 10;
    private static int sFirstNonUiCachedAdj = ProcessList.CACHED_APP_MIN_ADJ + 20;
    private static int sUiTierSize = 5;
    private static int sUiTierSize = 10;

    private Context mContext;
    private ProcessStateController mProcessStateController;