private String mSelectedKey;
- private IntentFilter mMobileStateFilter;
+ private IntentFilter mIntentFilter;
private boolean mUnavailable;
super(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS);
}
- private final BroadcastReceiver mMobileStateReceiver = new BroadcastReceiver() {
+ private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(
}
break;
}
+ } else if(intent.getAction().equals(
+ TelephonyManager.ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED)) {
+ if (!mRestoreDefaultApnMode) {
+ fillList();
+ }
}
}
};
final int subId = activity.getIntent().getIntExtra(SUB_ID,
SubscriptionManager.INVALID_SUBSCRIPTION_ID);
- mMobileStateFilter = new IntentFilter(
+ mIntentFilter = new IntentFilter(
TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED);
+ mIntentFilter.addAction(TelephonyManager.ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED);
setIfOnlyAvailableForAdmins(true);
return;
}
- getActivity().registerReceiver(mMobileStateReceiver, mMobileStateFilter);
+ getActivity().registerReceiver(mReceiver, mIntentFilter);
if (!mRestoreDefaultApnMode) {
fillList();
return;
}
- getActivity().unregisterReceiver(mMobileStateReceiver);
+ getActivity().unregisterReceiver(mReceiver);
}
@Override