Return legacy value if error in new storage
Bug: 312235596 Test: m Change-Id: I46f670e565a2133e0e5eb2c157eb21a12a5ae7aa Ignore-AOSP-First: will test internally first then CP to AOSP
This commit is contained in:
@@ -134,6 +134,7 @@ namespace {cpp_namespace} \{
|
|||||||
if (read_from_new_storage_) \{
|
if (read_from_new_storage_) \{
|
||||||
if (!flag_value_file_) \{
|
if (!flag_value_file_) \{
|
||||||
ALOGI("error: failed to get flag {item.flag_name}: flag value file is null");
|
ALOGI("error: failed to get flag {item.flag_name}: flag value file is null");
|
||||||
|
return cache_[{item.readwrite_idx}];
|
||||||
}
|
}
|
||||||
|
|
||||||
auto value = aconfig_storage::get_boolean_flag_value(
|
auto value = aconfig_storage::get_boolean_flag_value(
|
||||||
@@ -142,6 +143,7 @@ namespace {cpp_namespace} \{
|
|||||||
|
|
||||||
if (!value.ok()) \{
|
if (!value.ok()) \{
|
||||||
ALOGI("error: failed to read flag value: %s", value.error().c_str());
|
ALOGI("error: failed to read flag value: %s", value.error().c_str());
|
||||||
|
return cache_[{item.readwrite_idx}];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool expected_value = cache_[{item.readwrite_idx}];
|
bool expected_value = cache_[{item.readwrite_idx}];
|
||||||
|
Reference in New Issue
Block a user