More sensible return code for Credentials.deleteAll
Was: result = True iff nDeleted != 0 Now: result = True iff nDeleted == nExisted The most common reason you'd want to delete all credentials under an alias is to be sure they no longer exist. The new contract gives a way to do this without multiple IPCs to the same service. Bug: 27335182 Change-Id: I8762b9b4fcc48037387dd805dbd0dbbe141d5b24
This commit is contained in:
@@ -183,7 +183,8 @@ public class KeyStore {
|
||||
|
||||
public boolean delete(String key, int uid) {
|
||||
try {
|
||||
return mBinder.del(key, uid) == NO_ERROR;
|
||||
int ret = mBinder.del(key, uid);
|
||||
return (ret == NO_ERROR || ret == KEY_NOT_FOUND);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Cannot connect to keystore", e);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user