2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
5G 非スタンドアロン(NSA)
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android 10 以降のデバイスは、5G NSA(非スタンドアロン)に対応しています。5G NSA は、既存の 4G インフラストラクチャによってネットワークがサポートされた 5G ネットワーク用のソリューションです。Android 10 では、デバイスが 5G ネットワークに接続すると、ステータスバーに 5G アイコンが表示されます。
実装
携帯通信会社の設定
ステータスバーでの 5G アイコンの表示方法を設定する場合、携帯通信会社は CarrierConfig
にある KEY_5G_ICON_CONFIGURATION_STRING
キーを使用します。
5G NSA では以下のシナリオを利用できます。
- セカンダリセルとして 5G セルに接続し、ミリ波を使用するデバイス。
- セカンダリセルとして 5G セルに接続し、ミリ波を使用しないデバイス。
- 5G 機能を備えたネットワークにキャンプオンしており(5G セルにセカンダリセルとして接続している必要はない)、5G の使用が制限されておらず、無線リソース管理(RRC)の状態が
IDLE
(接続なし)のデバイス。
- 5G 機能を備えたネットワークにキャンプオンしており(5G セルにセカンダリセルとして接続している必要はない)、5G の使用が制限されておらず、無線リソース管理(RRC)の状態が
CONNECTED
のデバイス。
- 5G 機能を備えたネットワークにキャンプオンしているが(5G セルにセカンダリセルとして接続している必要はない)、5G の使用が制限されているデバイス。
設定文字列には、カンマで区切った複数の Key-Value ペアが含まれます。ペアごとにキーと値がコロンで区切られます。設定文字列のキーは、上記の 5G のシナリオに応じて次のいずれかが表示されます。
connected_mmwave
connected
not_restricted_rrc_idle
not_restricted_rrc_con
restricted
設定文字列の値には、/packages/SettingsLib/res/
ディレクトリ内のアイコンの名前と一致する有効なアイコン名を指定する必要があります。5G NSA には、デフォルトで 5G
と 5G_PLUS
という 2 つのアイコンが用意されています。
図 1. デフォルトの 5G アイコンと 5G_PLUS 5G アイコン
5G アイコンは、デバイスが実際に 5G 接続しているシナリオ 1(connected_mmwave
)とシナリオ 2(connected
)の場合にのみ表示します。シナリオ 1 の場合は 5G_PLUS
アイコンを、シナリオ 2 の場合は 5G
アイコンを使用します。以下に、CarrierConfig
での設定文字列の例を示します。
connected_mmwave:5G_PLUS,connected:5G
システム UI
携帯通信会社が特定のステータスに使用するアイコンをカスタマイズするには、MobileIconGroup
オブジェクトを TelephonyIcons.java
に追加します。MobileIconGroup
のアイコン名は、CarrierConfig
で使用するアイコン名と一致する必要があります。例として、カスタマイズした「5G_PLUS」という名前のアイコンを 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);
検証
アイコンが正しく実装されたことを検証するには、デバイスが 5G セルに接続した際にステータスバーに表示される 5G アイコンを確認します。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-03-26 UTC。"],[],[],null,["# 5G non-standalone (NSA)\n\nDevices running Android 10 or higher can support 5G\nnon-standalone (NSA). 5G NSA\nis a solution for 5G networks where the network is supported by the existing 4G\ninfrastructure. On Android 10, devices can display a\n5G icon on the status bar\nwhen a device connects to a 5G network.\n\nImplementation\n--------------\n\n### Carrier configuration\n\nTo configure how 5G icons are displayed on the status bar, carriers can use the\n[`KEY_5G_ICON_CONFIGURATION_STRING`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/telephony/java/android/telephony/CarrierConfigManager.java#2459)\nkey in `CarrierConfig`.\n\nThese scenarios are available in 5G NSA:\n\n1. Device connected to 5G cell as the secondary cell and using millimeter wave.\n2. Device connected to 5G cell as the secondary cell but not using millimeter wave.\n3. 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).\n4. 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.\n5. 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.\n\nThe configuration string contains multiple key-value pairs separated by commas.\nFor each pair, the key and value are separated by a colon. The keys in the\nconfiguration string correspond to the 5G scenarios described above\nand must be one of the following:\n\n1. `connected_mmwave`\n2. `connected`\n3. `not_restricted_rrc_idle`\n4. `not_restricted_rrc_con`\n5. `restricted`\n\nThe values in the configuration string must be valid icon names that match the\nnames of icons in the `/packages/SettingsLib/res/` directory. Two default icons\nfor 5G NSA are available: `5G` and `5G_PLUS`.\n\n**Figure 1.** Default 5G and 5G_PLUS 5G icons\n\nDisplay the 5G icons only for scenario 1 (`connected_mmwave`) and\nscenario 2 (`connected`), where the device has a true 5G connection. Use the\n`5G_PLUS` icon for scenario 1 and the `5G` icon for scenario 2. The\nfollowing is an example of a configuration string in `CarrierConfig`. \n\n connected_mmwave:5G_PLUS,connected:5G\n\n### System UI\n\nTo customize the icons that carriers can use for a specific status, add a\n`MobileIconGroup` object in\n[`TelephonyIcons.java`](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java).\nThe icon name in `MobileIconGroup` must match the icon name used in\n`CarrierConfig`. The following shows an example of how to add a customized icon\nwith the name \"5G_PLUS\" to `MobileIconGroup`. \n\n static final MobileIconGroup NR_5G_PLUS = new MobileIconGroup(\n \"5G_PLUS\",\n null,\n null,\n AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,\n 0,\n 0,\n 0,\n 0,\n\n AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],\n R.string.data_connection_5g_plus,\n TelephonyIcons.ICON_5G_PLUS,\n true);\n\nValidation\n----------\n\nTo validate your implementation, make sure a 5G icon is displayed on the status\nbar when the device is connected to a 5G cell."]]