Add battery usage time summary to usage list item
Insert app foregound and background usage time information into the preference item summary based on the different scenarios. Bug: 177406865 Test: make SettingsRoboTests Test: make SettingsGoogleRoboTests Change-Id: I13ba357666adfb7b57f52ffae18d09aed8dd0773
This commit is contained in:
@@ -210,12 +210,17 @@ public class BatteryDiffEntry {
|
||||
packageManager.getApplicationInfo(packageName, /*no flags*/ 0);
|
||||
if (appInfo != null) {
|
||||
mAppLabel = packageManager.getApplicationLabel(appInfo).toString();
|
||||
mAppIcon = packageManager.getApplicationIcon(appInfo);
|
||||
}
|
||||
} catch (NameNotFoundException e) {
|
||||
Log.e(TAG, "failed to retrieve ApplicationInfo for: " + packageName);
|
||||
mAppLabel = packageName;
|
||||
}
|
||||
}
|
||||
// Early return if we found the app label and icon resource.
|
||||
if (mAppLabel != null && mAppIcon != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final int uid = (int) mBatteryHistEntry.mUid;
|
||||
final String[] packages = packageManager.getPackagesForUid(uid);
|
||||
|
Reference in New Issue
Block a user