summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJason parks <jparks@google.com>2011-01-05 11:56:42 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-05 11:56:42 -0800
commitac1325bcd394bdc8903b26e8593cc06753d79f29 (patch)
treee1e4fc40e4f7bc45ca2bcddf0747e2d32e320b0b /libs
parent3f476b34049d062942eafcf48396f593e00bd324 (diff)
parent5af0b916f850486cff4797355bf9e7dc3352fe00 (diff)
downloadframeworks_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.cpp18
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");