commit | f7ef12a569a4aefedb7f3740c75fdd5bbd24759d | [log] [tgz] |
---|---|---|
author | Kelvin Zhang <zhangkelvin@google.com> | Mon Mar 22 12:59:06 2021 -0400 |
committer | Kelvin Zhang <zhangkelvin@google.com> | Mon Mar 22 13:32:43 2021 -0400 |
tree | 5a8fdd879953a43d0fb9d1f158ef79df832f370e | |
parent | 7f92567d66f88212171ce528d2653802bc1788c1 [diff] [blame] |
Unmap all partitions after postinstall finishes If we don't unmap partitions, snapuserd will keep running in the background and do nothing. Unmap partitions so that memory associated with daemon can be freed. Test: th, apply an OTA, verify that _b partitions in /dev/block/mapper are gone Change-Id: I4a75f4abe3e69f9ad2a67a78472b61cfbd77b0eb Change-Id: Icacf1699a32bf045c2b832f7c1f021d90805d676
diff --git a/aosp/dynamic_partition_control_android.cc b/aosp/dynamic_partition_control_android.cc index 4220445..e1f86d8 100644 --- a/aosp/dynamic_partition_control_android.cc +++ b/aosp/dynamic_partition_control_android.cc
@@ -283,6 +283,7 @@ } bool DynamicPartitionControlAndroid::UnmapAllPartitions() { + snapshot_->UnmapAllSnapshots(); if (mapped_devices_.empty()) { return false; }