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

Commit 250101cd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix the NPE in the tryToFetchUsageData() method" into main

parents 18eac4ef 7ea9d158
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ public final class BatteryUsageBroadcastReceiver extends BroadcastReceiver {

    private void tryToFetchUsageData(Context context) {
        final Intent batteryIntent = BatteryUtils.getBatteryIntent(context);
        if (batteryIntent == null) {
            Log.w(TAG, "tryToFetchUsageData: ignore from null battery intent");
            return;
        }
        // Returns when battery is not fully charged.
        if (!BatteryStatus.isCharged(batteryIntent)) {
            return;