Convert battery framework provided package name to valid one

convert battery framework provided package name to formal one, since
some returned package name will append the process name to avoid
fetching app label and icon not found. for example:

Bug: 188751551
Test: make SettingsgRoboTests
Change-Id: If59167d575154f99eba2c7bd81a1d862652ea47b
This commit is contained in:
ykhung
2021-05-27 16:08:30 +08:00
parent 5b24943b06
commit 2098665e51
3 changed files with 39 additions and 16 deletions

View File

@@ -417,10 +417,6 @@ public class BatteryEntry {
}
final String uidString = Integer.toString(uid);
if (name == null) {
name = uidString;
}
if (icon == null) {
icon = pm.getDefaultActivityIcon();
}