Don't spam the log when there's no mapped device. am: 8c4d0088fa
am: c75bafd1a4
Change-Id: Ic64f562f0e3e254f11b2489c83ad7d3efce83f86
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_;