Make "Unmap Super Devices" option available to A-only devices
Change-Id: Ib3aed724b2e98f66387bdca240b0b4f719054594
(cherry picked from commit 2136fc5b91963fc21e782614ce6cfd55ca065eb9)
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 743e928..5aee83f 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -3573,7 +3573,9 @@
if ((*iter)->Is_Super) {
TWPartition *part = *iter;
std::string bare_partition_name = Get_Bare_Partition_Name((*iter)->Get_Mount_Point());
- std::string blk_device_partition = bare_partition_name + PartitionManager.Get_Active_Slot_Suffix();
+ std::string blk_device_partition = bare_partition_name;
+ if (DataManager::GetStrValue(TW_VIRTUAL_AB_ENABLED) == "1")
+ blk_device_partition.append(PartitionManager.Get_Active_Slot_Suffix());
(*iter)->UnMount(false);
LOGINFO("removing dynamic partition: %s\n", blk_device_partition.c_str());
destroyed = DestroyLogicalPartition(blk_device_partition);