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

Commit ed621cb7 authored by Tim Murray's avatar Tim Murray
Browse files

OomAdjuster: don't init AppCompactor in tests

Test: FrameworksServicesTests:ActivityManagerInternalTest#testNotifyNetworkPolicyRulesUpdated
bug 123028785

Change-Id: I189fd4740edf9b901e0211de9bdf5fe32e7f1df6
parent bbcbc2c8
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);
        }
    }

    /**