Loading src/java/com/android/internal/telephony/CarrierKeyDownloadManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -152,6 +152,7 @@ public class CarrierKeyDownloadManager extends Handler { CarrierConfigManager carrierConfigManager = mContext.getSystemService( CarrierConfigManager.class); // Callback which directly handle config change should be executed on handler thread if (carrierConfigManager != null) { carrierConfigManager.registerCarrierConfigChangeListener(this::post, (slotIndex, subId, carrierId, specificCarrierId) -> { if (Flags.imsiKeyRetryDownloadOnPhoneUnlock()) { Loading Loading @@ -187,6 +188,7 @@ public class CarrierKeyDownloadManager extends Handler { } } }); } mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); } Loading src/java/com/android/internal/telephony/CarrierPrivilegesTracker.java +7 −4 Original line number Diff line number Diff line Loading @@ -346,9 +346,11 @@ public class CarrierPrivilegesTracker extends Handler { mCarrierConfigManager = (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE); // Callback is executed in handler thread and directly handles carrier config update if (mCarrierConfigManager != null) { mCarrierConfigManager.registerCarrierConfigChangeListener(this::post, (slotIndex, subId, carrierId, specificCarrierId) -> handleCarrierConfigUpdated( subId, slotIndex)); } mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); mTelephonyRegistryManager = (TelephonyRegistryManager) Loading Loading @@ -444,7 +446,8 @@ public class CarrierPrivilegesTracker extends Handler { CarrierConfigManager.getCarrierConfigSubset( mContext, subId, KEY_CARRIER_CERTIFICATE_STRING_ARRAY); // CarrierConfigManager#isConfigForIdentifiedCarrier can handle null or empty bundle if (!mCarrierConfigManager.isConfigForIdentifiedCarrier(carrierConfigs)) { if (mCarrierConfigManager == null || !mCarrierConfigManager.isConfigForIdentifiedCarrier(carrierConfigs)) { return Collections.EMPTY_LIST; } Loading src/java/com/android/internal/telephony/CarrierServiceStateTracker.java +3 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public class CarrierServiceStateTracker extends Handler { mTelephonyManager = mPhone.getContext().getSystemService( TelephonyManager.class).createForSubscriptionId(mPhone.getSubId()); CarrierConfigManager ccm = mPhone.getContext().getSystemService(CarrierConfigManager.class); if (ccm != null) { ccm.registerCarrierConfigChangeListener( mPhone.getContext().getMainExecutor(), (slotIndex, subId, carrierId, specificCarrierId) -> { Loading Loading @@ -143,6 +144,7 @@ public class CarrierServiceStateTracker extends Handler { } handleConfigChanges(); }); } // Listen for subscriber changes SubscriptionManager.from(mPhone.getContext()).addOnSubscriptionsChangedListener( Loading src/java/com/android/internal/telephony/CarrierSignalAgent.java +9 −7 Original line number Diff line number Diff line Loading @@ -130,6 +130,7 @@ public class CarrierSignalAgent extends Handler { CarrierConfigManager carrierConfigManager = mPhone.getContext().getSystemService( CarrierConfigManager.class); loadCarrierConfig(); if (carrierConfigManager != null) { carrierConfigManager.registerCarrierConfigChangeListener( mPhone.getContext().getMainExecutor(), (slotIndex, subId, carrierId, specificCarrierId) -> { Loading @@ -137,6 +138,7 @@ public class CarrierSignalAgent extends Handler { loadCarrierConfig(); } }); } mPhone.getCarrierActionAgent().registerForCarrierAction( CarrierActionAgent.CARRIER_ACTION_REPORT_DEFAULT_NETWORK_STATUS, this, EVENT_REGISTER_DEFAULT_NETWORK_AVAIL, null, false); Loading src/java/com/android/internal/telephony/DisplayInfoController.java +13 −10 Original line number Diff line number Diff line Loading @@ -87,23 +87,26 @@ public class DisplayInfoController extends Handler { mLogTag = "DIC-" + mPhone.getPhoneId(); mServiceState = mPhone.getServiceStateTracker().getServiceState(); mConfigs = new PersistableBundle(); CarrierConfigManager ccm = mPhone.getContext().getSystemService(CarrierConfigManager.class); try { mConfigs = mPhone.getContext().getSystemService(CarrierConfigManager.class) .getConfigForSubId(mPhone.getSubId(), if (ccm != null) { mConfigs = ccm.getConfigForSubId(mPhone.getSubId(), CarrierConfigManager.KEY_SHOW_ROAMING_INDICATOR_BOOL); } } catch (Exception ignored) { // CarrierConfigLoader might not be available yet. // Once it's available, configs will be updated through the listener. } mPhone.getServiceStateTracker() .registerForServiceStateChanged(this, EVENT_SERVICE_STATE_CHANGED, null); mPhone.getContext().getSystemService(CarrierConfigManager.class) .registerCarrierConfigChangeListener(Runnable::run, if (ccm != null) { ccm.registerCarrierConfigChangeListener(Runnable::run, (slotIndex, subId, carrierId, specificCarrierId) -> { if (slotIndex == mPhone.getPhoneId()) { obtainMessage(EVENT_CARRIER_CONFIG_CHANGED).sendToTarget(); } }); } mTelephonyDisplayInfo = new TelephonyDisplayInfo( TelephonyManager.NETWORK_TYPE_UNKNOWN, TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE, Loading Loading
src/java/com/android/internal/telephony/CarrierKeyDownloadManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -152,6 +152,7 @@ public class CarrierKeyDownloadManager extends Handler { CarrierConfigManager carrierConfigManager = mContext.getSystemService( CarrierConfigManager.class); // Callback which directly handle config change should be executed on handler thread if (carrierConfigManager != null) { carrierConfigManager.registerCarrierConfigChangeListener(this::post, (slotIndex, subId, carrierId, specificCarrierId) -> { if (Flags.imsiKeyRetryDownloadOnPhoneUnlock()) { Loading Loading @@ -187,6 +188,7 @@ public class CarrierKeyDownloadManager extends Handler { } } }); } mConnectivityManager = mContext.getSystemService(ConnectivityManager.class); } Loading
src/java/com/android/internal/telephony/CarrierPrivilegesTracker.java +7 −4 Original line number Diff line number Diff line Loading @@ -346,9 +346,11 @@ public class CarrierPrivilegesTracker extends Handler { mCarrierConfigManager = (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE); // Callback is executed in handler thread and directly handles carrier config update if (mCarrierConfigManager != null) { mCarrierConfigManager.registerCarrierConfigChangeListener(this::post, (slotIndex, subId, carrierId, specificCarrierId) -> handleCarrierConfigUpdated( subId, slotIndex)); } mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); mTelephonyRegistryManager = (TelephonyRegistryManager) Loading Loading @@ -444,7 +446,8 @@ public class CarrierPrivilegesTracker extends Handler { CarrierConfigManager.getCarrierConfigSubset( mContext, subId, KEY_CARRIER_CERTIFICATE_STRING_ARRAY); // CarrierConfigManager#isConfigForIdentifiedCarrier can handle null or empty bundle if (!mCarrierConfigManager.isConfigForIdentifiedCarrier(carrierConfigs)) { if (mCarrierConfigManager == null || !mCarrierConfigManager.isConfigForIdentifiedCarrier(carrierConfigs)) { return Collections.EMPTY_LIST; } Loading
src/java/com/android/internal/telephony/CarrierServiceStateTracker.java +3 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ public class CarrierServiceStateTracker extends Handler { mTelephonyManager = mPhone.getContext().getSystemService( TelephonyManager.class).createForSubscriptionId(mPhone.getSubId()); CarrierConfigManager ccm = mPhone.getContext().getSystemService(CarrierConfigManager.class); if (ccm != null) { ccm.registerCarrierConfigChangeListener( mPhone.getContext().getMainExecutor(), (slotIndex, subId, carrierId, specificCarrierId) -> { Loading Loading @@ -143,6 +144,7 @@ public class CarrierServiceStateTracker extends Handler { } handleConfigChanges(); }); } // Listen for subscriber changes SubscriptionManager.from(mPhone.getContext()).addOnSubscriptionsChangedListener( Loading
src/java/com/android/internal/telephony/CarrierSignalAgent.java +9 −7 Original line number Diff line number Diff line Loading @@ -130,6 +130,7 @@ public class CarrierSignalAgent extends Handler { CarrierConfigManager carrierConfigManager = mPhone.getContext().getSystemService( CarrierConfigManager.class); loadCarrierConfig(); if (carrierConfigManager != null) { carrierConfigManager.registerCarrierConfigChangeListener( mPhone.getContext().getMainExecutor(), (slotIndex, subId, carrierId, specificCarrierId) -> { Loading @@ -137,6 +138,7 @@ public class CarrierSignalAgent extends Handler { loadCarrierConfig(); } }); } mPhone.getCarrierActionAgent().registerForCarrierAction( CarrierActionAgent.CARRIER_ACTION_REPORT_DEFAULT_NETWORK_STATUS, this, EVENT_REGISTER_DEFAULT_NETWORK_AVAIL, null, false); Loading
src/java/com/android/internal/telephony/DisplayInfoController.java +13 −10 Original line number Diff line number Diff line Loading @@ -87,23 +87,26 @@ public class DisplayInfoController extends Handler { mLogTag = "DIC-" + mPhone.getPhoneId(); mServiceState = mPhone.getServiceStateTracker().getServiceState(); mConfigs = new PersistableBundle(); CarrierConfigManager ccm = mPhone.getContext().getSystemService(CarrierConfigManager.class); try { mConfigs = mPhone.getContext().getSystemService(CarrierConfigManager.class) .getConfigForSubId(mPhone.getSubId(), if (ccm != null) { mConfigs = ccm.getConfigForSubId(mPhone.getSubId(), CarrierConfigManager.KEY_SHOW_ROAMING_INDICATOR_BOOL); } } catch (Exception ignored) { // CarrierConfigLoader might not be available yet. // Once it's available, configs will be updated through the listener. } mPhone.getServiceStateTracker() .registerForServiceStateChanged(this, EVENT_SERVICE_STATE_CHANGED, null); mPhone.getContext().getSystemService(CarrierConfigManager.class) .registerCarrierConfigChangeListener(Runnable::run, if (ccm != null) { ccm.registerCarrierConfigChangeListener(Runnable::run, (slotIndex, subId, carrierId, specificCarrierId) -> { if (slotIndex == mPhone.getPhoneId()) { obtainMessage(EVENT_CARRIER_CONFIG_CHANGED).sendToTarget(); } }); } mTelephonyDisplayInfo = new TelephonyDisplayInfo( TelephonyManager.NETWORK_TYPE_UNKNOWN, TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE, Loading