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;
|
iconId = R.drawable.ic_settings_aod;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log.w(
|
String fieldName = DebugUtils.constantToString(
|
||||||
TAG,
|
BatteryConsumer.class, "POWER_COMPONENT_", powerComponentId);
|
||||||
"unknown attribute:"
|
Log.w(TAG, "unknown attribute:" + fieldName);
|
||||||
+ DebugUtils.constantToString(
|
name = context.getResources().getString(R.string.header_category_system) + " (" + fieldName + ")";
|
||||||
BatteryConsumer.class,
|
|
||||||
"POWER_COMPONENT_",
|
|
||||||
powerComponentId));
|
|
||||||
name = null;
|
|
||||||
iconId = R.drawable.ic_power_system;
|
iconId = R.drawable.ic_power_system;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user