Skip to content

Commit 433863b

Browse files
author
Dianne Hackborn
committed
Fix issue #3333958: Package Manager can sometimes mistakenly think...
...an app is disabled! Ouch. Change-Id: I5788c5f8edfe2a0d6f4f0f3359e1742f8ed8d98e
1 parent cd23823 commit 433863b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/java/android/content/pm/PackageParser.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3049,7 +3049,11 @@ public static ApplicationInfo generateApplicationInfo(Package p, int flags) {
30493049
if (!sCompatibilityModeEnabled) {
30503050
ai.disableCompatibilityMode();
30513051
}
3052-
ai.enabled = p.mSetEnabled == PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
3052+
if (p.mSetEnabled == PackageManager.COMPONENT_ENABLED_STATE_ENABLED) {
3053+
ai.enabled = true;
3054+
} else if (p.mSetEnabled == PackageManager.COMPONENT_ENABLED_STATE_DISABLED) {
3055+
ai.enabled = false;
3056+
}
30533057
return ai;
30543058
}
30553059

0 commit comments

Comments
 (0)