diff options
author | Christopher Tate <ctate@google.com> | 2011-10-10 13:51:12 -0700 |
---|---|---|
committer | Chris Tate <ctate@google.com> | 2011-10-13 17:39:48 -0700 |
commit | b9c1acfb0b4a41ffb5a4d9c38ef298c3a1eb9599 (patch) | |
tree | 9e435077590878bfb5cb714308fbef333738dfd1 /core/java/android/os | |
parent | ab9d5b11737f8a460467657035186bcfa7085eb9 (diff) | |
download | frameworks_base-b9c1acfb0b4a41ffb5a4d9c38ef298c3a1eb9599.zip frameworks_base-b9c1acfb0b4a41ffb5a4d9c38ef298c3a1eb9599.tar.gz frameworks_base-b9c1acfb0b4a41ffb5a4d9c38ef298c3a1eb9599.tar.bz2 |
DO NOT MERGE - Require device encryption password for adb backup/restore
This supersedes any backup-password that the user might supply. Per
design, the device encryption password is also always used to encrypt
the backup archive.
The CL introduces two new strings, used for prompting the user for
their device encryption password rather than their settings-defined
"backup password" when confirming a full backup or restore operation.
Bug 5382487
Change-Id: I278737927a4ecbb765bfb5ecfd28a4cb8dae52ef
Diffstat (limited to 'core/java/android/os')
-rw-r--r-- | core/java/android/os/storage/IMountService.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core/java/android/os/storage/IMountService.java b/core/java/android/os/storage/IMountService.java index d1dc6e5..0640d7e 100644 --- a/core/java/android/os/storage/IMountService.java +++ b/core/java/android/os/storage/IMountService.java @@ -658,6 +658,24 @@ public interface IMountService extends IInterface { return _result; } + @Override + public int verifyEncryptionPassword(String password) throws RemoteException { + Parcel _data = Parcel.obtain(); + Parcel _reply = Parcel.obtain(); + int _result; + try { + _data.writeInterfaceToken(DESCRIPTOR); + _data.writeString(password); + mRemote.transact(Stub.TRANSACTION_verifyEncryptionPassword, _data, _reply, 0); + _reply.readException(); + _result = _reply.readInt(); + } finally { + _reply.recycle(); + _data.recycle(); + } + return _result; + } + public Parcelable[] getVolumeList() throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); @@ -761,6 +779,8 @@ public interface IMountService extends IInterface { static final int TRANSACTION_getEncryptionState = IBinder.FIRST_CALL_TRANSACTION + 31; + static final int TRANSACTION_verifyEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 32; + /** * Cast an IBinder object into an IMountService interface, generating a * proxy if needed. @@ -1286,6 +1306,12 @@ public interface IMountService extends IInterface { public int changeEncryptionPassword(String password) throws RemoteException; /** + * Verify the encryption password against the stored volume. This method + * may only be called by the system process. + */ + public int verifyEncryptionPassword(String password) throws RemoteException; + + /** * Returns list of all mountable volumes. */ public Parcelable[] getVolumeList() throws RemoteException; |