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

Commit 7c77bd0e authored by Joe Onorato's avatar Joe Onorato Committed by Android Git Automerger
Browse files

am e193c468: Merge "Fix 3388705: Explicitly check for low battery level" into honeycomb

* commit 'e193c468':
  Fix 3388705: Explicitly check for low battery level
parents 5702e88b e193c468
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public class KeyguardUpdateMonitor {
    static private final String TAG = "KeyguardUpdateMonitor";
    static private final boolean DEBUG = false;

    private static final int LOW_BATTERY_THRESHOLD = 20;
    /* package */ static final int LOW_BATTERY_THRESHOLD = 20;

    private final Context mContext;

+5 −2
Original line number Diff line number Diff line
@@ -193,12 +193,15 @@ class StatusView {
                            mBatteryLevel));
                }
                mStatus1.setCompoundDrawablesWithIntrinsicBounds(CHARGING_ICON, 0, 0, 0);
            } else {
                mStatus1.setVisibility(View.VISIBLE);
            } else if (mBatteryLevel < KeyguardUpdateMonitor.LOW_BATTERY_THRESHOLD) {
                // Battery is low
                mStatus1.setText(getContext().getString(R.string.lockscreen_low_battery));
                mStatus1.setCompoundDrawablesWithIntrinsicBounds(BATTERY_LOW_ICON, 0, 0, 0);
            }
                mStatus1.setVisibility(View.VISIBLE);
            } else {
                mStatus1.setVisibility(View.INVISIBLE);
            }
        } else {
            // nothing specific to show; show help message and icon, if provided
            if (mHelpMessageId != 0) {