概述
4G加载较晚,状态栏未监听TelephonyIntents.ACTION_SERVICE_STATE_CHANGED广播,导致状态未更新
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 34a03bf..9786363 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,6 +371,13 @@ 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())) {
+ mServiceState = mLastServiceState;
+ updateTelephony();
+ }
}
}
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 bb3e09f..78ec503 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,6 +433,12 @@ public class NetworkControllerImpl extends BroadcastReceiver
// emergency state.
recalculateEmergency();
}
+
+ 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);
最后
以上就是辛勤雪糕为你收集整理的[RK3326]Android 8.1开机4G无信号但能上网的全部内容,希望文章能够帮你解决[RK3326]Android 8.1开机4G无信号但能上网所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复