diff options
4 files changed, 42 insertions, 29 deletions
diff --git a/core/java/com/android/internal/util/ParcelableString.java b/core/java/com/android/internal/util/ParcelableString.java new file mode 100644 index 0000000..472ae86 --- /dev/null +++ b/core/java/com/android/internal/util/ParcelableString.java @@ -0,0 +1,32 @@ +package com.android.internal.util; + +import android.os.Parcel; +import android.os.Parcelable; + +public class ParcelableString implements Parcelable { + public String string; + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(string); + } + + public static final Parcelable.Creator<ParcelableString> CREATOR = + new Parcelable.Creator<ParcelableString>() { + @Override + public ParcelableString createFromParcel(Parcel in) { + ParcelableString ret = new ParcelableString(); + ret.string = in.readString(); + return ret; + } + @Override + public ParcelableString[] newArray(int size) { + return new ParcelableString[size]; + } + }; +} diff --git a/keystore/java/android/security/IKeyChainService.aidl b/keystore/java/android/security/IKeyChainService.aidl index 60fd7f7..a93891a 100644 --- a/keystore/java/android/security/IKeyChainService.aidl +++ b/keystore/java/android/security/IKeyChainService.aidl @@ -15,6 +15,8 @@ */ package android.security; +import android.content.pm.ParceledListSlice; + /** * Caller is required to ensure that {@link KeyStore#unlock * KeyStore.unlock} was successful. @@ -32,6 +34,11 @@ interface IKeyChainService { // APIs used by Settings boolean deleteCaCertificate(String alias); boolean reset(); + ParceledListSlice getUserCaAliases(); + ParceledListSlice getSystemCaAliases(); + boolean containsCaAlias(String alias); + byte[] getEncodedCaCertificate(String alias, boolean includeDeletedSystem); + List<String> getCaCertificateChainAliases(String rootAlias, boolean includeDeletedSystem); // APIs used by KeyChainActivity void setGrant(int uid, String alias, boolean value); diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java index 0da2b99..131e689 100644 --- a/keystore/java/android/security/KeyChain.java +++ b/keystore/java/android/security/KeyChain.java @@ -397,7 +397,8 @@ public final class KeyChain { return KeyStore.getInstance().isHardwareBacked(algorithm); } - private static X509Certificate toCertificate(byte[] bytes) { + /** @hide */ + public static X509Certificate toCertificate(byte[] bytes) { if (bytes == null) { throw new IllegalArgumentException("bytes == null"); } diff --git a/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java b/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java index b9b17eb..b3b013e 100644 --- a/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java +++ b/wifi/java/android/net/wifi/passpoint/WifiPasspointManager.java @@ -28,6 +28,7 @@ import android.os.RemoteException; import android.util.Log; import com.android.internal.util.AsyncChannel; +import com.android.internal.util.ParcelableString; import com.android.internal.util.Protocol; import java.util.ArrayList; @@ -351,34 +352,6 @@ public class WifiPasspointManager { } - public static class ParcelableString implements Parcelable { - public String string; - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel out, int flags) { - out.writeString(string); - } - - public static final Parcelable.Creator<ParcelableString> CREATOR = - new Parcelable.Creator<ParcelableString>() { - @Override - public ParcelableString createFromParcel(Parcel in) { - ParcelableString ret = new ParcelableString(); - ret.string = in.readString(); - return ret; - } - @Override - public ParcelableString[] newArray(int size) { - return new ParcelableString[size]; - } - }; - } - private static final int BASE = Protocol.BASE_WIFI_PASSPOINT_MANAGER; public static final int REQUEST_ANQP_INFO = BASE + 1; |