diff options
author | Janis Danisevskis <jdanis@google.com> | 2021-06-14 14:33:10 -0700 |
---|---|---|
committer | Janis Danisevskis <jdanis@google.com> | 2021-06-30 09:45:54 -0700 |
commit | 191b20641036113ad9b5f637487fde581d87d178 (patch) | |
tree | 74e74ec4145f68bb48ad1efedbdce47fb3b92fbb /keystore/java | |
parent | 227707f1aaa688957187575b2fffd98172c213b2 (diff) |
Keystore 2.0: Renaming the vpnstore interface.
Renaming the vpnstore interface to legacykeystore.
Bug: 191373871
Test: TBD
Change-Id: Icd304ef621f0de52d6ebc415a0628d63f827fbcd
Diffstat (limited to 'keystore/java')
-rw-r--r-- | keystore/java/android/security/LegacyVpnProfileStore.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/keystore/java/android/security/LegacyVpnProfileStore.java b/keystore/java/android/security/LegacyVpnProfileStore.java index 1d2738e71311..c85b6b1efd9a 100644 --- a/keystore/java/android/security/LegacyVpnProfileStore.java +++ b/keystore/java/android/security/LegacyVpnProfileStore.java @@ -19,7 +19,7 @@ package android.security; import android.annotation.NonNull; import android.os.ServiceManager; import android.os.ServiceSpecificException; -import android.security.vpnprofilestore.IVpnProfileStore; +import android.security.legacykeystore.ILegacyKeystore; import android.util.Log; /** @@ -32,14 +32,14 @@ import android.util.Log; public class LegacyVpnProfileStore { private static final String TAG = "LegacyVpnProfileStore"; - public static final int SYSTEM_ERROR = IVpnProfileStore.ERROR_SYSTEM_ERROR; - public static final int PROFILE_NOT_FOUND = IVpnProfileStore.ERROR_PROFILE_NOT_FOUND; + public static final int SYSTEM_ERROR = ILegacyKeystore.ERROR_SYSTEM_ERROR; + public static final int PROFILE_NOT_FOUND = ILegacyKeystore.ERROR_ENTRY_NOT_FOUND; - private static final String VPN_PROFILE_STORE_SERVICE_NAME = "android.security.vpnprofilestore"; + private static final String LEGACY_KEYSTORE_SERVICE_NAME = "android.security.legacykeystore"; - private static IVpnProfileStore getService() { - return IVpnProfileStore.Stub.asInterface( - ServiceManager.checkService(VPN_PROFILE_STORE_SERVICE_NAME)); + private static ILegacyKeystore getService() { + return ILegacyKeystore.Stub.asInterface( + ServiceManager.checkService(LEGACY_KEYSTORE_SERVICE_NAME)); } /** @@ -52,7 +52,7 @@ public class LegacyVpnProfileStore { */ public static boolean put(@NonNull String alias, @NonNull byte[] profile) { try { - getService().put(alias, profile); + getService().put(alias, ILegacyKeystore.UID_SELF, profile); return true; } catch (Exception e) { Log.e(TAG, "Failed to put vpn profile.", e); @@ -71,7 +71,7 @@ public class LegacyVpnProfileStore { */ public static byte[] get(@NonNull String alias) { try { - return getService().get(alias); + return getService().get(alias, ILegacyKeystore.UID_SELF); } catch (ServiceSpecificException e) { if (e.errorCode != PROFILE_NOT_FOUND) { Log.e(TAG, "Failed to get vpn profile.", e); @@ -90,7 +90,7 @@ public class LegacyVpnProfileStore { */ public static boolean remove(@NonNull String alias) { try { - getService().remove(alias); + getService().remove(alias, ILegacyKeystore.UID_SELF); return true; } catch (ServiceSpecificException e) { if (e.errorCode != PROFILE_NOT_FOUND) { @@ -110,7 +110,7 @@ public class LegacyVpnProfileStore { */ public static @NonNull String[] list(@NonNull String prefix) { try { - final String[] aliases = getService().list(prefix); + final String[] aliases = getService().list(prefix, ILegacyKeystore.UID_SELF); for (int i = 0; i < aliases.length; ++i) { aliases[i] = aliases[i].substring(prefix.length()); } |