Fix uninstalled app original uid should not be 0
Context: some special packages have uid but 0. Those packages should not be part of uninstalled apps. Test: manual Bug: 264339271 Fix: 264339271 Change-Id: I86874691b0a837335c2e5352d1d0c6be8df8a2e4
This commit is contained in:
@@ -283,7 +283,9 @@ public class BatteryDiffEntry {
|
||||
/** Whether the current BatteryDiffEntry is uninstalled app or not. */
|
||||
public boolean isUninstalledEntry() {
|
||||
final String packageName = getPackageName();
|
||||
if (TextUtils.isEmpty(packageName) || isSystemEntry()) {
|
||||
if (TextUtils.isEmpty(packageName) || isSystemEntry()
|
||||
// Some special package UIDs could be 0. Those packages are not installed by users.
|
||||
|| mUid == BatteryUtils.UID_ZERO) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user