Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Hỗ trợ mạng của nhiều nhà mạng
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Các thiết bị chạy Android 11 trở lên có thể hỗ trợ nhiều mạng di động công cộng trên đất liền (PLMN). Android 11 bao gồm các phương thức trong API nhận dạng tế bào để lấy thông tin về PLMN được hỗ trợ của một tế bào nhằm phân biệt giữa nhà cung cấp dịch vụ di động và nhà khai thác mạng.
Tính năng hỗ trợ nhiều PLMN giúp các nhà mạng di động (MNO) linh hoạt hơn bằng cách cho phép họ truyền nhiều danh tính. Điều này chủ yếu là bắt buộc để hỗ trợ các thoả thuận chia sẻ trong đó nhiều MNO sử dụng phần cứng hoặc tháp chung. Trong trường hợp nhiều PLMN, khi một thiết bị chọn đăng ký bằng một tháp cụ thể, thiết bị đó sẽ chọn PLMN để sử dụng cho lần đăng ký đó. Thao tác này sẽ khoá hồ sơ của thiết bị với PLMN đó cho mọi hoạt động giao tiếp tiếp theo. Phương thức getRegisteredPlmn
truy xuất PLMN đã đăng ký cho thiết bị.
Triển khai
Để hỗ trợ nhiều PLMN trên các thiết bị chạy Android 11 trở lên, hãy triển khai các hàm ở các vị trí sau trong IRadio
.
IRadio.hal và IRadioResponse.hal
Trong HAL Radio 1.5, để hỗ trợ nhiều PLMN, thông tin về mạng mà thiết bị đăng ký sẽ được báo cáo theo cách khác với các phiên bản trước. Trước tiên, PLMN đã đăng ký (RPLMN) được báo cáo riêng vì trên các ô nhiều PLMN, RPLMN có thể không phải là mã PLMN chính. Và trong cấu trúc CellIdentity
, ô này cung cấp một mã PLMN chính và danh sách các mã PLMN bổ sung. RPLMN phải là mã PLMN chính hoặc một trong các mã PLMN bổ sung được chỉ định trong cấu trúc CellIdentity
.
Các thay đổi trong HAL Radio 1.5 ảnh hưởng đến hai phương thức HAL sau trong IRadio.hal
(và các phương thức phản hồi tương ứng trong IRadioResponse.hal
).
getDataRegState_1_5
và getDataRegStateResult_1_5(RegStateResult
result)
getVoiceRegState_1_5
và getVoiceRegStateResult_1_5(RegStateresult
result)
types.hal
Triển khai nội dung sau trong types.hal
:
ClosedSubscriberGroupInfo
: Không bắt buộc phải có trong mọi thực thể CellIdentity
. Cấu trúc này được dùng để cung cấp thông tin chi tiết về nhóm người đăng ký kín mà một ô thuộc về (nếu có). Thông tin này thường được dùng để xác định các tế bào nhỏ như thiết bị LTE cá nhân. Bạn cũng có thể sử dụng trong các hoạt động triển khai như CBRS LTE.
CellIdentityLte
: Hỗ trợ danh sách các mã PLMN bổ sung.
CellIdentityWcdma
: Hỗ trợ danh sách các mã PLMN bổ sung.
CellIdentityTdscdma
: Hỗ trợ danh sách các mã PLMN bổ sung.
RegStateResult
: Bao gồm cấu trúc CellIdentity
đã cập nhật và một trường để cho biết RPLMN.
Xác nhận kết quả
Để kiểm thử việc triển khai, hãy chạy kiểm thử CTS sau: CellInfoTest
trong khi đăng ký mạng truy cập vô tuyến đa nhà khai thác (MORAN) hoặc mạng lõi đa nhà khai thác (MOCN).
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],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)."]]