赞
踩
客户需求,5G手机在部分场景需要显示成5G+。当带宽大于50M时,显示5G+。
04-24 09:55:15.854 1917 2026 D RILJ : [UNSL]< UNSOL_PHYSICAL_CHANNEL_CONFIG [{mConnectionStatus=PrimaryServing,mCellBandwidthDownlinkKhz=15000,mCellBandwidthUplinkKhz=0,mNetworkType=LTE,mFrequencyRange=MID,mDownlinkChannelNumber=2147483647,mUplinkChannelNumber=2147483647,mContextIds=[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2],mPhysicalCellId=487,mBand=0,mDownlinkFrequency=0,mUplinkFrequency=0}, {mConnectionStatus=SecondaryServing,mCellBandwidthDownlinkKhz=80000,mCellBandwidthUplinkKhz=0,mNetworkType=NR,mFrequencyRange=HIGH,mDownlinkChannelNumber=2147483647,mUplinkChannelNumber=2147483647,mContextIds=[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2],mPhysicalCellId=19,mBand=0,mDownlinkFrequency=0,mUplinkFrequency=0}] [PHONE0]
可以通过ServiceState.java的getCellBandwidths获取对应带宽
- public int[] getCellBandwidths() {
- return mCellBandwidths == null ? new int[0] : mCellBandwidths;
- }
高通平台Log中找了一圈,也没找到对应判断带宽的接口,最后在QMI中中找到对应代码
- rildata::NrIconEnum_t convertUiMask(const dsd_sys_ui_mask_v01& ui_mask) {
- if (0 != (QMI_DSD_UI_MASK_3GPP_5G_UWB_V01 & ui_mask)) {
- Log::getInstance().d("[DSDModemEndPointModule]: convertUiMask UWB");
- return rildata::NrIconEnum_t::UWB;
- } else if (0 != (QMI_DSD_UI_MASK_3GPP_5G_BASIC_V01 & ui_mask)) {
- Log::getInstance().d("[DSDModemEndPointModule]: convertUiMask BASIC");
- return rildata::NrIconEnum_t::BASIC;
- } else {
- Log::getInstance().d("[DSDModemEndPointModule]: convertUiMask NONE");
- return rildata::NrIconEnum_t::NONE;
- }
- }
SystemUI显示逻辑
- private static MobileIconGroup getNrIconGroup(int nrIconType , int phoneId) {
- MobileIconGroup iconGroup = TelephonyIcons.UNKNOWN;
- switch (nrIconType){
- case NrIconType.TYPE_5G_BASIC:
- iconGroup = TelephonyIcons.FIVE_G_BASIC;
- break;
- case NrIconType.TYPE_5G_UWB:
- iconGroup = TelephonyIcons.FIVE_G_UWB;
- break;
- }
- return iconGroup;
- }
当QM上报UWB时表示为大带宽,显示5g+
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。