|
[Firefly-RK3399] [Android7.1] 修复4g模块开机无信号显示,但是可以上网
发表于 2019-6-6 16:13:11
浏览:7786
|
回复:1
打印
只看该作者
[复制链接]
楼主
连接4G模块开机后信号图标显示为空,无图标显示,但是可以正常ping通网络。开关一次飞行模式后显示正常。Android7.1.1的补丁如下
- diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
- index 03c46e8b37..694599206e 100644
- --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
- +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
- @@ -316,8 +316,16 @@ public class MobileSignalController extends SignalController<
- } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) {
- updateDataSim();
- notifyListenersIfNecessary();
- - }
- - }
- + }else if(action.equals(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED)){
- + ServiceState mLastServiceState = ServiceState.newFromBundle(intent.getExtras());
- +
- + if(mLastServiceState != null && (mServiceState == null || mServiceState.getVoiceRegState() != mLastServiceState.getVoiceRegState())){
- + //Log.v(TAG,"handleBroadcast mLastServiceState:"+mLastServiceState.getVoiceRegState());
- + mServiceState = mLastServiceState;
- + updateTelephony();
- + }
- + }
- + }
-
- private void updateDataSim() {
- int defaultDataSub = mDefaults.getDefaultDataSubId();
- diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
- index 622595f765..2fd0cce8ed 100644
- --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
- +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
- @@ -396,6 +396,11 @@ public class NetworkControllerImpl extends BroadcastReceiver
- // emergency state.
- recalculateEmergency();
- }
- +
- + for (MobileSignalController controller : mMobileSignalControllers.values()) {
- + controller.handleBroadcast(intent);
- + }
- +
- } else {
- int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
- SubscriptionManager.INVALID_SUBSCRIPTION_ID);
复制代码
Android8.0也有相同的问题,修改稍微有点区别,补丁如下
- commit 8765410deff8bd82c3bee9d6a5af341bfab3dd26
- Author: cjp <service@t-firefly.com>
- Date: Thu Mar 21 16:46:39 2019 +0800
- Android->systemui:modify 4G dongle status cannot update
- diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSig
- index 34a03bf..efa57ec 100644
- --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
- +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
- @@ -371,7 +371,16 @@ public class MobileSignalController extends SignalController<
- } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) {
- updateDataSim();
- notifyListenersIfNecessary();
- - }
- + }else if(action.equals(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED)){
- + ServiceState mLastServiceState = ServiceState.newFromBundle(intent.getExtras());
- +
- + if(mLastServiceState != null && (mServiceState == null || mServiceState.getVoiceRegState() != mLastServiceState.getVoiceRegState())){
- + //Log.v(TAG,"handleBroadcast mLastServiceState:"+mLastServiceState.getVoiceRegState());
- + mServiceState = mLastServiceState;
- + updateTelephony();
- + }
- +
- + }
- }
-
- private void updateDataSim() {
- diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkCon
- index bb3e09f..b08cde5 100644
- --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
- +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
- @@ -433,7 +433,11 @@ public class NetworkControllerImpl extends BroadcastReceiver
- // emergency state.
- recalculateEmergency();
- }
- - } else {
- + for (int i = 0; i < mMobileSignalControllers.size(); i++) {
- + MobileSignalController controller = mMobileSignalControllers.valueAt(i);
- + controller.handleBroadcast(intent);
- + }
- + }else {
- int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
- SubscriptionManager.INVALID_SUBSCRIPTION_ID);
复制代码
|
|