Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9571a0d3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix redirect to Mobile security page" into main

parents d5d59630 5d8680e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");
+4 −0
Original line number Diff line number Diff line
@@ -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();