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

Commit 15c10b51 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix b/284496479: Crash when opening App Info page" into udc-dev am:...

Merge "Fix b/284496479: Crash when opening App Info page" into udc-dev am: c8af2bdc am: 17a5594d am: 07d1c5d9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23451242



Change-Id: I3d03dbf4c06ca16debc1fd15a0b291a48a07b5b0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5df172f8 07d1c5d9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -196,6 +196,9 @@ public class BatteryStatus {

    /** Gets the battery level from the intent. */
    public static int getBatteryLevel(Intent batteryChangedIntent) {
        if (batteryChangedIntent == null) {
            return -1; /*invalid battery level*/
        }
        final int level = batteryChangedIntent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
        final int scale = batteryChangedIntent.getIntExtra(BatteryManager.EXTRA_SCALE, 0);
        return scale == 0