summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Jeon <kevinjeon@google.com>2023-07-28 18:37:32 -0400
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-08-04 02:08:14 +0000
commitbff918000ee88fdd376d9a9b5c60924047c262c1 (patch)
treec9cd27a61c61777c110d72f7a4ced15a4c18ef2b
parent9d635641929acf81f6b4972dd19c35ee8dd8a89e (diff)
downloadnative-bff918000ee88fdd376d9a9b5c60924047c262c1.tar.gz
Update IsStrictRun to be framework-only
This change guards IsStrictRun using __ANDROID_VNDK__ to avoid needing to update the prebuilt ABI dumps in internal, since IsStrictRun is only needed in the framework and does not need to be made available to vendors. This avoids updating the API surface unnecessarily. Test: Cherry-pick this change to internal and verify that internal builds work without needing to update the prebuilt ABI dumps. Ignore-AOSP-First: This is already in AOSP, but needs to be cherry-picked here first before being removed from AOSP. Bug: 283326935 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7e2d1beb3cfa1b85f3e7ef7bedc5afa29ca83ee7) Merged-In: I9dfdf3306b6a9b0faa9f8f7871b1fc244bde1a97 Change-Id: I9dfdf3306b6a9b0faa9f8f7871b1fc244bde1a97
-rw-r--r--cmds/dumpstate/DumpstateUtil.cpp4
-rw-r--r--cmds/dumpstate/DumpstateUtil.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/cmds/dumpstate/DumpstateUtil.cpp b/cmds/dumpstate/DumpstateUtil.cpp
index 615701ccc1..484231225d 100644
--- a/cmds/dumpstate/DumpstateUtil.cpp
+++ b/cmds/dumpstate/DumpstateUtil.cpp
@@ -207,7 +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()) {
@@ -238,6 +240,7 @@ bool PropertiesHelper::IsParallelRun() {
return parallel_run_ == 1;
}
+#if !defined(__ANDROID_VNDK__)
bool PropertiesHelper::IsStrictRun() {
if (strict_run_ == -1) {
// Defaults to using stricter timeouts.
@@ -245,6 +248,7 @@ bool PropertiesHelper::IsStrictRun() {
}
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)));
diff --git a/cmds/dumpstate/DumpstateUtil.h b/cmds/dumpstate/DumpstateUtil.h
index 9e955e3c04..6049e3e19d 100644
--- a/cmds/dumpstate/DumpstateUtil.h
+++ b/cmds/dumpstate/DumpstateUtil.h
@@ -198,14 +198,18 @@ class PropertiesHelper {
* will default to true. This results in shortened timeouts for flaky
* sections.
*/
+#if !defined(__ANDROID_VNDK__)
static bool IsStrictRun();
+#endif
private:
static std::string build_type_;
static int dry_run_;
static int unroot_;
static int parallel_run_;
+#if !defined(__ANDROID_VNDK__)
static int strict_run_;
+#endif
};
/*