OSDN Git Service

Add property to prevent commit for Vts test
authorPaul Lawrence <paullawrence@google.com>
Wed, 12 Jun 2019 19:03:01 +0000 (12:03 -0700)
committerPaul Lawrence <paullawrence@google.com>
Thu, 13 Jun 2019 23:07:11 +0000 (16:07 -0700)
Old approach (do not start class main) does not work because when
testings userdebug GSI on user system, adb does not start until the
framework starts.

Bug: 134126407
Test: Test passes with userdebug GSI on user Taimen
Merged-in: I20441964dbc7b6ad5b445fa17a1374c1282bbbd8
Change-Id: I20441964dbc7b6ad5b445fa17a1374c1282bbbd8

Checkpoint.cpp

index ba9af11..8715bfa 100644 (file)
@@ -149,6 +149,11 @@ Status cp_commitChanges() {
     if (!isCheckpointing) {
         return Status::ok();
     }
+    if (android::base::GetProperty("persist.vold.dont_commit_checkpoint", "0") == "1") {
+        LOG(WARNING)
+            << "NOT COMMITTING CHECKPOINT BECAUSE persist.vold.dont_commit_checkpoint IS 1";
+        return Status::ok();
+    }
     sp<IBootControl> module = IBootControl::getService();
     if (module) {
         CommandResult cr;