summaryrefslogtreecommitdiffstats
path: root/keystore/java
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2013-03-20 11:36:50 -0700
committerKenny Root <kroot@google.com>2013-03-20 11:57:46 -0700
commitbd79419ef84ae31f3765721b50aa413fa462d1d1 (patch)
treed2eb8242f5a770452d7100d38b6c273aac242134 /keystore/java
parent78ad849163a7b01073b46fbd7d818392720005d1 (diff)
downloadframeworks_base-bd79419ef84ae31f3765721b50aa413fa462d1d1.zip
frameworks_base-bd79419ef84ae31f3765721b50aa413fa462d1d1.tar.gz
frameworks_base-bd79419ef84ae31f3765721b50aa413fa462d1d1.tar.bz2
KeyStore: add "migrate" command
To support the WiFi service, we need to support migration from the system UID to the wifi UID. This adds a command to achieve the migration. Bug: 8122243 Change-Id: I65f7a91504c1d2a2aac22b9c3051adffd28d66c1
Diffstat (limited to 'keystore/java')
-rw-r--r--keystore/java/android/security/KeyStore.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index 9000668..4dc0beb 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -287,6 +287,15 @@ public class KeyStore {
}
}
+ public boolean migrate(String key, int uid) {
+ try {
+ return mBinder.migrate(key, uid) == NO_ERROR;
+ } catch (RemoteException e) {
+ Log.w(TAG, "Cannot connect to keystore", e);
+ return false;
+ }
+ }
+
public int getLastError() {
return mError;
}