Only enable data for one SIM in DSDS.
Only enable mobile data for one SIM for simplicity. Which means When turning on mobile data on non-default sub, pop a notification to user that it will turn off data of the other one. Bug: 120515679 Test: manual and unittest Change-Id: I7c190bb70d771b7f280c246038a380e4fc7338a3
This commit is contained in:
committed by
Xiangyu/Malcolm Chen
parent
1ad5c9805a
commit
42055cbe50
@@ -20,6 +20,7 @@ import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_U
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.spy;
|
||||
@@ -104,9 +105,8 @@ public class MobileDataPreferenceControllerTest {
|
||||
public void isDialogNeeded_enableNonDefaultSimInMultiSimMode_returnTrue() {
|
||||
doReturn(false).when(mTelephonyManager).isDataEnabled();
|
||||
doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID);
|
||||
doReturn(null).when(mSubscriptionManager).getDefaultDataSubscriptionInfo();
|
||||
doReturn(true).when(mSubscriptionManager).isActiveSubscriptionId(anyInt());
|
||||
doReturn(2).when(mTelephonyManager).getSimCount();
|
||||
doReturn(1).when(mTelephonyManager).getNumberOfModemsWithSimultaneousDataConnections();
|
||||
|
||||
assertThat(mController.isDialogNeeded()).isTrue();
|
||||
assertThat(mController.mDialogType).isEqualTo(
|
||||
|
Reference in New Issue
Block a user