Add "unaccounted" item to battery use UI.

Kind-of informative.

Change-Id: I10d2ee1ad8fe598a1ce1989df6628da11b82d906
This commit is contained in:
Dianne Hackborn
2014-01-13 17:40:50 -08:00
parent 5f37dda3d8
commit 5b6f59a072
4 changed files with 115 additions and 10 deletions

View File

@@ -67,7 +67,9 @@ public class PowerUsageDetail extends Fragment implements Button.OnClickListener
BLUETOOTH,
SCREEN,
APP,
USER
USER,
UNACCOUNTED,
OVERCOUNTED
}
// Note: Must match the sequence of the DrainType
@@ -80,6 +82,8 @@ public class PowerUsageDetail extends Fragment implements Button.OnClickListener
R.string.battery_desc_display,
R.string.battery_desc_apps,
R.string.battery_desc_users,
R.string.battery_desc_unaccounted,
R.string.battery_desc_overcounted,
};
public static final int ACTION_DISPLAY_SETTINGS = 1;
@@ -329,6 +333,12 @@ public class PowerUsageDetail extends Fragment implements Button.OnClickListener
final int percentage = (int) Math.floor(mValues[i]);
value = getActivity().getString(R.string.percentage, percentage);
break;
case R.string.usage_type_total_battery_capacity:
case R.string.usage_type_computed_power:
case R.string.usage_type_min_actual_power:
case R.string.usage_type_max_actual_power:
value = getActivity().getString(R.string.mah, (long)(mValues[i]));
break;
case R.string.usage_type_gps:
mUsesGps = true;
// Fall through