Add an error message for debugging

Bug: 256205354
Test: atest CtsRollbackManagerTestCases
Change-Id: I4512ce63a586e94303679af0f565e9ccdff89177
This commit is contained in:
JW Wang
2022-11-02 10:41:59 +08:00
committed by Chun-Wei Wang
parent c9f364c06b
commit 20c384d176

View File

@@ -231,7 +231,12 @@ public class RescueParty {
String namespaceToReset = namespaceIt.next();
Properties properties = new Properties.Builder(namespaceToReset).build();
try {
DeviceConfig.setProperties(properties);
if (!DeviceConfig.setProperties(properties)) {
logCriticalInfo(Log.ERROR, "Failed to clear properties under "
+ namespaceToReset
+ ". Running `device_config get_sync_disabled_for_tests` will confirm"
+ " if config-bulk-update is enabled.");
}
} catch (DeviceConfig.BadConfigException exception) {
logCriticalInfo(Log.WARN, "namespace " + namespaceToReset
+ " is already banned, skip reset.");