版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/CodingNotes/article/details/79607180
问题: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
}
};