diff options
| author | Kenny Root <kroot@google.com> | 2013-04-08 16:05:00 -0700 |
|---|---|---|
| committer | Kenny Root <kroot@google.com> | 2013-04-08 16:06:24 -0700 |
| commit | 3b9933d0c2f2b9a2e973dca296ee45a69087e31c (patch) | |
| tree | 751ef32f4b792efc982c229c6e5bc1ff713a7031 | |
| parent | 50b9eb1c7375a87525d44a036337a8ba18eba55b (diff) | |
| download | frameworks_base-3b9933d0c2f2b9a2e973dca296ee45a69087e31c.zip frameworks_base-3b9933d0c2f2b9a2e973dca296ee45a69087e31c.tar.gz frameworks_base-3b9933d0c2f2b9a2e973dca296ee45a69087e31c.tar.bz2 | |
Check outInfo is not null
Only call keystore if outInfo is not null
Bug: 8568820
Change-Id: I24ab625ad02b8510da489911064453de642b6748
| -rw-r--r-- | services/java/com/android/server/pm/PackageManagerService.java | 18 |
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 ca7bba2..3d7dd63 100644 --- a/services/java/com/android/server/pm/PackageManagerService.java +++ b/services/java/com/android/server/pm/PackageManagerService.java @@ -8647,14 +8647,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)); + } } } } |
