Fix bug 1317754 - "Idle screen displays "Charging (100%)" even when fully charged."
This commit is contained in:
@@ -279,8 +279,12 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
|
||||
|
||||
if (mPluggedIn) {
|
||||
mBatteryInfoIcon.setImageResource(R.drawable.ic_lock_idle_charging);
|
||||
mBatteryInfoText.setText(
|
||||
getContext().getString(R.string.lockscreen_plugged_in, mBatteryLevel));
|
||||
if (mBatteryLevel >= 100) {
|
||||
mBatteryInfoText.setText(R.string.lockscreen_charged);
|
||||
} else {
|
||||
mBatteryInfoText.setText(
|
||||
getContext().getString(R.string.lockscreen_plugged_in, mBatteryLevel));
|
||||
}
|
||||
} else {
|
||||
mBatteryInfoIcon.setImageResource(R.drawable.ic_lock_idle_low_battery);
|
||||
mBatteryInfoText.setText(R.string.lockscreen_low_battery);
|
||||
|
||||
Reference in New Issue
Block a user