Added debugOtaKeyboxFallbackDuration property.
[ Cherry-pick of http://ag/16064434 ] [ Merge of http://go/wvgerrit/136330 ] This changes adds a custom debug property for changing the fallback policy used for the system. Depending on the value set, the device will either use a "fast" fallback (30 seconds) or "default" fallback (~1 day with exponential backoff). Setting this property to either "fast" or "default" will end the current fallback if it has been triggered. Bug: 187646550 Test: Android unit tests Change-Id: I5271f96139c1e468242f7fa742668cc791ffcf91
This commit is contained in:
@@ -1470,6 +1470,19 @@ Return<Status> WVDrmPlugin::setPropertyString(const hidl_string& propertyName,
|
||||
ALOGE("App requested unknown ATSC mode %s", _value.c_str());
|
||||
return Status::BAD_VALUE;
|
||||
}
|
||||
} else if (name == "debugOtaKeyboxFallbackDuration") {
|
||||
bool success = false;
|
||||
if (value == "default") {
|
||||
success = mCDM->SetDefaultOtaKeyboxFallbackDurationRules();
|
||||
} else if (value == "fast") {
|
||||
success = mCDM->SetFastOtaKeyboxFallbackDurationRules();
|
||||
} else {
|
||||
ALOGE("Unknown OTA fallback duration value %s", _value.c_str());
|
||||
return Status::BAD_VALUE;
|
||||
}
|
||||
if (!success) {
|
||||
return Status::ERROR_DRM_UNKNOWN;
|
||||
}
|
||||
} else {
|
||||
ALOGE("App set unknown string property %s", name.c_str());
|
||||
return Status::ERROR_DRM_CANNOT_HANDLE;
|
||||
|
||||
Reference in New Issue
Block a user