问题:80 7.0开机后出现概率性问题,无法正常读取SIM卡联系人并显示
修改路径:frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/SIMRecords.java
--- a/alps/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/SIMRecords.java
+++ b/alps/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/SIMRecords.java
@@ -472,6 +472,9 @@ public class SIMRecords extends IccRecords {
IntentFilter intentfilter = new IntentFilter();
intentfilter.addAction(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
+ //fix bug: add 20180301 by
+ intentfilter.addAction(Intent.ACTION_BOOT_COMPLETED);
+
c.registerReceiver(mReceiver, intentfilter);
}
@@ -480,7 +483,12 @@ public class SIMRecords extends IccRecords {
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED)) {
sendMessage(obtainMessage(EVENT_CARRIER_CONFIG_CHANGED));
+ //fix bug: add 20180301 by
+ }else if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
+ log("ACTION_BOOT_COMPLETED");
+ sendMessage(obtainMessage(EVENT_DELAYED_SEND_PHB_CHANGE));
}
+ //end
}
};
修复SIM卡联系人读取问题
本文介绍了一种解决Android设备在启动过程中无法稳定读取SIM卡联系人的方法。通过对SIMRecords.java文件进行修改,增加了对启动完成事件的监听,并在启动完成后重新发送联系人更新消息。
1270

被折叠的 条评论
为什么被折叠?



