diff options
Diffstat (limited to 'hardware_android.cc')
| -rw-r--r-- | hardware_android.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hardware_android.cc b/hardware_android.cc index 21d46595..9611ba68 100644 --- a/hardware_android.cc +++ b/hardware_android.cc @@ -192,6 +192,13 @@ int64_t HardwareAndroid::GetBuildTimestamp() const { return GetIntProperty<int64_t>(kPropBuildDateUTC, 0); } +// Returns true if the device runs an userdebug build, and explicitly allows OTA +// downgrade. +bool HardwareAndroid::AllowDowngrade() const { + return GetBoolProperty("ro.ota.allow_downgrade", false) && + GetBoolProperty("ro.debuggable", false); +} + bool HardwareAndroid::GetFirstActiveOmahaPingSent() const { LOG(WARNING) << "STUB: Assuming first active omaha was never set."; return false; |
