Loading src/com/android/settings/network/CellularSecurityPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public class CellularSecurityPreferenceController extends BasePreferenceControll return super.handlePreferenceTreeClick(preference); } boolean isSafetyCenterSupported = isSafetyCenterSupported(); if (isSafetyCenterSupported) { if (isSafetyCenterSupported && areNotificationsEnabled()) { Intent safetyCenterIntent = new Intent(Intent.ACTION_SAFETY_CENTER); safetyCenterIntent.putExtra(SafetyCenterManager.EXTRA_SAFETY_SOURCES_GROUP_ID, "AndroidCellularNetworkSecuritySources"); Loading tests/unit/src/com/android/settings/network/CellularSecurityPreferenceControllerTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,10 @@ public final class CellularSecurityPreferenceControllerTest { public void handlePreferenceTreeClick_safetyCenterSupported_shouldRedirectToSafetyCenter() { final ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class); doReturn(true).when(mTelephonyManager).isNullCipherNotificationsEnabled(); doReturn(true).when(mTelephonyManager) .isCellularIdentifierDisclosureNotificationsEnabled(); doReturn(true).when(mTelephonyManager).isNullCipherAndIntegrityPreferenceEnabled(); boolean prefHandled = mController.handlePreferenceTreeClick(mPreference); assertThat(prefHandled).isTrue(); Loading Loading
src/com/android/settings/network/CellularSecurityPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public class CellularSecurityPreferenceController extends BasePreferenceControll return super.handlePreferenceTreeClick(preference); } boolean isSafetyCenterSupported = isSafetyCenterSupported(); if (isSafetyCenterSupported) { if (isSafetyCenterSupported && areNotificationsEnabled()) { Intent safetyCenterIntent = new Intent(Intent.ACTION_SAFETY_CENTER); safetyCenterIntent.putExtra(SafetyCenterManager.EXTRA_SAFETY_SOURCES_GROUP_ID, "AndroidCellularNetworkSecuritySources"); Loading
tests/unit/src/com/android/settings/network/CellularSecurityPreferenceControllerTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,10 @@ public final class CellularSecurityPreferenceControllerTest { public void handlePreferenceTreeClick_safetyCenterSupported_shouldRedirectToSafetyCenter() { final ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class); doReturn(true).when(mTelephonyManager).isNullCipherNotificationsEnabled(); doReturn(true).when(mTelephonyManager) .isCellularIdentifierDisclosureNotificationsEnabled(); doReturn(true).when(mTelephonyManager).isNullCipherAndIntegrityPreferenceEnabled(); boolean prefHandled = mController.handlePreferenceTreeClick(mPreference); assertThat(prefHandled).isTrue(); Loading