Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eab62566 authored by Eran Messeri's avatar Eran Messeri
Browse files

KeyStore: Remove duplicate method

Remove the duplicate() method from KeyStore.
It is backed by dead code in the Keystore service, which (as far as I
can tell) is not doing the right thing.

Previous conversations with Keystore team members suggested this API
should not be used and it is marked for removal in the Keystore service.

Bug: 72037261
Test: That it compiles.
Change-Id: I7f8af95473c876340cbd5c73dd88c5d0282897b3
parent 2bb44413
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ interface IKeystoreService {
    String grant(String name, int granteeUid);
    int ungrant(String name, int granteeUid);
    long getmtime(String name, int uid);
    int duplicate(String srcKey, int srcUid, String destKey, int destUid);
    int is_hardware_backed(String string);
    int clear_uid(long uid);

+0 −9
Original line number Diff line number Diff line
@@ -424,15 +424,6 @@ public class KeyStore {
        return getmtime(key, UID_SELF);
    }

    public boolean duplicate(String srcKey, int srcUid, String destKey, int destUid) {
        try {
            return mBinder.duplicate(srcKey, srcUid, destKey, destUid) == NO_ERROR;
        } catch (RemoteException e) {
            Log.w(TAG, "Cannot connect to keystore", e);
            return false;
        }
    }

    // TODO: remove this when it's removed from Settings
    public boolean isHardwareBacked() {
        return isHardwareBacked("RSA");