5G Non-Standalone (NSA)

Devices running Android 10 or higher can support 5G non-standalone (NSA). 5G NSA is a solution for 5G networks where the network is supported by the existing 4G infrastructure. On Android 10, devices can display a 5G icon on the status bar when a device connects to a 5G network.

Implementation

Carrier configuration

To configure how 5G icons are displayed on the status bar, carriers can use the KEY_5G_ICON_CONFIGURATION_STRING key in CarrierConfig.

These scenarios are available in 5G NSA:

  1. Device connected to 5G cell as the secondary cell and using millimeter wave.
  2. Device connected to 5G cell as the secondary cell but not using millimeter wave.
  3. Device camped on a network that has 5G capability (device doesn't have to be connected to a 5G cell as a secondary cell) and the use of 5G isn't restricted and radio resource control (RRC) is in the IDLE state (no connection).
  4. Device camped on a network that has 5G capability (device doesn't have to be connected to a 5G cell as a secondary cell) and the use of 5G isn't restricted and radio resource control (RRC) is in the CONNECTED state.
  5. Device camped on a network that has 5G capability (device doesn't have to be connected to a 5G cell as a secondary cell) but the use of 5G is restricted.

The configuration string contains multiple key-value pairs separated by commas. For each pair, the key and value are separated by a colon. The keys in the configuration string correspond to the 5G scenarios described above and must be one of the following:

  1. connected_mmwave
  2. connected
  3. not_restricted_rrc_idle
  4. not_restricted_rrc_con
  5. restricted

The values in the configuration string must be valid icon names that match the names of icons in the /packages/SettingsLib/res/ directory. Two default icons for 5G NSA are available: 5G and 5G_PLUS.

5G NSA icons

Figure 1. Default 5G and 5G_PLUS 5G icons

Display the 5G icons only for scenario 1 (connected_mmwave) and scenario 2 (connected), where the device has a true 5G connection. Use the 5G_PLUS icon for scenario 1 and the 5G icon for scenario 2. The following is an example of a configuration string in CarrierConfig.

connected_mmwave:5G_PLUS,connected:5G

System UI

To customize the icons that carriers can use for a specific status, add a MobileIconGroup object in TelephonyIcons.java. The icon name in MobileIconGroup must match the icon name used in CarrierConfig. The following shows an example of how to add a customized icon with the name "5G_PLUS" to MobileIconGroup.

static final MobileIconGroup NR_5G_PLUS = new MobileIconGroup(
            "5G_PLUS",
            null,
            null,
            AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,
            0,
            0,
            0,
            0,

AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
            R.string.data_connection_5g_plus,
            TelephonyIcons.ICON_5G_PLUS,
            true);

Validation

To validate your implementation, make sure a 5G icon is displayed on the status bar when the device is connected to a 5G cell.