diff options
author | Scott Lobdell <slobdell@google.com> | 2021-04-07 05:35:55 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-04-07 05:35:55 +0000 |
commit | ec6cfacad7283c60a33cfefacf5031247a2f81dc (patch) | |
tree | 5b473e86fc8ab0afc2241b6ac25875b25fa354bd /fastboot/device/variables.cpp | |
parent | 79aff2b0a0653fcafaf9099ad60075f2903e8de1 (diff) | |
parent | 268fff7088f0ab311c2de902178054ce40a42243 (diff) |
Merge "Merge SP1A.210329.001" into s-keystone-qcom-dev
Diffstat (limited to 'fastboot/device/variables.cpp')
-rw-r--r-- | fastboot/device/variables.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fastboot/device/variables.cpp b/fastboot/device/variables.cpp index e7d8bc366..ee1eed876 100644 --- a/fastboot/device/variables.cpp +++ b/fastboot/device/variables.cpp @@ -33,6 +33,12 @@ #include "flashing.h" #include "utility.h" +#ifdef FB_ENABLE_FETCH +static constexpr bool kEnableFetch = true; +#else +static constexpr bool kEnableFetch = false; +#endif + using ::android::hardware::boot::V1_0::BoolResult; using ::android::hardware::boot::V1_0::Slot; using ::android::hardware::boot::V1_1::MergeStatus; @@ -509,3 +515,13 @@ bool GetTrebleEnabled(FastbootDevice* /* device */, const std::vector<std::strin *message = android::base::GetProperty("ro.treble.enabled", ""); return true; } + +bool GetMaxFetchSize(FastbootDevice* /* device */, const std::vector<std::string>& /* args */, + std::string* message) { + if (!kEnableFetch) { + *message = "fetch not supported on user builds"; + return false; + } + *message = android::base::StringPrintf("0x%X", kMaxFetchSizeDefault); + return true; +} |