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
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index 8e72e13..fa42fed 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -1729,23 +1729,6 @@
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)) {