diff options
author | Jason parks <jparks@google.com> | 2011-01-05 11:56:42 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-05 11:56:42 -0800 |
commit | ac1325bcd394bdc8903b26e8593cc06753d79f29 (patch) | |
tree | e1e4fc40e4f7bc45ca2bcddf0747e2d32e320b0b /libs | |
parent | 3f476b34049d062942eafcf48396f593e00bd324 (diff) | |
parent | 5af0b916f850486cff4797355bf9e7dc3352fe00 (diff) | |
download | frameworks_base-ac1325bcd394bdc8903b26e8593cc06753d79f29.zip frameworks_base-ac1325bcd394bdc8903b26e8593cc06753d79f29.tar.gz frameworks_base-ac1325bcd394bdc8903b26e8593cc06753d79f29.tar.bz2 |
Merge "Add decryption support to MountService."
Diffstat (limited to 'libs')
-rw-r--r-- | libs/storage/IMountService.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/storage/IMountService.cpp b/libs/storage/IMountService.cpp index b5f9c47..a7ab824 100644 --- a/libs/storage/IMountService.cpp +++ b/libs/storage/IMountService.cpp @@ -48,6 +48,7 @@ enum { TRANSACTION_isObbMounted, TRANSACTION_getMountedObbPath, TRANSACTION_isExternalStorageEmulated, + TRANSACTION_decryptStorage, }; class BpMountService: public BpInterface<IMountService> @@ -504,6 +505,23 @@ public: path = reply.readString16(); return true; } + + int32_t decryptStorage(const String16& password) + { + Parcel data, reply; + data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); + data.writeString16(password); + if (remote()->transact(TRANSACTION_decryptStorage, data, &reply) != NO_ERROR) { + LOGD("decryptStorage could not contact remote\n"); + return -1; + } + int32_t err = reply.readExceptionCode(); + if (err < 0) { + LOGD("decryptStorage caught exception %d\n", err); + return err; + } + return reply.readInt32(); + } }; IMPLEMENT_META_INTERFACE(MountService, "IMountService"); |