updateConfigs() might throw during tests (3/n)

The callback might be run in-between setUp() and tearDown() when
the permission READ_DEVICE_CONFIG has been dropped and crash tests.

Bug: 178675924
Test: atest PackageWatchdogTest
Change-Id: Iefd31d08f71340706b64d84d44c41151b21193bf
This commit is contained in:
JW Wang
2021-01-29 17:51:41 +08:00
parent a6fedf6e26
commit 757da37e0b

View File

@@ -982,7 +982,11 @@ public class PackageWatchdog {
if (!DeviceConfig.NAMESPACE_ROLLBACK.equals(properties.getNamespace())) {
return;
}
updateConfigs();
try {
updateConfigs();
} catch (Exception ignore) {
Slog.w(TAG, "Failed to reload device config changes");
}
});
}