功能介绍
根据设备的网络连接情况更新状态栏显示的运营商及网络状态。
注册上WFC(WiFi Calling)后,支持客制化显示左上角状态栏中的运营商网络状态信息 。具体的代码逻辑在CarrierDisplayNameResolver.java。
ServiceStateTracker 网络状态变化触发更新,流程如下:
-
updateSpnDisplay(),有以下场景会更新SPN:
- onSubscriptionsChanged() 注册状态变化时
- BroadcastReceiver() 收到广播
- Intent.ACTION_LOCALE_CHANGED
- TelephonyManager.ACTION_NETWORK_COUNTRY_CHANGED
- handleMessage() 收到消息处理
- EVENT_ICC_CHANGED
- EVENT_NITZ_TIME
- EVENT_IMS_CAPABILITY_CHANGED
- EVENT_RUIM_RECORDS_LOADED
- setImsRegistrationState(final boolean registered)——It's possible ServiceState changes did not trigger SPN display update; we update it here
- pollStateDone()——Trigger updateSpnDisplay when 1. Service state is changed. 2. phone type is Cdma or CdmaLte and ERI text has changed.
- updateSpnDisplayCdnr()
- getCarrierDisplayNameData()
- resolveCarrierDisplayName()
-
getCarrierDisplayNameFromWifiCallingOverride()
- 获取com.android.internal.R.array.wfcSpnFormats值
文章来源:https://www.toymoban.com/news/detail-828720.html
相关类:/frameworks/opt/telephony/src/java/com/android/internal/telephony/文章来源地址https://www.toymoban.com/news/detail-828720.html
- /cdnr/CarrierDisplayNameResolver.java(可客制化抽出来做telephony-common.jar)
- ServiceStateTracker.java
- /cdnr/CarrierDisplayNameData.java(序列化对象)
//frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java
//1. SS 变化更新SPN显示
public void updateSpnDisplay() {
if (mCarrierConfig.getBoolean(
CarrierConfigManager.KEY_ENABLE_CARRIER_DISPLAY_NAME_RESOLVER_BOOL)) {
到了这里,关于Android U 配置 WiFiCalling 场景下PLMN/SPN 显示的代码逻辑介绍的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!