From 3f1ce062d55628878dfe4d68094b5e4de951745e Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Wed, 12 Jun 2019 12:03:01 -0700 Subject: [PATCH] Add property to prevent commit for Vts test 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 Change-Id: I20441964dbc7b6ad5b445fa17a1374c1282bbbd8 --- Checkpoint.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Checkpoint.cpp b/Checkpoint.cpp index 19c1f3c..a3d78e7 100644 --- a/Checkpoint.cpp +++ b/Checkpoint.cpp @@ -139,6 +139,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 module = IBootControl::getService(); if (module) { CommandResult cr;