Always set cross sim calling
By CrossSimCallingViewModel, in SIMs and per SIM settings page. To ensure the status is always right, including the case after the onboarding set up finished. Fix: 347882381 Fix: 348529996 Flag: EXEMPT bug fix Test: manual - turn on / off "Automatic data switching" on SIMs Test: manual - turn off "Automatic data switching" during onboarding Change-Id: Icc2eacb67850fa7b3aa0fe310cd09a0e0147912b
This commit is contained in:
@@ -38,7 +38,6 @@ import com.android.settings.datausage.DataUsageUtils;
|
||||
import com.android.settings.flags.Flags;
|
||||
import com.android.settings.network.MobileDataContentObserver;
|
||||
import com.android.settings.network.SubscriptionsChangeListener;
|
||||
import com.android.settings.network.telephony.wificalling.CrossSimCallingViewModel;
|
||||
|
||||
/**
|
||||
* Controls whether switch mobile data to the non-default SIM if the non-default SIM has better
|
||||
@@ -63,8 +62,6 @@ public class AutoDataSwitchPreferenceController extends TelephonyTogglePreferenc
|
||||
@Nullable
|
||||
private MobileDataContentObserver mMobileDataContentObserver;
|
||||
@Nullable
|
||||
private CrossSimCallingViewModel mCrossSimCallingViewModel;
|
||||
@Nullable
|
||||
private PreferenceScreen mScreen;
|
||||
|
||||
public AutoDataSwitchPreferenceController(
|
||||
@@ -72,10 +69,9 @@ public class AutoDataSwitchPreferenceController extends TelephonyTogglePreferenc
|
||||
super(context, preferenceKey);
|
||||
}
|
||||
|
||||
void init(int subId, @Nullable CrossSimCallingViewModel crossSimCallingViewModel) {
|
||||
void init(int subId) {
|
||||
this.mSubId = subId;
|
||||
mManager = mContext.getSystemService(TelephonyManager.class).createForSubscriptionId(subId);
|
||||
mCrossSimCallingViewModel = crossSimCallingViewModel;
|
||||
}
|
||||
|
||||
@OnLifecycleEvent(ON_RESUME)
|
||||
@@ -122,9 +118,6 @@ public class AutoDataSwitchPreferenceController extends TelephonyTogglePreferenc
|
||||
TelephonyManager.MOBILE_DATA_POLICY_AUTO_DATA_SWITCH,
|
||||
isChecked);
|
||||
}
|
||||
if (mCrossSimCallingViewModel != null) {
|
||||
mCrossSimCallingViewModel.updateCrossSimCalling();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user