Firefly开源社区

[Firefly-RK3399] [Android7.1] 修复4g模块开机无信号显示,但是可以上网

621

积分

58

威望

56

贡献

社区版主

Rank: 7Rank: 7Rank: 7

积分
621
QQ
发表于 2019-6-6 16:13:11     
连接4G模块开机后信号图标显示为空,无图标显示,但是可以正常ping通网络。开关一次飞行模式后显示正常。Android7.1.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
  2. index 03c46e8b37..694599206e 100644
  3. --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
  4. +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
  5. @@ -316,8 +316,16 @@ public class MobileSignalController extends SignalController<
  6.          } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) {
  7.              updateDataSim();
  8.              notifyListenersIfNecessary();
  9. -        }
  10. -    }
  11. +        }else if(action.equals(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED)){
  12. +                        ServiceState mLastServiceState = ServiceState.newFromBundle(intent.getExtras());
  13. +
  14. +                        if(mLastServiceState != null && (mServiceState == null || mServiceState.getVoiceRegState() != mLastServiceState.getVoiceRegState())){
  15. +                                        //Log.v(TAG,"handleBroadcast mLastServiceState:"+mLastServiceState.getVoiceRegState());
  16. +                               mServiceState = mLastServiceState;
  17. +                                       updateTelephony();
  18. +                       }
  19. +               }
  20. +       }

  21.      private void updateDataSim() {
  22.          int defaultDataSub = mDefaults.getDefaultDataSubId();

  23. 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
  24. index 622595f765..2fd0cce8ed 100644
  25. --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
  26. +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
  27. @@ -396,6 +396,11 @@ public class NetworkControllerImpl extends BroadcastReceiver
  28.                  // emergency state.
  29.                  recalculateEmergency();
  30.              }
  31. +                       
  32. +                       for (MobileSignalController controller : mMobileSignalControllers.values()) {
  33. +                                       controller.handleBroadcast(intent);
  34. +                       }
  35. +
  36.          } else {
  37.              int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
  38.                      SubscriptionManager.INVALID_SUBSCRIPTION_ID);
复制代码

Android8.0也有相同的问题,修改稍微有点区别,补丁如下

  1. commit 8765410deff8bd82c3bee9d6a5af341bfab3dd26
  2. Author: cjp <service@t-firefly.com>
  3. Date:   Thu Mar 21 16:46:39 2019 +0800

  4.     Android->systemui:modify 4G dongle status cannot update

  5. 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
  6. index 34a03bf..efa57ec 100644
  7. --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
  8. +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
  9. @@ -371,7 +371,16 @@ public class MobileSignalController extends SignalController<
  10.          } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) {
  11.              updateDataSim();
  12.              notifyListenersIfNecessary();
  13. -        }
  14. +        }else if(action.equals(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED)){
  15. +                ServiceState mLastServiceState = ServiceState.newFromBundle(intent.getExtras());
  16. +                    
  17. +                if(mLastServiceState != null && (mServiceState == null || mServiceState.getVoiceRegState() != mLastServiceState.getVoiceRegState())){
  18. +                    //Log.v(TAG,"handleBroadcast mLastServiceState:"+mLastServiceState.getVoiceRegState());
  19. +                    mServiceState = mLastServiceState;
  20. +                    updateTelephony();
  21. +                }
  22. +
  23. +             }
  24.      }

  25.      private void updateDataSim() {
  26. 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
  27. index bb3e09f..b08cde5 100644
  28. --- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
  29. +++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
  30. @@ -433,7 +433,11 @@ public class NetworkControllerImpl extends BroadcastReceiver
  31.                  // emergency state.
  32.                  recalculateEmergency();
  33.              }
  34. -        } else {
  35. +            for (int i = 0; i < mMobileSignalControllers.size(); i++) {
  36. +                MobileSignalController controller = mMobileSignalControllers.valueAt(i);
  37. +                controller.handleBroadcast(intent);
  38. +            }
  39. +        }else {
  40.              int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
  41.                      SubscriptionManager.INVALID_SUBSCRIPTION_ID);
复制代码








回复

使用道具 举报

*滑块验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表