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

Commit df404a78 authored by kholoud mohamed's avatar kholoud mohamed
Browse files

Expose isUserKeyUnlocked as a TestAPI

This is needed to replace usage of the adb shell
command 'dumpsys mount' in some cts tests -to identify
if user key is locked- with a more reliable TestAPI

Bug: 173695151
Bug: 180328483
Test: N/A
Change-Id: Iebcc0080195b207f133e8d7186a098f39e137f42
parent e1891e1e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1614,6 +1614,7 @@ package android.os.storage {
  public class StorageManager {
    method @NonNull public static java.util.UUID convert(@NonNull String);
    method @NonNull public static String convert(@NonNull java.util.UUID);
    method public static boolean isUserKeyUnlocked(int);
  }

  public final class StorageVolume implements android.os.Parcelable {
+1 −0
Original line number Diff line number Diff line
@@ -1536,6 +1536,7 @@ public class StorageManager {
    }

    /** {@hide} */
    @TestApi
    public static boolean isUserKeyUnlocked(int userId) {
        if (sStorageManager == null) {
            sStorageManager = IStorageManager.Stub