Merge "Handle IllegalStateExceptions in CellularSecurityPreferenceController" into main
diff --git a/src/com/android/settings/network/CellularSecurityPreferenceController.java b/src/com/android/settings/network/CellularSecurityPreferenceController.java
index f43805e..0b0c2a7 100644
--- a/src/com/android/settings/network/CellularSecurityPreferenceController.java
+++ b/src/com/android/settings/network/CellularSecurityPreferenceController.java
@@ -88,10 +88,10 @@
} catch (UnsupportedOperationException e) {
Log.i(LOG_TAG, "Null cipher enablement is unsupported, hiding divider: "
+ e.getMessage());
- } catch (Exception e) {
+ } catch (IllegalStateException e) {
Log.e(LOG_TAG,
"Failed isNullCipherAndIntegrityEnabled. Setting availability to "
- + "CONDITIONALLY_UNAVAILABLE. Exception: "
+ + "UNSUPPORTED_ON_DEVICE. Exception: "
+ e.getMessage());
}
@@ -104,6 +104,12 @@
} catch (UnsupportedOperationException e) {
Log.i(LOG_TAG, "Cellular security notifications are unsupported, hiding divider: "
+ e.getMessage());
+ } catch (IllegalStateException e) {
+ Log.e(LOG_TAG,
+ "Failed isNullCipherNotificationsEnabled, "
+ + "isCellularIdentifierDisclosureNotificationsEnabled. "
+ + "Setting availability to UNSUPPORTED_ON_DEVICE. Exception: "
+ + e.getMessage());
}
if (isNullCipherDisablementAvailable || areCellSecNotificationsAvailable) {