Loading core/java/android/os/storage/StorageManager.java +8 −4 Original line number Original line Diff line number Diff line Loading @@ -114,6 +114,8 @@ public class StorageManager { /** {@hide} */ /** {@hide} */ public static final int FLAG_INCLUDE_INVISIBLE = 1 << 10; public static final int FLAG_INCLUDE_INVISIBLE = 1 << 10; private static volatile IMountService sMountService = null; private final Context mContext; private final Context mContext; private final ContentResolver mResolver; private final ContentResolver mResolver; Loading Loading @@ -1064,15 +1066,17 @@ public class StorageManager { /** {@hide} */ /** {@hide} */ public static boolean isUserKeyUnlocked(int userId) { public static boolean isUserKeyUnlocked(int userId) { final IMountService mount = IMountService.Stub if (sMountService == null) { sMountService = IMountService.Stub .asInterface(ServiceManager.getService("mount")); .asInterface(ServiceManager.getService("mount")); if (mount == null) { } if (sMountService == null) { Slog.w(TAG, "Early during boot, assuming locked"); Slog.w(TAG, "Early during boot, assuming locked"); return false; return false; } } final long token = Binder.clearCallingIdentity(); final long token = Binder.clearCallingIdentity(); try { try { return mount.isUserKeyUnlocked(userId); return sMountService.isUserKeyUnlocked(userId); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); throw e.rethrowAsRuntimeException(); } finally { } finally { Loading Loading
core/java/android/os/storage/StorageManager.java +8 −4 Original line number Original line Diff line number Diff line Loading @@ -114,6 +114,8 @@ public class StorageManager { /** {@hide} */ /** {@hide} */ public static final int FLAG_INCLUDE_INVISIBLE = 1 << 10; public static final int FLAG_INCLUDE_INVISIBLE = 1 << 10; private static volatile IMountService sMountService = null; private final Context mContext; private final Context mContext; private final ContentResolver mResolver; private final ContentResolver mResolver; Loading Loading @@ -1064,15 +1066,17 @@ public class StorageManager { /** {@hide} */ /** {@hide} */ public static boolean isUserKeyUnlocked(int userId) { public static boolean isUserKeyUnlocked(int userId) { final IMountService mount = IMountService.Stub if (sMountService == null) { sMountService = IMountService.Stub .asInterface(ServiceManager.getService("mount")); .asInterface(ServiceManager.getService("mount")); if (mount == null) { } if (sMountService == null) { Slog.w(TAG, "Early during boot, assuming locked"); Slog.w(TAG, "Early during boot, assuming locked"); return false; return false; } } final long token = Binder.clearCallingIdentity(); final long token = Binder.clearCallingIdentity(); try { try { return mount.isUserKeyUnlocked(userId); return sMountService.isUserKeyUnlocked(userId); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); throw e.rethrowAsRuntimeException(); } finally { } finally { Loading