diff options
| author | 2023-08-02 22:17:26 +0000 | |
|---|---|---|
| committer | 2023-08-02 22:17:26 +0000 | |
| commit | ea60247fd4eef3cfa321195db0bd3d7278edb26b (patch) | |
| tree | c9cd27a61c61777c110d72f7a4ced15a4c18ef2b /cmds/dumpstate/DumpstateUtil.cpp | |
| parent | 6f1dcd5a35ca21c65de973a827fef08cb6cdee6a (diff) | |
| parent | 7e2d1beb3cfa1b85f3e7ef7bedc5afa29ca83ee7 (diff) | |
Merge changes from topics "cherrypicker-L54100000962329329:N46400001393040350", "cherrypicker-L59600000962264727:N16700001392121090" into udc-d1-dev
* changes:
Update IsStrictRun to be framework-only
Add sysprop for identifying strict-run bugreports
Diffstat (limited to 'cmds/dumpstate/DumpstateUtil.cpp')
| -rw-r--r-- | cmds/dumpstate/DumpstateUtil.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cmds/dumpstate/DumpstateUtil.cpp b/cmds/dumpstate/DumpstateUtil.cpp index aa42541a66..484231225d 100644 --- a/cmds/dumpstate/DumpstateUtil.cpp +++ b/cmds/dumpstate/DumpstateUtil.cpp @@ -207,6 +207,9 @@ std::string PropertiesHelper::build_type_ = ""; int PropertiesHelper::dry_run_ = -1; int PropertiesHelper::unroot_ = -1; int PropertiesHelper::parallel_run_ = -1; +#if !defined(__ANDROID_VNDK__) +int PropertiesHelper::strict_run_ = -1; +#endif bool PropertiesHelper::IsUserBuild() { if (build_type_.empty()) { @@ -237,6 +240,16 @@ bool PropertiesHelper::IsParallelRun() { return parallel_run_ == 1; } +#if !defined(__ANDROID_VNDK__) +bool PropertiesHelper::IsStrictRun() { + if (strict_run_ == -1) { + // Defaults to using stricter timeouts. + strict_run_ = android::base::GetBoolProperty("dumpstate.strict_run", true) ? 1 : 0; + } + return strict_run_ == 1; +} +#endif + int DumpFileToFd(int out_fd, const std::string& title, const std::string& path) { android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(path.c_str(), O_RDONLY | O_NONBLOCK | O_CLOEXEC))); if (fd.get() < 0) { |