Don't spam the log when there's no mapped device.
am: 8c4d0088fa
Change-Id: Ie63da305fd16ac109af969c4f74e2988b21a05a2
diff --git a/dynamic_partition_control_android.cc b/dynamic_partition_control_android.cc
index d9d3be5..7f9c793 100644
--- a/dynamic_partition_control_android.cc
+++ b/dynamic_partition_control_android.cc
@@ -165,6 +165,9 @@
}
void DynamicPartitionControlAndroid::CleanupInternal(bool wait) {
+ if (mapped_devices_.empty()) {
+ return;
+ }
// UnmapPartitionOnDeviceMapper removes objects from mapped_devices_, hence
// a copy is needed for the loop.
std::set<std::string> mapped = mapped_devices_;