From e2c88d39b2c5b33d55c42230db7899202625a96a Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Thu, 28 Aug 2014 15:55:38 -0700 Subject: [PATCH] Add constants so we can distinguish decryption failures Bug: 17213613 Change-Id: I6bc10a1ed0855f6946ea9eb2f8d2db00c1af327c --- core/java/android/os/storage/IMountService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/java/android/os/storage/IMountService.java b/core/java/android/os/storage/IMountService.java index d1fadd67716bd..cf407f401844a 100644 --- a/core/java/android/os/storage/IMountService.java +++ b/core/java/android/os/storage/IMountService.java @@ -1518,10 +1518,14 @@ public interface IMountService extends IInterface { static final int ENCRYPTION_STATE_NONE = 1; /** The volume has been encrypted succesfully. */ static final int ENCRYPTION_STATE_OK = 0; - /** The volume is in a bad state. */ + /** The volume is in a bad state.*/ static final int ENCRYPTION_STATE_ERROR_UNKNOWN = -1; - /** The volume is in a bad state - partially encrypted. Data is likely irrecoverable. */ + /** Encryption is incomplete */ static final int ENCRYPTION_STATE_ERROR_INCOMPLETE = -2; + /** Encryption is incomplete and irrecoverable */ + static final int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3; + /** Underlying data is corrupt */ + static final int ENCRYPTION_STATE_ERROR_CORRUPT = -4; /** * Determines the encryption state of the volume.