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
This commit is contained in:
Kenny Root
2013-03-20 11:36:50 -07:00
parent 78ad849163
commit bd79419ef8
3 changed files with 63 additions and 0 deletions

View File

@@ -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;
}