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

Commit 86f533b4 authored by Tim Murray's avatar Tim Murray Committed by Android (Google) Code Review
Browse files

Merge "OomAdjuster: don't init AppCompactor in tests"

parents 4d177603 ed621cb7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -132,8 +132,11 @@ public final class OomAdjuster {
        mActiveUids = activeUids;

        mLocalPowerManager = LocalServices.getService(PowerManagerInternal.class);
        mAppCompact = new AppCompactor(mService);
        mConstants = mService.mConstants;
        // mConstants can be null under test, which causes AppCompactor to crash
        if (mConstants != null) {
            mAppCompact = new AppCompactor(mService);
        }
    }

    /**