diff options
author | Robin Lee <rgl@google.com> | 2015-01-30 14:57:25 +0000 |
---|---|---|
committer | Robin Lee <rgl@google.com> | 2015-01-30 19:00:45 +0000 |
commit | 635426b0a7db8791bc62836921d3b2f22b36acea (patch) | |
tree | e51d6d674a697bfd5960636d54faa1d9a78a0045 | |
parent | ab84518009c53e28e021f27696cd4e51360fccbc (diff) | |
download | packages_apps_Settings-635426b0a7db8791bc62836921d3b2f22b36acea.zip packages_apps_Settings-635426b0a7db8791bc62836921d3b2f22b36acea.tar.gz packages_apps_Settings-635426b0a7db8791bc62836921d3b2f22b36acea.tar.bz2 |
Repair broken keychain wifi_uid logic
Check for cross-user installs was missing a short-circuit for installs
where no UID was specified. This is now added.
Bug: 19194391
Change-Id: I10aa8323b47e0fcabb59e7c30d677080bb80b976
-rw-r--r-- | src/com/android/settings/CredentialStorage.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/settings/CredentialStorage.java b/src/com/android/settings/CredentialStorage.java index 40bed90..60803dc 100644 --- a/src/com/android/settings/CredentialStorage.java +++ b/src/com/android/settings/CredentialStorage.java @@ -223,9 +223,9 @@ public final class CredentialStorage extends Activity { Bundle bundle = mInstallBundle; mInstallBundle = null; - final int uid = bundle.getInt(Credentials.EXTRA_INSTALL_AS_UID, -1); + final int uid = bundle.getInt(Credentials.EXTRA_INSTALL_AS_UID, KeyStore.UID_SELF); - if (!UserHandle.isSameUser(uid, Process.myUid())) { + if (uid != KeyStore.UID_SELF && !UserHandle.isSameUser(uid, Process.myUid())) { int dstUserId = UserHandle.getUserId(uid); int myUserId = UserHandle.myUserId(); |