diff options
Diffstat (limited to 'src/com/android/settings/BatteryInfo.java')
-rw-r--r-- | src/com/android/settings/BatteryInfo.java | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/com/android/settings/BatteryInfo.java b/src/com/android/settings/BatteryInfo.java index 3e037cf..d8046cf 100644 --- a/src/com/android/settings/BatteryInfo.java +++ b/src/com/android/settings/BatteryInfo.java @@ -90,26 +90,7 @@ public class BatteryInfo extends Activity { + getString(R.string.battery_info_temperature_units)); mTechnology.setText("" + intent.getStringExtra("technology")); - int status = intent.getIntExtra("status", BatteryManager.BATTERY_STATUS_UNKNOWN); - String statusString; - if (status == BatteryManager.BATTERY_STATUS_CHARGING) { - statusString = getString(R.string.battery_info_status_charging); - if (plugType > 0) { - statusString = statusString + " " + getString( - (plugType == BatteryManager.BATTERY_PLUGGED_AC) - ? R.string.battery_info_status_charging_ac - : R.string.battery_info_status_charging_usb); - } - } else if (status == BatteryManager.BATTERY_STATUS_DISCHARGING) { - statusString = getString(R.string.battery_info_status_discharging); - } else if (status == BatteryManager.BATTERY_STATUS_NOT_CHARGING) { - statusString = getString(R.string.battery_info_status_not_charging); - } else if (status == BatteryManager.BATTERY_STATUS_FULL) { - statusString = getString(R.string.battery_info_status_full); - } else { - statusString = getString(R.string.battery_info_status_unknown); - } - mStatus.setText(statusString); + mStatus.setText(Utils.getBatteryStatus(getResources(), intent)); switch (plugType) { case 0: |