summaryrefslogtreecommitdiffstats
path: root/libs/storage/IMountService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/storage/IMountService.cpp')
-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");