Make "Unmap Super Devices" option available to A-only devices
Change-Id: Ib3aed724b2e98f66387bdca240b0b4f719054594
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index ebdada4..9cf5c99 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -3585,7 +3585,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);