Add toggle to allow or disable null algorithms

This adds the allow null algorithms toogle to the Settings UI.

If supported by the smartphone baseband, the toggle allows users to opt
out of null algorithms, unencrypted cellular communication, for all
cellular generations.

This toggle is behind a feature flag that is off by default. It also
requires radio network HAL 2.1 or later to show.

Co-authored-by: Gil Cukierman <cukie@google.com>
Bug: b/237529943
Test: atest NullAlgorithmsPreferenceControllerTest
Test: adb shell device_config put cellular_security
enable_null_cipher_toggle true; // On cuttlefish, you can now see the
toggle in SIM settings.

Change-Id: Ia03cceee5463171ca455fa0624b911e06f222d2d
This commit is contained in:
Dominik Maier
2022-10-18 19:42:34 +00:00
committed by Gil Cukierman
parent d9f2de7abb
commit 2f81c06361
4 changed files with 267 additions and 0 deletions

View File

@@ -11005,6 +11005,11 @@
<!-- Title for if toggle access is disabled by carrier [CHAR LIMIT=NONE] -->
<string name="enable_2g_summary_disabled_carrier"><xliff:g id="carrier_name_2g" example="Google Fi">%1$s</xliff:g> requires 2G to be available</string>
<!-- Title for toggle if user wants to allow null cellular algorithms [CHAR LIMIT=40] -->
<string name="allow_null_algorithms_title">Allow less secure connection</string>
<!-- Summary for if the user wants to allow null cellular algorithms [CHAR LIMIT=NONE] -->
<string name="allow_null_algorithms_summary">May improve your signal in some locations. For emergency calls, less secure connections are always allowed.</string>
<!-- Label for All services preference in App info settings [CHAR LIMIT=40] -->
<string name="app_info_all_services_label">All services</string>

View File

@@ -249,6 +249,13 @@
settings:useAdminDisabledSummary="true"
settings:userRestriction="no_cellular_2g"/>
<SwitchPreference
android:key="allow_null_algorithms"
android:title="@string/allow_null_algorithms_title"
android:summary="@string/allow_null_algorithms_summary"
settings:controller=
"com.android.settings.network.telephony.NullAlgorithmsPreferenceController" />
<SwitchPreference
android:key="nr_advanced_calling"
android:title="@string/nr_advanced_calling_title"