Expand try/catch for DeviceConfig in AppOpsManager

Some apps, such as the shell, do not seem to be able to always access
the DeviceConfig, and get an NPE. Fail gracefully when this happens.

Test: manual
Fixes: 182907280
Change-Id: If4de34f2022c165ad8bf5a950c8a04cfd5abacc9
This commit is contained in:
Nate Myren
2021-03-17 10:03:59 -07:00
parent 8dc4ecd2c8
commit add3f1bdf1

View File

@@ -9138,7 +9138,7 @@ public class AppOpsManager {
try {
sFullLog = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
FULL_LOG, false);
} catch (SecurityException e) {
} catch (Exception e) {
// This should not happen, but it may, in rare cases
sFullLog = false;
}