summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2013-04-01 15:59:59 -0700
committerKenny Root <kroot@google.com>2013-04-03 11:32:52 -0700
commitd72317abd79ddf95d48c8f35bf1070900ff55b5e (patch)
treed07ab26ca8e840bd98811223315bc2ad773e0418 /core/java
parent688c33448572fa3879b1486d8fa1bf16cd946211 (diff)
downloadframeworks_base-d72317abd79ddf95d48c8f35bf1070900ff55b5e.zip
frameworks_base-d72317abd79ddf95d48c8f35bf1070900ff55b5e.tar.gz
frameworks_base-d72317abd79ddf95d48c8f35bf1070900ff55b5e.tar.bz2
Remove keystore entries when package removed
Add a hook into PackageManagerService so that when app IDs are completely removed, we erase all entries from keystore for those UIDs that have gone away. (cherry picked from commit 95e3ee3971915b323e5c13dcfe3b12a4180850cd) Bug: 3020069 Change-Id: I374258ccc103f8cb3e238f2bf0d1afda0659db94
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/security/IKeystoreService.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/java/android/security/IKeystoreService.java b/core/java/android/security/IKeystoreService.java
index c365643..e1cc90e 100644
--- a/core/java/android/security/IKeystoreService.java
+++ b/core/java/android/security/IKeystoreService.java
@@ -444,6 +444,24 @@ public interface IKeystoreService extends IInterface {
}
return _result;
}
+
+ @Override
+ public int clear_uid(long uid) throws RemoteException {
+ Parcel _data = Parcel.obtain();
+ Parcel _reply = Parcel.obtain();
+ int _result;
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ _data.writeLong(uid);
+ mRemote.transact(Stub.TRANSACTION_clear_uid, _data, _reply, 0);
+ _reply.readException();
+ _result = _reply.readInt();
+ } finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ return _result;
+ }
}
private static final String DESCRIPTOR = "android.security.keystore";
@@ -470,6 +488,7 @@ public interface IKeystoreService extends IInterface {
static final int TRANSACTION_getmtime = IBinder.FIRST_CALL_TRANSACTION + 19;
static final int TRANSACTION_duplicate = IBinder.FIRST_CALL_TRANSACTION + 20;
static final int TRANSACTION_is_hardware_backed = IBinder.FIRST_CALL_TRANSACTION + 21;
+ static final int TRANSACTION_clear_uid = IBinder.FIRST_CALL_TRANSACTION + 22;
/**
* Cast an IBinder object into an IKeystoreService interface, generating
@@ -559,4 +578,6 @@ public interface IKeystoreService extends IInterface {
throws RemoteException;
public int is_hardware_backed() throws RemoteException;
+
+ public int clear_uid(long uid) throws RemoteException;
}