Od 27 marca 2025 r. zalecamy używanie android-latest-release
zamiast aosp-main
do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
Raportowanie siły sygnału
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Platforma telefonii raportuje moc sygnału sieci komórkowej, używając różnych typów pomiarów sygnału. Następnie możesz używać tych wartości do kontrolowania sposobu wyświetlania pasków sygnału na urządzeniu oraz dostosowywania kryteriów raportowania sygnału z modemu. Począwszy od Androida 11 możesz dostosowywać różne typy pomiarów sygnału, których framework używa do raportowania siły sygnału sieci dostępu radiowego 4G LTE i 5G NR.
Framework używa 3 funkcji do raportowania siły sygnału: kryteria raportowania siły sygnału, progi siły sygnału i poziomy sygnału.
Te funkcje wpływają na sposób komunikacji Androida z modemowym sprzętem. Na przykład zapobiegają niepotrzebnemu raportowaniu przez modem siły sygnału, aby zmniejszyć zużycie energii i poprawić stan systemu. Funkcje są zdefiniowane jako:
- Kryteria raportowania siły sygnału: warunki zdefiniowane przez Androida, które uruchamiają raportowanie siły sygnału z modemu.
- Progi sygnału: lista 4 liczb całkowitych służących do sugerowania kryteriów raportowania poziomu sygnału i siły sygnału.
- Poziomy sygnału: 5 poziomów (
NONE
, POOR
, MODERATE
, GOOD
, GREAT
), które odpowiadają sile sygnału.
Obsługa wielu typów pomiarów sygnałów
Na urządzeniach z Androidem 11 lub nowszym można dostosować te typy pomiarów sygnału do sieci NGRAN (5G LTE) i EUTRAN (4G LTE). Te pomiary są używane do kryteriów raportowania siły sygnału, progów siły sygnału i funkcji poziomów sygnału.
- NGRAN (5G NR): SSRSRP, SSRSRQ, SSSINR
- EUTRAN (4G LTE): RSRP, RSRQ, RSSNR
Implementacja
Aby umożliwić urządzeniu ustawienie kryteriów raportowania siły sygnału dla każdego RAN, wprowadź interfejs sprzętowy setSignalStrengthReportingCriteria_1_5
. W przypadku każdego RAN obsługiwane są różne typy pomiarów sygnałów. Jeśli w przypadku RAN nie jest włączone żadne z kryteriów raportowania typu pomiaru, kryteria raportowania tego RAN są definiowane przez framework Androida. Gdy w przypadku RAN włączone są kryteria raportowania określonego typu pomiaru, kryteria raportowania innych typów pomiaru są wyłączone.
Aby zdefiniować progi siły sygnału dla sieci 4G i 5G, użyj tych kluczy konfiguracji operatora:
Aby wybrać wiele pomiarów dla RAN, użyj tych kluczy konfiguracji operatora:
Weryfikacja
Aby sprawdzić implementację, użyj testu CTStestGetConfig
w CarrierConfigManagerTest
.
Do testowania użyj VTS.setSignalStrengthReportingCriteria_1_5_*
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-27 UTC."],[],[],null,["# Signal strength reporting\n\nThe telephony framework reports cellular network signal strength using various\nsignal measurement types. You can then use these reported signal strengths to\ncontrol how signal bars are displayed on your device and customize the signal\nstrength reporting criteria from the modem. Starting from Android\n11, you can customize\nmultiple signal measurement types that the framework uses to report the signal\nstrength of 4G LTE and 5G NR radio access networks (RANs).\n\nThe framework uses three functions for reporting signal strength: signal\nstrength reporting criteria, signal strength thresholds, and signal levels.\nThese functions affect how Android communicates with the modem hardware, for\nexample, preventing unnecessary signal strength reporting by the modem to reduce\npower usage and improve system health. The functions are defined as:\n\n- **Signal strength reporting criteria:** The conditions defined by Android to trigger signal strength reporting from the modem.\n- **Signal strength thresholds:** A list of four integers used for suggesting signal level and signal strength reporting criteria.\n- **Signal levels:** Five levels (`NONE`, `POOR`, `MODERATE`, `GOOD`, `GREAT`) that correspond to signal strength.\n\nSupport for multiple signal measurement types\n---------------------------------------------\n\nFor devices running Android 11 or higher, the\nfollowing signal measurement types\nare customizable for NGRAN (5G LTE) and EUTRAN (4G LTE) networks. These\nmeasurements are used for the signal strength reporting criteria, signal\nstrength thresholds, and signal levels functions.\n\n- **NGRAN (5G NR):** SSRSRP, SSRSRQ, SSSINR\n- **EUTRAN (4G LTE):** RSRP, RSRQ, RSSNR\n\nImplementation\n--------------\n\nTo enable the device to set the signal strength reporting criteria for each RAN,\nimplement the\n[`setSignalStrengthReportingCriteria_1_5`](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/radio/1.5/IRadio.hal#68)\nhardware interface. For each RAN, multiple signal measurement types are\nsupported. If none of the reporting criteria for a measurement type is enabled\nfor a RAN, the reporting criteria for that RAN is defined by the Android\nframework. When the reporting criteria of a measurement type is enabled for a\nRAN, the reporting criteria of other measurement types are disabled.\n\nTo define the signal strength thresholds for 4G and 5G networks, use the\nfollowing carrier config keys:\n\n- [`KEY_5G_NR_SSRSRP_THRESHOLDS_INT_ARRAY`](https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_5G_NR_SSRSRP_THRESHOLDS_INT_ARRAY)\n- [`KEY_5G_NR_SSRSRQ_THRESHOLDS_INT_ARRAY`](https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_5G_NR_SSRSRQ_THRESHOLDS_INT_ARRAY)\n- [`KEY_5G_NR_SSSINR_THRESHOLDS_INT_ARRAY`](https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_5G_NR_SSSINR_THRESHOLDS_INT_ARRAY)\n- [`KEY_LTE_RSRQ_THRESHOLDS_INT_ARRAY`](https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_LTE_RSRQ_THRESHOLDS_INT_ARRAY)\n- [`KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY`](https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY)\n\nTo select multiple measurements for a RAN, use the following carrier config\nkeys:\n\n- [`KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/telephony/java/android/telephony/CarrierConfigManager.java#2379)\n- [`KEY_PARAMETERS_USE_FOR_5G_NR_SIGNAL_BAR_INT`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android16-release/telephony/java/android/telephony/CarrierConfigManager.java#2461)\n\nValidation\n----------\n\nTo validate your implementation, use the\n[`testGetConfig`](https://android.googlesource.com/platform/cts/+/112b1be/tests/tests/telephony/src/android/telephony/cts/CarrierConfigManagerTest.java#70)\nCTS test in\n[`CarrierConfigManagerTest`](https://android.googlesource.com/platform/cts/+/112b1be/tests/tests/telephony/src/android/telephony/cts/CarrierConfigManagerTest.java).\nUse [VTS](/docs/core/tests/vts) for testing\n`setSignalStrengthReportingCriteria_1_5_*`."]]