API: Make implicit APIs from type usage explicit
API stubs generation implicitly made any types used by an API also part
of that API. This has caused DeviceIdAttestationException and
ImsFeature.Capabilities to become implicit APIs, so they are added to
the API files.
After this, using non-API types in APIs will become an error to prevent
implicit APIs occuring in the future.
Bug: 119556446
Test: METALAVA_PREPEND_ARGS="--error ReferencesHidden" make
Exempt-From-Owner-Approval: Identical CL has been approved on other branch
Change-Id: I5fe4f20502b8d4e287b28e9f07139456d4191e22
Merged-In: I5fe4f20502b8d4e287b28e9f07139456d4191e22
(cherry picked from commit 8f91e5fde8
)
This commit is contained in:
@ -4327,6 +4327,11 @@ package android.security.keystore {
|
||||
field public static final int ID_TYPE_SERIAL = 1; // 0x1
|
||||
}
|
||||
|
||||
public class DeviceIdAttestationException extends java.lang.Exception {
|
||||
ctor public DeviceIdAttestationException(java.lang.String);
|
||||
ctor public DeviceIdAttestationException(java.lang.String, java.lang.Throwable);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.security.keystore.recovery {
|
||||
@ -6320,7 +6325,7 @@ package android.telephony.ims.feature {
|
||||
field public static final int PROCESS_CALL_IMS = 0; // 0x0
|
||||
}
|
||||
|
||||
public static class MmTelFeature.MmTelCapabilities {
|
||||
public static class MmTelFeature.MmTelCapabilities extends android.telephony.ims.feature.ImsFeature.Capabilities {
|
||||
ctor public MmTelFeature.MmTelCapabilities();
|
||||
ctor public deprecated MmTelFeature.MmTelCapabilities(android.telephony.ims.feature.ImsFeature.Capabilities);
|
||||
ctor public MmTelFeature.MmTelCapabilities(int);
|
||||
|
@ -800,6 +800,11 @@ package android.security.keystore {
|
||||
field public static final int ID_TYPE_SERIAL = 1; // 0x1
|
||||
}
|
||||
|
||||
public class DeviceIdAttestationException extends java.lang.Exception {
|
||||
ctor public DeviceIdAttestationException(java.lang.String);
|
||||
ctor public DeviceIdAttestationException(java.lang.String, java.lang.Throwable);
|
||||
}
|
||||
|
||||
public static final class KeyGenParameterSpec.Builder {
|
||||
method public android.security.keystore.KeyGenParameterSpec.Builder setUniqueIdIncluded(boolean);
|
||||
}
|
||||
|
@ -16,11 +16,16 @@
|
||||
|
||||
package android.security.keystore;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.TestApi;
|
||||
|
||||
/**
|
||||
* Thrown when {@link AttestationUtils} is unable to attest the given device ids.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@TestApi
|
||||
public class DeviceIdAttestationException extends Exception {
|
||||
/**
|
||||
* Constructs a new {@code DeviceIdAttestationException} with the current stack trace and the
|
||||
|
@ -211,12 +211,19 @@ public abstract class ImsFeature {
|
||||
* Contains the capabilities defined and supported by an ImsFeature in the form of a bit mask.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi // SystemApi only because it was leaked through type usage in a previous release.
|
||||
public static class Capabilities {
|
||||
protected int mCapabilities = 0;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public Capabilities() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
protected Capabilities(int capabilities) {
|
||||
mCapabilities = capabilities;
|
||||
}
|
||||
@ -224,6 +231,7 @@ public abstract class ImsFeature {
|
||||
/**
|
||||
* @param capabilities Capabilities to be added to the configuration in the form of a
|
||||
* bit mask.
|
||||
* @hide
|
||||
*/
|
||||
public void addCapabilities(int capabilities) {
|
||||
mCapabilities |= capabilities;
|
||||
@ -232,6 +240,7 @@ public abstract class ImsFeature {
|
||||
/**
|
||||
* @param capabilities Capabilities to be removed to the configuration in the form of a
|
||||
* bit mask.
|
||||
* @hide
|
||||
*/
|
||||
public void removeCapabilities(int capabilities) {
|
||||
mCapabilities &= ~capabilities;
|
||||
@ -239,6 +248,7 @@ public abstract class ImsFeature {
|
||||
|
||||
/**
|
||||
* @return true if all of the capabilities specified are capable.
|
||||
* @hide
|
||||
*/
|
||||
public boolean isCapable(int capabilities) {
|
||||
return (mCapabilities & capabilities) == capabilities;
|
||||
@ -246,6 +256,7 @@ public abstract class ImsFeature {
|
||||
|
||||
/**
|
||||
* @return a deep copy of the Capabilites.
|
||||
* @hide
|
||||
*/
|
||||
public Capabilities copy() {
|
||||
return new Capabilities(mCapabilities);
|
||||
@ -253,6 +264,7 @@ public abstract class ImsFeature {
|
||||
|
||||
/**
|
||||
* @return a bitmask containing the capability flags directly.
|
||||
* @hide
|
||||
*/
|
||||
public int getMask() {
|
||||
return mCapabilities;
|
||||
|
Reference in New Issue
Block a user