battery usage UI: use a fallback name for unknown components
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
@@ -616,14 +616,10 @@ public class BatteryEntry {
|
||||
iconId = R.drawable.ic_settings_aod;
|
||||
break;
|
||||
default:
|
||||
Log.w(
|
||||
TAG,
|
||||
"unknown attribute:"
|
||||
+ DebugUtils.constantToString(
|
||||
BatteryConsumer.class,
|
||||
"POWER_COMPONENT_",
|
||||
powerComponentId));
|
||||
name = null;
|
||||
String fieldName = DebugUtils.constantToString(
|
||||
BatteryConsumer.class, "POWER_COMPONENT_", powerComponentId);
|
||||
Log.w(TAG, "unknown attribute:" + fieldName);
|
||||
name = context.getResources().getString(R.string.header_category_system) + " (" + fieldName + ")";
|
||||
iconId = R.drawable.ic_power_system;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user