Loading core/java/com/android/internal/util/ParcelableString.java 0 → 100644 +52 −0 Original line number Diff line number Diff line /* * Copyright 2014, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.internal.util; import android.os.Parcel; import android.os.Parcelable; /** * Helper class to adapt a simple String to cases where a Parcelable is expected. * @hide */ 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]; } }; } No newline at end of file keystore/java/android/security/IKeyChainService.aidl +7 −0 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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); Loading keystore/java/android/security/KeyChain.java +2 −1 Original line number Diff line number Diff line Loading @@ -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"); } Loading Loading
core/java/com/android/internal/util/ParcelableString.java 0 → 100644 +52 −0 Original line number Diff line number Diff line /* * Copyright 2014, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.internal.util; import android.os.Parcel; import android.os.Parcelable; /** * Helper class to adapt a simple String to cases where a Parcelable is expected. * @hide */ 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]; } }; } No newline at end of file
keystore/java/android/security/IKeyChainService.aidl +7 −0 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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); Loading
keystore/java/android/security/KeyChain.java +2 −1 Original line number Diff line number Diff line Loading @@ -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"); } Loading