自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
支援多營運商網路
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
搭載 Android 11 以上版本的裝置可支援多個公開陸地行動網路 (PLMN)。Android 11 的小區 ID API 包含方法,可取得小區支援的 PLMN 相關資訊,用於區分行動網路服務供應商和網路作業員。
多 PLMN 支援功能可讓行動網路業者 (MNO) 廣播多個 ID,提供彈性。這項功能主要用於支援共用協議,也就是多個 MNO 使用相同的硬體或塔台。在多 PLMN 情況下,當裝置選擇使用特定塔台註冊時,會選取要用於註冊的 PLMN,並將裝置的 設定檔鎖定為該 PLMN,以便進行後續通訊。getRegisteredPlmn
方法會擷取裝置註冊的 PLMN。
實作
如要在搭載 Android 11 以上版本的裝置上支援多個 PLMN,請在 IRadio
的下列位置實作這些函式。
IRadio.hal 和 IRadioResponse.hal
在 Radio 1.5 HAL 中,為了支援多 PLMN,系統會以不同於先前版本的方式,回報裝置註冊的網路資訊。首先,系統會分別回報已註冊的 PLMN (RPLMN),因為在多 PLMN 小區中,RPLMN 可能不是主要 PLMN ID。在 CellIdentity
結構中,儲存格會提供主要 PLMN-ID 和其他 PLMN-ID 清單。RPLMN 必須是主要 PLMN-ID,或 CellIdentity
結構中指出的其他 PLMN-ID。
Radio 1.5 HAL 的變更會影響 IRadio.hal
中的下列兩個 HAL 方法 (以及 IRadioResponse.hal
中的對應回應方法)。
getDataRegState_1_5
和 getDataRegStateResult_1_5(RegStateResult
result)
getVoiceRegState_1_5
和 getVoiceRegStateResult_1_5(RegStateresult
result)
types.hal
在 types.hal
中實作以下內容:
ClosedSubscriberGroupInfo
:可選納入每個 CellIdentity
例項。這個結構體可用來提供單元格所屬的封閉訂閱者群組詳細資料 (如有)。這通常用於識別小型基地台,例如個人 LTE 裝置。也適用於 CBRS LTE 等部署作業。
CellIdentityLte
:支援額外 PLMN ID 清單。
CellIdentityWcdma
:支援額外 PLMN ID 清單。
CellIdentityTdscdma
:支援額外 PLMN ID 清單。
RegStateResult
:包含更新的 CellIdentity
結構和欄位,用於指示 RPLMN。
驗證
如要測試導入成果,請在註冊至多營運商無線存取網路 (MORAN) 或多營運商核心網路 (MOCN) 時,執行下列 CTS 測試:CellInfoTest
。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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-07-27 (世界標準時間)。"],[],[],null,["# Multi-operator network support\n\nDevices launching with Android 11 or higher can provide\nsupport for multiple public land mobile networks (PLMNs). Android\n11 includes methods in the\n[cell identification APIs](https://developer.android.com/reference/android/telephony/CellIdentity)\nto get information about a cell's supported PLMNs to distinguish between\ncellular service providers and network operators.\n\nMulti-PLMN support provides flexibility to mobile network operators (MNOs) by\nallowing them to broadcast multiple identities. This is primarily required to\nsupport sharing agreements where common hardware or towers are used by multiple\nMNOs. In a multi-PLMN scenario, when a device chooses to register using a\nparticular tower, it selects the PLMN to use for that registration, which locks\nthe device's *profile* to that PLMN for all ensuing communication. The\n[`getRegisteredPlmn`](https://developer.android.com/reference/android/telephony/NetworkRegistrationInfo#getRegisteredPlmn())\nmethod retrieves the registered PLMN for the device.\n\nImplementation\n--------------\n\nTo support multi-PLMN on devices running Android 11\nor higher, implement the functions in the following locations in\n[`IRadio`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.5/).\n\n### IRadio.hal and IRadioResponse.hal\n\nIn the Radio 1.5 HAL, to support multi-PLMN, information about the network the\ndevice registers on is reported differently than previous versions. First, the\nregistered PLMN (RPLMN) is reported separately because on multi-PLMN cells, the\nRPLMN might not be the primary PLMN-ID. And in the `CellIdentity` structures,\nthe cell provides a primary PLMN-ID and a list of additional PLMN-IDs. The RPLMN\nmust be the primary PLMN-ID or one of the additional PLMN-IDs indicated in the\n`CellIdentity` structure.\n\nThe changes in the Radio 1.5 HAL impact the following two HAL methods in\n[`IRadio.hal`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.5/IRadio.hal)\n(and their corresponding response methods in\n[`IRadioResponse.hal`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.5/IRadioResponse.hal)).\n\n- `getDataRegState_1_5` and `getDataRegStateResult_1_5(RegStateResult\n result)`\n- `getVoiceRegState_1_5` and `getVoiceRegStateResult_1_5(RegStateresult\n result)`\n\n### types.hal\n\nImplement the following\nin [`types.hal`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.5/types.hal):\n\n- `ClosedSubscriberGroupInfo`: Included optionally with every `CellIdentity` instance. This structure is used to provide details about the closed subscriber group to which a cell belongs, if any. This is commonly used to identity *small cells* such as personal LTE devices. It can also be used in deployments such as CBRS LTE.\n- `CellIdentityLte`: Supports a list of additional PLMN-IDs.\n- `CellIdentityWcdma`: Supports a list of additional PLMN-IDs.\n- `CellIdentityTdscdma`: Supports a list of additional PLMN-IDs.\n- `RegStateResult`: Includes an updated `CellIdentity` structure and a field to indicate the RPLMN.\n\nValidation\n----------\n\nTo test your implementation, run the following CTS test:\n[`CellInfoTest`](https://android.googlesource.com/platform/cts/+/3c3d33a/tests/tests/telephony/src/android/telephony/cts/CellInfoTest.java)\nwhile registered to a multi-operator radio access network (MORAN) or\nmulti-operator core network (MOCN)."]]