Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14ea9efd authored by Hai Zhang's avatar Hai Zhang
Browse files

Add ApplicationInfo.isEncrpytionAware() as a system API.

applicationInfo.isDirectBootAware() ||
applicationInfo.isPartiallyDirectBootAware() was used by Settings
to determine whether to show a confirmation message for setting a
direct boot unaware app to be some default app (e.g. SMS). Since
we are moving default app into roles in PermissionController, we
need this as a system API.

Bug: 110557011
Bug: 122270890
Test: build
Change-Id: I8bfc2b4e07239b6b9b1b9948dede3748b6ae974c
parent 1bafe67c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1128,6 +1128,7 @@ package android.content {
package android.content.pm {

  public class ApplicationInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
    method public boolean isEncryptionAware();
    method public boolean isInstantApp();
    field public java.lang.String credentialProtectedDataDir;
    field public int targetSandboxVersion;
+9 −1
Original line number Diff line number Diff line
@@ -1866,7 +1866,15 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
        return (privateFlags & ApplicationInfo.PRIVATE_FLAG_DIRECT_BOOT_AWARE) != 0;
    }

    /** @hide */
    /**
     * Check whether the application is encryption aware.
     *
     * @see #isDirectBootAware()
     * @see #isPartiallyDirectBootAware()
     *
     * @hide
     */
    @SystemApi
    public boolean isEncryptionAware() {
        return isDirectBootAware() || isPartiallyDirectBootAware();
    }