Firefly开源社区

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

作者: 风之空响    时间: 2019-6-6 16:13
标题: [Firefly-RK3399] [Android7.1] 修复4g模块开机无信号显示,但是可以上网
连接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);
复制代码









作者: alvin427    时间: 2020-5-3 10:58
Good Study




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1