Loading src/com/android/settings/network/InternetPreferenceController.java +2 −3 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import com.android.settings.widget.SummaryUpdater; import com.android.settings.wifi.WifiSummaryUpdater; import com.android.settingslib.Utils; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.mobile.dataservice.DataServiceUtils; import com.android.settingslib.mobile.dataservice.MobileNetworkInfoEntity; import com.android.settingslib.mobile.dataservice.SubscriptionInfoEntity; import com.android.settingslib.mobile.dataservice.UiccInfoEntity; Loading Loading @@ -237,9 +238,7 @@ public class InternetPreferenceController extends AbstractPreferenceController i @Override public void onAvailableSubInfoChanged(List<SubscriptionInfoEntity> subInfoEntityList) { if ((mSubInfoEntityList != null && (subInfoEntityList.isEmpty() || !subInfoEntityList.equals(mSubInfoEntityList))) || (!subInfoEntityList.isEmpty() && mSubInfoEntityList == null)) { if (DataServiceUtils.shouldUpdateEntityList(mSubInfoEntityList, subInfoEntityList)) { mSubInfoEntityList = subInfoEntityList; updateState(mPreference); } Loading src/com/android/settings/network/MobileNetworkRepository.java +5 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.settings.network; import static android.telephony.UiccSlotInfo.CARD_STATE_INFO_PRESENT; import static com.android.internal.telephony.TelephonyIntents.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED; import android.app.settings.SettingsEnums; import android.content.BroadcastReceiver; import android.content.Context; Loading Loading @@ -125,6 +127,8 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions mAirplaneModeSettingUri = Settings.Global.getUriFor(Settings.Global.AIRPLANE_MODE_ON); mFilter.addAction(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED); mFilter.addAction(SubscriptionManager.ACTION_DEFAULT_SUBSCRIPTION_CHANGED); mFilter.addAction(ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED); mFilter.addAction(SubscriptionManager.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED); } private class AirplaneModeObserver extends ContentObserver { Loading Loading @@ -152,12 +156,8 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions private final BroadcastReceiver mDataSubscriptionChangedReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); if (action.equals(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED) || action.equals(SubscriptionManager.ACTION_DEFAULT_SUBSCRIPTION_CHANGED)) { onSubscriptionsChanged(); } } }; public void addRegister(LifecycleOwner lifecycleOwner) { Loading @@ -171,7 +171,6 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions public void removeRegister() { mAirplaneModeObserver.unRegister(mContext); mContext.getContentResolver().unregisterContentObserver(mAirplaneModeObserver); if (mDataSubscriptionChangedReceiver != null) { mContext.unregisterReceiver(mDataSubscriptionChangedReceiver); } Loading src/com/android/settings/network/MobileNetworkSummaryController.java +2 −4 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.settings.widget.AddPreference; import com.android.settingslib.Utils; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.instrumentation.MetricsFeatureProvider; import com.android.settingslib.mobile.dataservice.DataServiceUtils; import com.android.settingslib.mobile.dataservice.MobileNetworkInfoEntity; import com.android.settingslib.mobile.dataservice.SubscriptionInfoEntity; import com.android.settingslib.mobile.dataservice.UiccInfoEntity; Loading Loading @@ -226,10 +227,7 @@ public class MobileNetworkSummaryController extends AbstractPreferenceController @Override public void onAvailableSubInfoChanged(List<SubscriptionInfoEntity> subInfoEntityList) { if ((mSubInfoEntityList != null && (subInfoEntityList.isEmpty() || !subInfoEntityList.equals(mSubInfoEntityList))) || (!subInfoEntityList.isEmpty() && mSubInfoEntityList == null)) { Log.d(TAG, "subInfo list from framework is changed, update the subInfo entity list."); if (DataServiceUtils.shouldUpdateEntityList(mSubInfoEntityList, subInfoEntityList)) { mSubInfoEntityList = subInfoEntityList; update(); } Loading src/com/android/settings/network/NetworkProviderCallsSmsController.java +3 −5 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.settingslib.RestrictedPreference; import com.android.settingslib.Utils; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.mobile.dataservice.DataServiceUtils; import com.android.settingslib.mobile.dataservice.MobileNetworkInfoEntity; import com.android.settingslib.mobile.dataservice.SubscriptionInfoEntity; import com.android.settingslib.mobile.dataservice.UiccInfoEntity; Loading Loading @@ -223,10 +224,7 @@ public class NetworkProviderCallsSmsController extends AbstractPreferenceControl @Override public void onActiveSubInfoChanged(List<SubscriptionInfoEntity> activeSubInfoList) { if ((mSubInfoEntityList != null && (activeSubInfoList.isEmpty() || !activeSubInfoList.equals(mSubInfoEntityList))) || (!activeSubInfoList.isEmpty() && mSubInfoEntityList == null)) { Log.d(TAG, "subInfo list from framework is changed, update the subInfo entity list."); if (DataServiceUtils.shouldUpdateEntityList(mSubInfoEntityList, activeSubInfoList)) { mSubInfoEntityList = activeSubInfoList; update(); } Loading src/com/android/settings/network/NetworkProviderCallsSmsFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -57,8 +57,10 @@ public class NetworkProviderCallsSmsFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); controllers.add(new CallsDefaultSubscriptionController(context, KEY_PREFERENCE_CALLS)); controllers.add(new SmsDefaultSubscriptionController(context, KEY_PREFERENCE_SMS)); controllers.add(new CallsDefaultSubscriptionController(context, KEY_PREFERENCE_CALLS, getSettingsLifecycle(), this)); controllers.add(new SmsDefaultSubscriptionController(context, KEY_PREFERENCE_SMS, getSettingsLifecycle(), this)); mNetworkProviderWifiCallingPreferenceController = new NetworkProviderWifiCallingPreferenceController(context, KEY_PREFERENCE_CATEGORY_CALLING); Loading Loading
src/com/android/settings/network/InternetPreferenceController.java +2 −3 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import com.android.settings.widget.SummaryUpdater; import com.android.settings.wifi.WifiSummaryUpdater; import com.android.settingslib.Utils; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.mobile.dataservice.DataServiceUtils; import com.android.settingslib.mobile.dataservice.MobileNetworkInfoEntity; import com.android.settingslib.mobile.dataservice.SubscriptionInfoEntity; import com.android.settingslib.mobile.dataservice.UiccInfoEntity; Loading Loading @@ -237,9 +238,7 @@ public class InternetPreferenceController extends AbstractPreferenceController i @Override public void onAvailableSubInfoChanged(List<SubscriptionInfoEntity> subInfoEntityList) { if ((mSubInfoEntityList != null && (subInfoEntityList.isEmpty() || !subInfoEntityList.equals(mSubInfoEntityList))) || (!subInfoEntityList.isEmpty() && mSubInfoEntityList == null)) { if (DataServiceUtils.shouldUpdateEntityList(mSubInfoEntityList, subInfoEntityList)) { mSubInfoEntityList = subInfoEntityList; updateState(mPreference); } Loading
src/com/android/settings/network/MobileNetworkRepository.java +5 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.settings.network; import static android.telephony.UiccSlotInfo.CARD_STATE_INFO_PRESENT; import static com.android.internal.telephony.TelephonyIntents.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED; import android.app.settings.SettingsEnums; import android.content.BroadcastReceiver; import android.content.Context; Loading Loading @@ -125,6 +127,8 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions mAirplaneModeSettingUri = Settings.Global.getUriFor(Settings.Global.AIRPLANE_MODE_ON); mFilter.addAction(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED); mFilter.addAction(SubscriptionManager.ACTION_DEFAULT_SUBSCRIPTION_CHANGED); mFilter.addAction(ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED); mFilter.addAction(SubscriptionManager.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED); } private class AirplaneModeObserver extends ContentObserver { Loading Loading @@ -152,12 +156,8 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions private final BroadcastReceiver mDataSubscriptionChangedReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); if (action.equals(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED) || action.equals(SubscriptionManager.ACTION_DEFAULT_SUBSCRIPTION_CHANGED)) { onSubscriptionsChanged(); } } }; public void addRegister(LifecycleOwner lifecycleOwner) { Loading @@ -171,7 +171,6 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions public void removeRegister() { mAirplaneModeObserver.unRegister(mContext); mContext.getContentResolver().unregisterContentObserver(mAirplaneModeObserver); if (mDataSubscriptionChangedReceiver != null) { mContext.unregisterReceiver(mDataSubscriptionChangedReceiver); } Loading
src/com/android/settings/network/MobileNetworkSummaryController.java +2 −4 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import com.android.settings.widget.AddPreference; import com.android.settingslib.Utils; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.instrumentation.MetricsFeatureProvider; import com.android.settingslib.mobile.dataservice.DataServiceUtils; import com.android.settingslib.mobile.dataservice.MobileNetworkInfoEntity; import com.android.settingslib.mobile.dataservice.SubscriptionInfoEntity; import com.android.settingslib.mobile.dataservice.UiccInfoEntity; Loading Loading @@ -226,10 +227,7 @@ public class MobileNetworkSummaryController extends AbstractPreferenceController @Override public void onAvailableSubInfoChanged(List<SubscriptionInfoEntity> subInfoEntityList) { if ((mSubInfoEntityList != null && (subInfoEntityList.isEmpty() || !subInfoEntityList.equals(mSubInfoEntityList))) || (!subInfoEntityList.isEmpty() && mSubInfoEntityList == null)) { Log.d(TAG, "subInfo list from framework is changed, update the subInfo entity list."); if (DataServiceUtils.shouldUpdateEntityList(mSubInfoEntityList, subInfoEntityList)) { mSubInfoEntityList = subInfoEntityList; update(); } Loading
src/com/android/settings/network/NetworkProviderCallsSmsController.java +3 −5 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.settingslib.RestrictedPreference; import com.android.settingslib.Utils; import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.mobile.dataservice.DataServiceUtils; import com.android.settingslib.mobile.dataservice.MobileNetworkInfoEntity; import com.android.settingslib.mobile.dataservice.SubscriptionInfoEntity; import com.android.settingslib.mobile.dataservice.UiccInfoEntity; Loading Loading @@ -223,10 +224,7 @@ public class NetworkProviderCallsSmsController extends AbstractPreferenceControl @Override public void onActiveSubInfoChanged(List<SubscriptionInfoEntity> activeSubInfoList) { if ((mSubInfoEntityList != null && (activeSubInfoList.isEmpty() || !activeSubInfoList.equals(mSubInfoEntityList))) || (!activeSubInfoList.isEmpty() && mSubInfoEntityList == null)) { Log.d(TAG, "subInfo list from framework is changed, update the subInfo entity list."); if (DataServiceUtils.shouldUpdateEntityList(mSubInfoEntityList, activeSubInfoList)) { mSubInfoEntityList = activeSubInfoList; update(); } Loading
src/com/android/settings/network/NetworkProviderCallsSmsFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -57,8 +57,10 @@ public class NetworkProviderCallsSmsFragment extends DashboardFragment { @Override protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { final List<AbstractPreferenceController> controllers = new ArrayList<>(); controllers.add(new CallsDefaultSubscriptionController(context, KEY_PREFERENCE_CALLS)); controllers.add(new SmsDefaultSubscriptionController(context, KEY_PREFERENCE_SMS)); controllers.add(new CallsDefaultSubscriptionController(context, KEY_PREFERENCE_CALLS, getSettingsLifecycle(), this)); controllers.add(new SmsDefaultSubscriptionController(context, KEY_PREFERENCE_SMS, getSettingsLifecycle(), this)); mNetworkProviderWifiCallingPreferenceController = new NetworkProviderWifiCallingPreferenceController(context, KEY_PREFERENCE_CATEGORY_CALLING); Loading