diff options
author | Yifan Hong <elsk@google.com> | 2019-09-26 17:51:33 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2019-10-17 00:10:29 +0000 |
commit | f0f4a91d686b50aff2afdf2cabfec68fb6765d5a (patch) | |
tree | d931faab1edc041bc5d8e8dd5f93ff84136bdb0a /boot_control_android_unittest.cc | |
parent | 7a78d630e11532d6f854ba7d794362804b33c950 (diff) |
DynamicPartitionControl: only create snapshot when snapshot_enabled
Do not create snapshot when applying downgrade
to non-Virtual-A/B packages and secondary OTAs.
Test: apply downgrade OTA on Virtual A/B devices
Bug: 138733621 (secondary OTA)
Fixes: 138258570 (downgrades)
Change-Id: I13318f57613d6bd60a5b7e81ebb3e35b3c225a0c
Diffstat (limited to 'boot_control_android_unittest.cc')
-rw-r--r-- | boot_control_android_unittest.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/boot_control_android_unittest.cc b/boot_control_android_unittest.cc index f090de2f..e44af157 100644 --- a/boot_control_android_unittest.cc +++ b/boot_control_android_unittest.cc @@ -197,6 +197,9 @@ TEST_P(BootControlAndroidTestP, GetPartitionDeviceWhenResumingUpdate) { {T("system"), 2_GiB}, {T("vendor"), 1_GiB}}); + EXPECT_CALL(dynamicControl(), PreparePartitionsForUpdate(_, _, _, false)) + .WillOnce(Return(true)); + EXPECT_TRUE(PreparePartitionsForUpdate( target(), {{"system", 2_GiB}, {"vendor", 1_GiB}}, false)); |