summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2013-04-08 16:05:00 -0700
committerKenny Root <kroot@google.com>2013-04-15 10:42:14 -0700
commitfc78e60a8321e624a49523c38932793af36cf9f8 (patch)
tree936016aa2144a77fc885fc204dd9dfa7dde5432d /services/java
parent68913baf72832226c0788bdba885e92e186cc2d8 (diff)
downloadframeworks_base-fc78e60a8321e624a49523c38932793af36cf9f8.zip
frameworks_base-fc78e60a8321e624a49523c38932793af36cf9f8.tar.gz
frameworks_base-fc78e60a8321e624a49523c38932793af36cf9f8.tar.bz2
Check outInfo is not null
Only call keystore if outInfo is not null (cherry picked from commit 3b9933d0c2f2b9a2e973dca296ee45a69087e31c) Bug: 8568820 Change-Id: I764980fd396dbc637732ad290eea2bd11036ec28
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/pm/PackageManagerService.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index c16f0ee..b039d41 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -8221,14 +8221,16 @@ public class PackageManagerService extends IPackageManager.Stub {
mSettings.writeLPr();
}
}
- // A user ID was deleted here. Go through all users and remove it from
- // KeyStore.
- final int appId = outInfo.removedAppId;
- if (appId != -1) {
- final KeyStore keyStore = KeyStore.getInstance();
- if (keyStore != null) {
- for (final int userId : sUserManager.getUserIds()) {
- keyStore.clearUid(UserHandle.getUid(userId, appId));
+ if (outInfo != null) {
+ // A user ID was deleted here. Go through all users and remove it
+ // from KeyStore.
+ final int appId = outInfo.removedAppId;
+ if (appId != -1) {
+ final KeyStore keyStore = KeyStore.getInstance();
+ if (keyStore != null) {
+ for (final int userId : sUserManager.getUserIds()) {
+ keyStore.clearUid(UserHandle.getUid(userId, appId));
+ }
}
}
}