OSDN Git Service

Move legacy full disk encryption code to Settings.
authorJim Miller <jaggies@google.com>
Sat, 4 Jun 2016 01:39:16 +0000 (18:39 -0700)
committerJim Miller <jaggies@google.com>
Sat, 4 Jun 2016 01:39:16 +0000 (18:39 -0700)
Fixes bug 27617297

Change-Id: I59455cc1fc46949348d2922834724ab40c14f886

core/java/com/android/internal/widget/LockPatternUtils.java

index 70941b6..9e8a25c 100644 (file)
@@ -904,23 +904,6 @@ public class LockPatternUtils {
     }
 
     /**
-     * Gets whether the device is encrypted.
-     *
-     * @return Whether the device is encrypted.
-     */
-    public static boolean isDeviceEncrypted() {
-        IMountService mountService = IMountService.Stub.asInterface(
-                ServiceManager.getService("mount"));
-        try {
-            return mountService.getEncryptionState() != IMountService.ENCRYPTION_STATE_NONE
-                    && mountService.getPasswordType() != StorageManager.CRYPT_TYPE_DEFAULT;
-        } catch (RemoteException re) {
-            Log.e(TAG, "Error getting encryption state", re);
-        }
-        return true;
-    }
-
-    /**
      * Determine if the device supports encryption, even if it's set to default. This
      * differs from isDeviceEncrypted() in that it returns true even if the device is
      * encrypted with the default password.