public static class SigningCertificateLineage.SignerCapabilities.Builder
extends java.lang.Object
SigningCertificateLineage.SignerCapabilities instances.| Constructor and Description |
|---|
Builder()
Constructs a new
Builder. |
Builder(int flags)
Constructs a new
Builder with the initial capabilities set to the provided
flags. |
| Modifier and Type | Method and Description |
|---|---|
SigningCertificateLineage.SignerCapabilities |
build()
Returns a new
SignerConfig instance configured based on the configuration of
this builder. |
SigningCertificateLineage.SignerCapabilities.Builder |
setAuth(boolean enabled)
Set the
PAST_CERT_AUTH flag in this capabilities object. |
SigningCertificateLineage.SignerCapabilities.Builder |
setCallerConfiguredCapabilities(SigningCertificateLineage.SignerCapabilities capabilities)
Applies the capabilities that were explicitly set in the provided capabilities object
to this builder.
|
SigningCertificateLineage.SignerCapabilities.Builder |
setInstalledData(boolean enabled)
Set the
PAST_CERT_INSTALLED_DATA flag in this capabilities object. |
SigningCertificateLineage.SignerCapabilities.Builder |
setPermission(boolean enabled)
Set the
PAST_CERT_PERMISSION flag in this capabilities object. |
SigningCertificateLineage.SignerCapabilities.Builder |
setRollback(boolean enabled)
Set the
PAST_CERT_ROLLBACK flag in this capabilities object. |
SigningCertificateLineage.SignerCapabilities.Builder |
setSharedUid(boolean enabled)
Set the
PAST_CERT_SHARED_USER_ID flag in this capabilities object. |
public Builder()
Builder.public Builder(int flags)
Builder with the initial capabilities set to the provided
flags.public SigningCertificateLineage.SignerCapabilities.Builder setInstalledData(boolean enabled)
PAST_CERT_INSTALLED_DATA flag in this capabilities object. This flag
is used by the platform to determine if installed data associated with previous
signing certificate should be trusted. In particular, this capability is required to
perform signing certificate rotation during an upgrade on-device. Without it, the
platform will not permit the app data from the old signing certificate to
propagate to the new version. Typically, this flag should be set to enable signing
certificate rotation, and may be unset later when the app developer is satisfied that
their install base is as migrated as it will be.public SigningCertificateLineage.SignerCapabilities.Builder setSharedUid(boolean enabled)
PAST_CERT_SHARED_USER_ID flag in this capabilities object. This flag
is used by the platform to determine if this app is willing to be sharedUid with
other apps which are still signed with the associated signing certificate. This is
useful in situations where sharedUserId apps would like to change their signing
certificate, but can't guarantee the order of updates to those apps.public SigningCertificateLineage.SignerCapabilities.Builder setPermission(boolean enabled)
PAST_CERT_PERMISSION flag in this capabilities object. This flag
is used by the platform to determine if this app is willing to grant SIGNATURE
permissions to apps signed with the associated signing certificate. Without this
capability, an application signed with the older certificate will not be granted the
SIGNATURE permissions defined by this app. In addition, if multiple apps define the
same SIGNATURE permission, the second one the platform sees will not be installable
if this capability is not set and the signing certificates differ.public SigningCertificateLineage.SignerCapabilities.Builder setRollback(boolean enabled)
PAST_CERT_ROLLBACK flag in this capabilities object. This flag
is used by the platform to determine if this app is willing to upgrade to a new
version that is signed by one of its past signing certificates.
public SigningCertificateLineage.SignerCapabilities.Builder setAuth(boolean enabled)
PAST_CERT_AUTH flag in this capabilities object. This flag
is used by the platform to determine whether or not privileged access based on
authenticator module signing certificates should be granted.public SigningCertificateLineage.SignerCapabilities.Builder setCallerConfiguredCapabilities(SigningCertificateLineage.SignerCapabilities capabilities)
public SigningCertificateLineage.SignerCapabilities build()
SignerConfig instance configured based on the configuration of
this builder.