AB mapAllPartitions no-op
the flag target_supports_snapshots comes from our update_metadata.proto
field snapshot_enabled. That flag controls whether or not our OTA
package has VAB enabled. In the case that it's not, we are falling back
on AB and thus this function should be a no-op
Bug: 399286371
Test: ota secondary payload on pixel device
Change-Id: I9fb3727db67b2e3803685c134f5ba1b535d0e2ae
diff --git a/aosp/dynamic_partition_control_android.cc b/aosp/dynamic_partition_control_android.cc
index d1c3bf2..ff8700c 100644
--- a/aosp/dynamic_partition_control_android.cc
+++ b/aosp/dynamic_partition_control_android.cc
@@ -1531,6 +1531,12 @@
}
bool DynamicPartitionControlAndroid::MapAllPartitions() {
+ // This flag tells us if VAB is enabled. In the case it's not (e.g. for
+ // secondary payloads) we are falling back on A/B and MapAllPartitions should
+ // just be a no-op
+ if (!target_supports_snapshot_) {
+ return true;
+ }
return snapshot_->MapAllSnapshots(kMapSnapshotTimeout);
}