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

Commit 98f96b7d authored by Eric Biggers's avatar Eric Biggers
Browse files

StorageManager: remove old isFileEncrypted* methods

StorageManager#isFileEncryptedNativeOnly() and
StorageManager#isFileEncryptedNativeOrEmulated() are no longer used,
except for @UnsupportedAppUsage.  However, a clear public API equivalent
exists: StorageManager#isEncrypted(File) can be used to check whether
the device is encrypted.  Since Android 13, file encryption is the only
supported encryption type.  Therefore, these methods can be removed.

Bug: 232458753
Test: presubmit
Change-Id: I3f3707aa54821269201b05a0cdd2a2cdf23b0c9a
parent 0cb5a08b
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -1729,23 +1729,6 @@ public class StorageManager {
        return RoSystemProperties.CRYPTO_FILE_ENCRYPTED;
    }

    /** {@hide}
     * @deprecated Use {@link #isFileEncrypted} instead, since emulated FBE is no longer supported.
     */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @Deprecated
    public static boolean isFileEncryptedNativeOnly() {
        return isFileEncrypted();
    }

    /** {@hide}
     * @deprecated Use {@link #isFileEncrypted} instead, since emulated FBE is no longer supported.
     */
    @Deprecated
    public static boolean isFileEncryptedNativeOrEmulated() {
        return isFileEncrypted();
    }

    /** {@hide} */
    public static boolean hasAdoptable() {
        switch (SystemProperties.get(PROP_ADOPTABLE)) {