Fix bug 1317754 - "Idle screen displays "Charging (100%)" even when fully charged."

This commit is contained in:
Joe Onorato
2009-07-06 14:58:50 -04:00
parent 0a88e648b5
commit f46d2db932

View File

@@ -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);