From 13c7197da8a16f77f6398708a6314c80cb01e0d1 Mon Sep 17 00:00:00 2001 From: Ben Komalo Date: Wed, 7 Sep 2011 16:35:56 -0700 Subject: Revert encryption mapping for device wipes. External storage volumes that were emulated+encrypted needed to have their encryption mapping removed so that it doesn't try to encrypt the volume after formatting them. This just wires through an argument through vold, and assumes that vold will do the right thing even if there is no encryption mapping set. Bug: 5017638 Change-Id: I858fae3d12cb415bc34637f520f71220ad9daaad --- libs/storage/IMountService.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/storage') diff --git a/libs/storage/IMountService.cpp b/libs/storage/IMountService.cpp index 7fbf67a..8ddbeae 100644 --- a/libs/storage/IMountService.cpp +++ b/libs/storage/IMountService.cpp @@ -157,12 +157,13 @@ public: return reply.readInt32(); } - int32_t unmountVolume(const String16& mountPoint, const bool force) + int32_t unmountVolume(const String16& mountPoint, const bool force, const bool removeEncryption) { Parcel data, reply; data.writeInterfaceToken(IMountService::getInterfaceDescriptor()); data.writeString16(mountPoint); data.writeInt32(force ? 1 : 0); + data.writeInt32(removeEncryption ? 1 : 0); if (remote()->transact(TRANSACTION_unmountVolume, data, &reply) != NO_ERROR) { LOGD("unmountVolume could not contact remote\n"); return -1; -- cgit v1.1