Loading core/java/android/os/storage/StorageManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -939,4 +939,6 @@ public class StorageManager { public static final String OWNER_INFO_KEY = "OwnerInfo"; /** @hide */ public static final String PATTERN_VISIBLE_KEY = "PatternVisible"; /** @hide */ public static final String PASSWORD_VISIBLE_KEY = "PasswordVisible"; } core/java/com/android/internal/widget/LockPatternUtils.java +23 −0 Original line number Diff line number Diff line Loading @@ -956,6 +956,29 @@ public class LockPatternUtils { } } /** * Set whether the visible password is enabled for cryptkeeper screen. */ public void setVisiblePasswordEnabled(boolean enabled, int userId) { // Update for crypto if owner if (userId != UserHandle.USER_OWNER) { return; } IBinder service = ServiceManager.getService("mount"); if (service == null) { Log.e(TAG, "Could not find the mount service to update the user info"); return; } IMountService mountService = IMountService.Stub.asInterface(service); try { mountService.setField(StorageManager.PASSWORD_VISIBLE_KEY, enabled ? "1" : "0"); } catch (RemoteException e) { Log.e(TAG, "Error changing password visible state", e); } } /** * @return Whether tactile feedback for the pattern is enabled. */ Loading Loading
core/java/android/os/storage/StorageManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -939,4 +939,6 @@ public class StorageManager { public static final String OWNER_INFO_KEY = "OwnerInfo"; /** @hide */ public static final String PATTERN_VISIBLE_KEY = "PatternVisible"; /** @hide */ public static final String PASSWORD_VISIBLE_KEY = "PasswordVisible"; }
core/java/com/android/internal/widget/LockPatternUtils.java +23 −0 Original line number Diff line number Diff line Loading @@ -956,6 +956,29 @@ public class LockPatternUtils { } } /** * Set whether the visible password is enabled for cryptkeeper screen. */ public void setVisiblePasswordEnabled(boolean enabled, int userId) { // Update for crypto if owner if (userId != UserHandle.USER_OWNER) { return; } IBinder service = ServiceManager.getService("mount"); if (service == null) { Log.e(TAG, "Could not find the mount service to update the user info"); return; } IMountService mountService = IMountService.Stub.asInterface(service); try { mountService.setField(StorageManager.PASSWORD_VISIBLE_KEY, enabled ? "1" : "0"); } catch (RemoteException e) { Log.e(TAG, "Error changing password visible state", e); } } /** * @return Whether tactile feedback for the pattern is enabled. */ Loading