Remove StorageManager#isUserKeyUnlocked()
StorageManager#isUserKeyUnlocked() is no longer used, since all callers
have switched to using StorageManager#isCeStorageUnlocked() which has a
clearer name. Therefore, remove StorageManager#isUserKeyUnlocked().
Note that isUserKeyUnlocked() is a @TestApi and isCeStorageUnlocked()
isn't. This is fine because no CTS tests call either method, so
@TestApi is unnecessary. And unlike regular APIs, Test APIs may be
added/changed/removed at any time. Of course, we can always add
@TestApi to isCeStorageUnlocked() later if it actually becomes needed.
Bug: 306204742
Test: build
Change-Id: Ibf7dcccf85bdc566941d6c401ca8ad3d19fd6fc1
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index d01706d..d189a59 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -2582,7 +2582,6 @@
method @NonNull public static String convert(@NonNull java.util.UUID);
method @Nullable public String getCloudMediaProvider();
method public boolean isAppIoBlocked(@NonNull java.util.UUID, int, int, int);
- method public static boolean isUserKeyUnlocked(int);
field public static final String CACHE_RESERVE_PERCENT_HIGH_KEY = "cache_reserve_percent_high";
field public static final String CACHE_RESERVE_PERCENT_LOW_KEY = "cache_reserve_percent_low";
field public static final String STORAGE_THRESHOLD_PERCENT_HIGH_KEY = "storage_threshold_percent_high";
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index eb1db3e..4c3f330 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -1669,12 +1669,6 @@
}
}
- /** {@hide} */
- @TestApi
- public static boolean isUserKeyUnlocked(int userId) {
- return isCeStorageUnlocked(userId);
- }
-
/**
* Returns true if the user's credential-encrypted (CE) storage is unlocked.
*