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

Commit 70daf8fb authored by Daulet Zhanguzin's avatar Daulet Zhanguzin Committed by Tobias Thierer
Browse files

Replace com.android.internal.util.Preconditions.checkNotNull with

java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Exempt-From-Owner-Approval: Global refactoring.
Change-Id: I339dd11c694d4032141406441136b5e361749e51
parent 856ce4a1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import com.android.server.power.batterysaver.BatterySavingStats.DozeState;
import com.android.server.power.batterysaver.BatterySavingStats.InteractiveState;

import java.util.ArrayList;
import java.util.Objects;

/**
 * Responsible for battery saver mode transition logic.
@@ -237,7 +238,7 @@ public class BatterySaverController implements BatterySaverPolicyListener {
    private PowerManager getPowerManager() {
        if (mPowerManager == null) {
            mPowerManager =
                    Preconditions.checkNotNull(mContext.getSystemService(PowerManager.class));
                    Objects.requireNonNull(mContext.getSystemService(PowerManager.class));
        }
        return mPowerManager;
    }