Merge "Stop using FDE-related constants from IVold" am: 489ba5ac07 am: 84f05b1b9c am: e1a9ca0ec8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031025 Change-Id: Ic411eb688afe449212dee247d2ecb39471c4314f
This commit is contained in:
@@ -175,27 +175,6 @@ public class LockscreenCredential implements Parcelable, AutoCloseable {
|
||||
return mCredential;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the credential type recognized by {@link StorageManager}. Can be one of
|
||||
* {@link StorageManager#CRYPT_TYPE_DEFAULT}, {@link StorageManager#CRYPT_TYPE_PATTERN},
|
||||
* {@link StorageManager#CRYPT_TYPE_PIN} or {@link StorageManager#CRYPT_TYPE_PASSWORD}.
|
||||
*/
|
||||
public int getStorageCryptType() {
|
||||
if (isNone()) {
|
||||
return StorageManager.CRYPT_TYPE_DEFAULT;
|
||||
}
|
||||
if (isPattern()) {
|
||||
return StorageManager.CRYPT_TYPE_PATTERN;
|
||||
}
|
||||
if (isPin()) {
|
||||
return StorageManager.CRYPT_TYPE_PIN;
|
||||
}
|
||||
if (isPassword()) {
|
||||
return StorageManager.CRYPT_TYPE_PASSWORD;
|
||||
}
|
||||
throw new IllegalStateException("Unhandled credential type");
|
||||
}
|
||||
|
||||
/** Returns whether this is an empty credential */
|
||||
public boolean isNone() {
|
||||
ensureNotZeroized();
|
||||
|
||||
Reference in New Issue
Block a user