Merge "Update APIs for domain selection service plug-in" into main
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index a80bbfb..e53a674 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -13787,6 +13787,62 @@
}
/**
+ * Sets the service defined in ComponentName to be bound.
+ *
+ * This should only be used for testing.
+ * @return {@code true} if the DomainSelectionService to bind to was set,
+ * {@code false} otherwise.
+ */
+ @Override
+ public boolean setDomainSelectionServiceOverride(ComponentName componentName) {
+ Log.i(LOG_TAG, "setDomainSelectionServiceOverride component=" + componentName);
+
+ TelephonyPermissions.enforceShellOnly(Binder.getCallingUid(),
+ "setDomainSelectionServiceOverride");
+ TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(mApp,
+ getDefaultSubscription(), "setDomainSelectionServiceOverride");
+
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ if (DomainSelectionResolver.getInstance().isDomainSelectionSupported()) {
+ return DomainSelectionResolver.getInstance()
+ .setDomainSelectionServiceOverride(componentName);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ return false;
+ }
+
+ /**
+ * Clears the DomainSelectionService override.
+ *
+ * This should only be used for testing.
+ * @return {@code true} if the DomainSelectionService override was cleared,
+ * {@code false} otherwise.
+ */
+ @Override
+ public boolean clearDomainSelectionServiceOverride() {
+ Log.i(LOG_TAG, "clearDomainSelectionServiceOverride");
+
+ TelephonyPermissions.enforceShellOnly(Binder.getCallingUid(),
+ "clearDomainSelectionServiceOverride");
+ TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(mApp,
+ getDefaultSubscription(), "clearDomainSelectionServiceOverride");
+
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ if (DomainSelectionResolver.getInstance().isDomainSelectionSupported()) {
+ return DomainSelectionResolver.getInstance()
+ .clearDomainSelectionServiceOverride();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ return false;
+ }
+
+ /**
* Enable or disable notifications sent for cellular identifier disclosure events.
*
* Disclosure events are defined as instances where a device has sent a cellular identifier
diff --git a/src/com/android/phone/TelephonyShellCommand.java b/src/com/android/phone/TelephonyShellCommand.java
index f7a3640d..3e3d31d 100644
--- a/src/com/android/phone/TelephonyShellCommand.java
+++ b/src/com/android/phone/TelephonyShellCommand.java
@@ -26,6 +26,7 @@
import android.Manifest;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.content.ComponentName;
import android.content.Context;
import android.net.Uri;
import android.os.Binder;
@@ -202,6 +203,10 @@
private static final String SET_SHOULD_SEND_DATAGRAM_TO_MODEM_IN_DEMO_MODE =
"set-should-send-datagram-to-modem-in-demo-mode";
+ private static final String DOMAIN_SELECTION_SUBCOMMAND = "domainselection";
+ private static final String DOMAIN_SELECTION_SET_SERVICE_OVERRIDE = "set-dss-override";
+ private static final String DOMAIN_SELECTION_CLEAR_SERVICE_OVERRIDE = "clear-dss-override";
+
private static final String INVALID_ENTRY_ERROR = "An emergency number (only allow '0'-'9', "
+ "'*', '#' or '+') needs to be specified after -a in the command ";
@@ -382,6 +387,8 @@
return setCarrierServicePackageOverride();
case CLEAR_CARRIER_SERVICE_PACKAGE_OVERRIDE:
return clearCarrierServicePackageOverride();
+ case DOMAIN_SELECTION_SUBCOMMAND:
+ return handleDomainSelectionCommand();
case SET_SATELLITE_SERVICE_PACKAGE_NAME:
return handleSetSatelliteServicePackageNameCommand();
case SET_SATELLITE_GATEWAY_SERVICE_PACKAGE_NAME:
@@ -456,6 +463,7 @@
onHelpRadio();
onHelpImei();
onHelpSatellite();
+ onHelpDomainSelection();
}
private void onHelpD2D() {
@@ -843,6 +851,15 @@
pw.println(" is specified, it will choose the default voice SIM slot.");
}
+ private void onHelpDomainSelection() {
+ PrintWriter pw = getOutPrintWriter();
+ pw.println("Domain Selection Commands:");
+ pw.println(" domainselection set-dss-override COMPONENT_NAME");
+ pw.println(" Sets the service defined in COMPONENT_NAME to be bound");
+ pw.println(" domainselection clear-dss-override");
+ pw.println(" Clears DomainSelectionService override.");
+ }
+
private int handleImsCommand() {
String arg = getNextArg();
if (arg == null) {
@@ -3744,6 +3761,66 @@
return 0;
}
+ private int handleDomainSelectionCommand() {
+ String arg = getNextArg();
+ if (arg == null) {
+ onHelpDomainSelection();
+ return 0;
+ }
+
+ switch (arg) {
+ case DOMAIN_SELECTION_SET_SERVICE_OVERRIDE: {
+ return handleDomainSelectionSetServiceOverrideCommand();
+ }
+ case DOMAIN_SELECTION_CLEAR_SERVICE_OVERRIDE: {
+ return handleDomainSelectionClearServiceOverrideCommand();
+ }
+ }
+
+ return -1;
+ }
+
+ // domainselection set-dss-override
+ private int handleDomainSelectionSetServiceOverrideCommand() {
+ PrintWriter errPw = getErrPrintWriter();
+
+ String componentName = getNextArg();
+
+ try {
+ boolean result = mInterface.setDomainSelectionServiceOverride(
+ ComponentName.unflattenFromString(componentName));
+ if (VDBG) {
+ Log.v(LOG_TAG, "domainselection set-dss-override "
+ + componentName + ", result=" + result);
+ }
+ getOutPrintWriter().println(result);
+ } catch (Exception e) {
+ Log.w(LOG_TAG, "domainselection set-dss-override "
+ + componentName + ", error=" + e.getMessage());
+ errPw.println("Exception: " + e.getMessage());
+ return -1;
+ }
+ return 0;
+ }
+
+ // domainselection clear-dss-override
+ private int handleDomainSelectionClearServiceOverrideCommand() {
+ PrintWriter errPw = getErrPrintWriter();
+
+ try {
+ boolean result = mInterface.clearDomainSelectionServiceOverride();
+ if (VDBG) {
+ Log.v(LOG_TAG, "domainselection clear-dss-override result=" + result);
+ }
+ getOutPrintWriter().println(result);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "domainselection clear-dss-override error=" + e.getMessage());
+ errPw.println("Exception: " + e.getMessage());
+ return -1;
+ }
+ return 0;
+ }
+
/**
* Building the string that can be used to build the JsonObject which supports to stub the data
* in CarrierAllowListInfo for CTS testing. sample format is like
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index 2f28607..acd83c3 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -2392,7 +2392,7 @@
SelectionAttributes selectionAttributes =
new SelectionAttributes.Builder(phone.getPhoneId(), phone.getSubId(),
SELECTOR_TYPE_CALLING)
- .setNumber(number)
+ .setAddress(Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null))
.setEmergency(false)
.setVideoCall(VideoProfile.isVideo(videoState))
.build();
@@ -2441,7 +2441,7 @@
}
if (result == android.telephony.DisconnectCause.NOT_DISCONNECTED) {
createEmergencyConnection(phone, (TelephonyConnection) resultConnection,
- numberToDial, request, needToTurnOnRadio,
+ numberToDial, isTestEmergencyNumber, request, needToTurnOnRadio,
mEmergencyStateTracker.getEmergencyRegResult());
} else {
mEmergencyConnection = null;
@@ -2465,6 +2465,7 @@
@SuppressWarnings("FutureReturnValueIgnored")
private void createEmergencyConnection(final Phone phone,
final TelephonyConnection resultConnection, final String number,
+ final boolean isTestEmergencyNumber,
final ConnectionRequest request, boolean needToTurnOnRadio,
final EmergencyRegResult regResult) {
Log.i(this, "createEmergencyConnection");
@@ -2506,7 +2507,8 @@
DomainSelectionService.SelectionAttributes attr =
EmergencyCallDomainSelectionConnection.getSelectionAttributes(
phone.getPhoneId(), phone.getSubId(), needToTurnOnRadio,
- request.getTelecomCallId(), number, 0, null, regResult);
+ request.getTelecomCallId(), number, isTestEmergencyNumber,
+ 0, null, regResult);
CompletableFuture<Integer> future =
mEmergencyCallDomainSelectionConnection.createEmergencyConnection(
@@ -2611,7 +2613,7 @@
EmergencyCallDomainSelectionConnection.getSelectionAttributes(
c.getPhone().getPhoneId(), c.getPhone().getSubId(), false,
c.getTelecomCallId(), c.getAddress().getSchemeSpecificPart(),
- callFailCause, reasonInfo, null);
+ false, callFailCause, reasonInfo, null);
CompletableFuture<Integer> future =
mEmergencyCallDomainSelectionConnection.reselectDomain(attr);
@@ -2881,7 +2883,7 @@
phone.getPhoneId(),
phone.getSubId(), false,
c.getTelecomCallId(),
- c.getAddress().getSchemeSpecificPart(),
+ c.getAddress().getSchemeSpecificPart(), isTestEmergencyNumber,
0, null, mEmergencyStateTracker.getEmergencyRegResult());
CompletableFuture<Integer> domainFuture =
diff --git a/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelector.java b/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelector.java
index ae09ace..affb7c3 100644
--- a/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelector.java
+++ b/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelector.java
@@ -79,11 +79,9 @@
import android.telephony.DomainSelectionService.SelectionAttributes;
import android.telephony.EmergencyRegResult;
import android.telephony.NetworkRegistrationInfo;
-import android.telephony.PhoneNumberUtils;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.telephony.TransportSelectorCallback;
-import android.telephony.emergency.EmergencyNumber;
import android.telephony.ims.ImsManager;
import android.telephony.ims.ImsMmTelManager;
import android.telephony.ims.ProvisioningManager;
@@ -95,9 +93,7 @@
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import java.util.function.IntFunction;
/**
@@ -286,7 +282,7 @@
&& (mScanType == DomainSelectionService.SCAN_TYPE_FULL_SERVICE)) {
mScanType = DomainSelectionService.SCAN_TYPE_LIMITED_SERVICE;
mWwanSelectorCallback.onRequestEmergencyNetworkScan(
- mLastPreferredNetworks, mScanType, mCancelSignal,
+ mLastPreferredNetworks, mScanType, false, mCancelSignal,
(regResult) -> {
logi("requestScan-onComplete");
sendMessage(obtainMessage(MSG_NETWORK_SCAN_RESULT, regResult));
@@ -327,12 +323,6 @@
}
@Override
- public void cancelSelection() {
- logi("cancelSelection");
- finishSelection();
- }
-
- @Override
public void reselectDomain(SelectionAttributes attr) {
logi("reselectDomain attr=" + attr);
mSelectionAttributes = attr;
@@ -345,7 +335,6 @@
int cause = mSelectionAttributes.getCsDisconnectCause();
mCrossSimRedialingController.notifyCallFailure(cause);
- // TODO(b/258112541) make EMERGENCY_PERM_FAILURE and EMERGENCY_TEMP_FAILURE public api
if (cause == EMERGENCY_PERM_FAILURE
|| cause == EMERGENCY_TEMP_FAILURE) {
logi("reselectDomain should redial on the other subscription");
@@ -433,7 +422,7 @@
logi("selectDomain attr=" + attr);
mTransportSelectorCallback = cb;
mSelectionAttributes = attr;
- mIsTestEmergencyNumber = isTestEmergencyNumber(attr.getNumber());
+ mIsTestEmergencyNumber = attr.isTestEmergencyNumber();
TelephonyManager tm = mContext.getSystemService(TelephonyManager.class);
mModemCount = tm.getActiveModemCount();
@@ -760,7 +749,7 @@
mIsScanRequested = true;
mWwanSelectorCallback.onRequestEmergencyNetworkScan(
- mLastPreferredNetworks, mScanType, mCancelSignal,
+ mLastPreferredNetworks, mScanType, false, mCancelSignal,
(result) -> {
logi("requestScan-onComplete");
sendMessage(obtainMessage(MSG_NETWORK_SCAN_RESULT, result));
@@ -1178,7 +1167,8 @@
}
if (!mCdmaPreferredNumbers.isEmpty()) {
- if (mCdmaPreferredNumbers.contains(mSelectionAttributes.getNumber())) {
+ String number = mSelectionAttributes.getAddress().getSchemeSpecificPart();
+ if (mCdmaPreferredNumbers.contains(number)) {
// The number will be dialed over CDMA.
ratList.clear();
ratList.add(new Integer(CDMA2000));
@@ -1214,7 +1204,7 @@
if (regResult.getRegState() == REGISTRATION_STATE_HOME) return false;
if (regResult.getRegState() == REGISTRATION_STATE_ROAMING) return true;
- String iso = regResult.getIso();
+ String iso = regResult.getCountryIso();
if (!TextUtils.isEmpty(iso)) netIso = iso;
}
@@ -1370,7 +1360,7 @@
return true;
}
- String iso = regResult.getIso();
+ String iso = regResult.getCountryIso();
if (sSimReadyAllowList.contains(iso)) {
TelephonyManager tm = mContext.getSystemService(TelephonyManager.class);
int simState = tm.getSimState(getSlotId());
@@ -1426,8 +1416,9 @@
inRoaming = (regState == REGISTRATION_STATE_ROAMING) || isInRoaming();
}
+ String number = mSelectionAttributes.getAddress().getSchemeSpecificPart();
mCrossSimRedialingController.startTimer(mContext, this, mSelectionAttributes.getCallId(),
- mSelectionAttributes.getNumber(), inService, inRoaming, mModemCount);
+ number, inService, inRoaming, mModemCount);
}
/** Notifies that the cross stack redilaing timer has been expired. */
@@ -1563,28 +1554,6 @@
}
}
- private boolean isTestEmergencyNumber(String number) {
- number = PhoneNumberUtils.stripSeparators(number);
- Map<Integer, List<EmergencyNumber>> list = new HashMap<>();
- try {
- TelephonyManager tm = mContext.getSystemService(TelephonyManager.class);
- list = tm.getEmergencyNumberList();
- } catch (IllegalStateException ise) {
- loge("isTestEmergencyNumber ise=" + ise);
- }
-
- for (Integer sub : list.keySet()) {
- for (EmergencyNumber eNumber : list.get(sub)) {
- if (number.equals(eNumber.getNumber())
- && eNumber.isFromSources(EmergencyNumber.EMERGENCY_NUMBER_SOURCE_TEST)) {
- logd("isTestEmergencyNumber: " + number + " is a test emergency number.");
- return true;
- }
- }
- }
- return false;
- }
-
@Override
protected void logi(String msg) {
super.logi(msg);
diff --git a/src/com/android/services/telephony/domainselection/EmergencySmsDomainSelector.java b/src/com/android/services/telephony/domainselection/EmergencySmsDomainSelector.java
index a2f986f..5adca5a 100644
--- a/src/com/android/services/telephony/domainselection/EmergencySmsDomainSelector.java
+++ b/src/com/android/services/telephony/domainselection/EmergencySmsDomainSelector.java
@@ -230,7 +230,7 @@
mEmergencyNetworkScanSignal = new CancellationSignal();
mWwanSelectorCallback.onRequestEmergencyNetworkScan(
preferredNetworks,
- DomainSelectionService.SCAN_TYPE_FULL_SERVICE,
+ DomainSelectionService.SCAN_TYPE_FULL_SERVICE, false,
mEmergencyNetworkScanSignal,
(regResult) -> {
logi("requestEmergencyNetworkScan-onComplete");
diff --git a/src/com/android/services/telephony/domainselection/NormalCallDomainSelector.java b/src/com/android/services/telephony/domainselection/NormalCallDomainSelector.java
index cd70793..106bfea 100644
--- a/src/com/android/services/telephony/domainselection/NormalCallDomainSelector.java
+++ b/src/com/android/services/telephony/domainselection/NormalCallDomainSelector.java
@@ -80,7 +80,7 @@
return;
}
- int subId = attributes.getSubId();
+ int subId = attributes.getSubscriptionId();
boolean validSubscriptionId = SubscriptionManager.isValidSubscriptionId(subId);
if (attributes.getSelectorType() != SELECTOR_TYPE_CALLING || attributes.isEmergency()
|| !validSubscriptionId) {
@@ -129,11 +129,6 @@
}
}
- /**
- * Cancel an ongoing selection operation. It is up to the DomainSelectionService
- * to clean up all ongoing operations with the framework.
- */
- @Override
public void cancelSelection() {
logd("cancelSelection");
mStopDomainSelection = true;
@@ -243,7 +238,7 @@
PersistableBundle config = null;
if (configManager != null) {
- config = configManager.getConfigForSubId(mSelectionAttributes.getSubId(),
+ config = configManager.getConfigForSubId(mSelectionAttributes.getSubscriptionId(),
new String[] {CarrierConfigManager.KEY_SUPPORT_WPS_OVER_IMS_BOOL});
}
@@ -271,7 +266,7 @@
PersistableBundle config = null;
if (configManager != null) {
- config = configManager.getConfigForSubId(mSelectionAttributes.getSubId(),
+ config = configManager.getConfigForSubId(mSelectionAttributes.getSubscriptionId(),
new String[] {CarrierConfigManager.KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL});
}
@@ -387,7 +382,8 @@
// Handle voice call.
if (mImsStateTracker.isImsVoiceCapable()) {
logd("IMS is voice capable");
- if (PhoneNumberUtils.isWpsCallNumber(mSelectionAttributes.getNumber())) {
+ String number = mSelectionAttributes.getAddress().getSchemeSpecificPart();
+ if (PhoneNumberUtils.isWpsCallNumber(number)) {
handleWpsCall();
} else {
notifyPsSelected();
diff --git a/src/com/android/services/telephony/domainselection/SmsDomainSelector.java b/src/com/android/services/telephony/domainselection/SmsDomainSelector.java
index 95b04e2..4e41e43 100644
--- a/src/com/android/services/telephony/domainselection/SmsDomainSelector.java
+++ b/src/com/android/services/telephony/domainselection/SmsDomainSelector.java
@@ -71,12 +71,6 @@
}
@Override
- public void cancelSelection() {
- logi("cancelSelection");
- finishSelection();
- }
-
- @Override
public void reselectDomain(@NonNull SelectionAttributes attr) {
if (isDomainSelectionRequested()) {
// The domain selection is already requested,
diff --git a/src/com/android/services/telephony/domainselection/TelephonyDomainSelectionService.java b/src/com/android/services/telephony/domainselection/TelephonyDomainSelectionService.java
index fca5966..c86eff9 100644
--- a/src/com/android/services/telephony/domainselection/TelephonyDomainSelectionService.java
+++ b/src/com/android/services/telephony/domainselection/TelephonyDomainSelectionService.java
@@ -18,7 +18,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
@@ -227,7 +226,7 @@
mContext = getApplicationContext();
// Create a worker thread for this domain selection service.
- getExecutor();
+ onCreateExecutor();
TelephonyManager tm = mContext.getSystemService(TelephonyManager.class);
int activeModemCount = (tm != null) ? tm.getActiveModemCount() : 1;
@@ -317,8 +316,8 @@
@Override
public void onDomainSelection(@NonNull SelectionAttributes attr,
@NonNull TransportSelectorCallback callback) {
- final int slotId = attr.getSlotId();
- final int subId = attr.getSubId();
+ final int slotId = attr.getSlotIndex();
+ final int subId = attr.getSubscriptionId();
final int selectorType = attr.getSelectorType();
final boolean isEmergency = attr.isEmergency();
ImsStateTracker ist = getImsStateTracker(slotId);
@@ -385,8 +384,15 @@
/**
* Returns an Executor used to execute methods called remotely by the framework.
*/
- @SuppressLint("OnNameExpected")
@Override
+ public @NonNull Executor onCreateExecutor() {
+ return getExecutor();
+ }
+
+ /**
+ * Returns an Executor used to execute methods called remotely by the framework.
+ */
+ @VisibleForTesting
public @NonNull Executor getExecutor() {
if (mServiceHandler == null) {
HandlerThread handlerThread = new HandlerThread(TAG);
@@ -506,7 +512,6 @@
switch (selectorType) {
case SELECTOR_TYPE_CALLING: return "CALLING";
case SELECTOR_TYPE_SMS: return "SMS";
- case SELECTOR_TYPE_UT: return "UT";
default: return Integer.toString(selectorType);
}
}
diff --git a/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java b/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java
index 02e97c5..6f18c21 100644
--- a/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java
+++ b/tests/src/com/android/services/telephony/TelephonyConnectionServiceTest.java
@@ -2698,7 +2698,7 @@
DomainSelectionService.SelectionAttributes attr = attrCaptor.getValue();
- assertEquals(mPhone1.getPhoneId(), attr.getSlotId());
+ assertEquals(mPhone1.getPhoneId(), attr.getSlotIndex());
}
@Test
@@ -2744,7 +2744,7 @@
DomainSelectionService.SelectionAttributes attr = attrCaptor.getValue();
- assertEquals(mPhone1.getPhoneId(), attr.getSlotId());
+ assertEquals(mPhone1.getPhoneId(), attr.getSlotIndex());
}
@Test
diff --git a/tests/src/com/android/services/telephony/domainselection/DomainSelectorBaseTest.java b/tests/src/com/android/services/telephony/domainselection/DomainSelectorBaseTest.java
index 74c3311..a5d463d 100644
--- a/tests/src/com/android/services/telephony/domainselection/DomainSelectorBaseTest.java
+++ b/tests/src/com/android/services/telephony/domainselection/DomainSelectorBaseTest.java
@@ -52,11 +52,6 @@
}
@Override
- public void cancelSelection() {
- // No operations.
- }
-
- @Override
public void reselectDomain(@NonNull SelectionAttributes attr) {
// No operations.
}
diff --git a/tests/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelectorTest.java b/tests/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelectorTest.java
index 161d388..ead775a 100644
--- a/tests/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelectorTest.java
+++ b/tests/src/com/android/services/telephony/domainselection/EmergencyCallDomainSelectorTest.java
@@ -83,6 +83,7 @@
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.NetworkRequest;
+import android.net.Uri;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IPowerManager;
@@ -90,6 +91,7 @@
import android.os.Looper;
import android.os.PersistableBundle;
import android.os.PowerManager;
+import android.telecom.PhoneAccount;
import android.telephony.AccessNetworkConstants;
import android.telephony.BarringInfo;
import android.telephony.CarrierConfigManager;
@@ -104,7 +106,6 @@
import android.telephony.TelephonyManager;
import android.telephony.TransportSelectorCallback;
import android.telephony.WwanSelectorCallback;
-import android.telephony.emergency.EmergencyNumber;
import android.telephony.ims.ImsManager;
import android.telephony.ims.ImsMmTelManager;
import android.telephony.ims.ProvisioningManager;
@@ -125,10 +126,7 @@
import org.mockito.stubbing.Answer;
import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import java.util.function.Consumer;
/**
@@ -139,7 +137,7 @@
private static final int SLOT_0 = 0;
private static final int SLOT_0_SUB_ID = 1;
- private static final String TEST_EMERGENCY_NUMBER = "911";
+ private static final Uri TEST_URI = Uri.fromParts(PhoneAccount.SCHEME_TEL, "911", null);
@Mock private CarrierConfigManager mCarrierConfigManager;
@Mock private ConnectivityManager mConnectivityManager;
@@ -255,7 +253,6 @@
doReturn(mProvisioningManager).when(imsManager).getProvisioningManager(anyInt());
doReturn(null).when(mProvisioningManager).getProvisioningStringValue(anyInt());
- when(mTransportSelectorCallback.onWwanSelected()).thenReturn(mWwanSelectorCallback);
doAnswer(new Answer<Void>() {
@Override
public Void answer(InvocationOnMock invocation) throws Throwable {
@@ -270,11 +267,11 @@
@Override
public Void answer(InvocationOnMock invocation) throws Throwable {
mAccessNetwork = (List<Integer>) invocation.getArguments()[0];
- mResultConsumer = (Consumer<EmergencyRegResult>) invocation.getArguments()[3];
+ mResultConsumer = (Consumer<EmergencyRegResult>) invocation.getArguments()[4];
return null;
}
}).when(mWwanSelectorCallback).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
when(mResources.getStringArray(anyInt())).thenReturn(null);
}
@@ -298,7 +295,7 @@
createSelector(SLOT_0_SUB_ID);
verify(mWwanSelectorCallback, times(0)).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
verify(mWwanSelectorCallback, times(0)).onDomainSelected(anyInt(), eq(true));
}
@@ -391,7 +388,7 @@
verify(mTransportSelectorCallback, times(1)).onWwanSelected(any());
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
}
@Test
@@ -499,6 +496,7 @@
//Extended service request failed
SelectionAttributes.Builder builder =
new SelectionAttributes.Builder(SLOT_0, SLOT_0_SUB_ID, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setCsDisconnectCause(SERVICE_OPTION_NOT_AVAILABLE)
.setEmergency(true)
.setEmergencyRegResult(regResult);
@@ -569,7 +567,7 @@
true, true, 0, 0, "", "");
SelectionAttributes attr = new SelectionAttributes.Builder(
SLOT_0, SLOT_0_SUB_ID, SELECTOR_TYPE_CALLING)
- .setNumber(TEST_EMERGENCY_NUMBER)
+ .setAddress(TEST_URI)
.setEmergency(true)
.setEmergencyRegResult(regResult)
.setExitedFromAirplaneMode(true)
@@ -596,7 +594,7 @@
true, true, 0, 0, "", "");
SelectionAttributes attr = new SelectionAttributes.Builder(
SLOT_0, SLOT_0_SUB_ID, SELECTOR_TYPE_CALLING)
- .setNumber(TEST_EMERGENCY_NUMBER)
+ .setAddress(TEST_URI)
.setEmergency(true)
.setEmergencyRegResult(regResult)
.setExitedFromAirplaneMode(true)
@@ -1567,18 +1565,18 @@
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), eq(DomainSelectionService.SCAN_TYPE_FULL_SERVICE), any(), any());
+ any(), eq(DomainSelectionService.SCAN_TYPE_FULL_SERVICE), eq(false), any(), any());
assertNotNull(mResultConsumer);
mResultConsumer.accept(regResult);
processAllMessages();
verify(mWwanSelectorCallback, times(2)).onRequestEmergencyNetworkScan(
- any(), eq(DomainSelectionService.SCAN_TYPE_FULL_SERVICE), any(), any());
+ any(), eq(DomainSelectionService.SCAN_TYPE_FULL_SERVICE), eq(false), any(), any());
}
@Test
- public void testFullServiceThenLimtedService() throws Exception {
+ public void testFullServiceThenLimitedService() throws Exception {
PersistableBundle bundle = getDefaultPersistableBundle();
bundle.putInt(KEY_EMERGENCY_NETWORK_SCAN_TYPE_INT,
SCAN_TYPE_FULL_SERVICE_FOLLOWED_BY_LIMITED_SERVICE);
@@ -1598,14 +1596,15 @@
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), eq(DomainSelectionService.SCAN_TYPE_FULL_SERVICE), any(), any());
+ any(), eq(DomainSelectionService.SCAN_TYPE_FULL_SERVICE), eq(false), any(), any());
assertNotNull(mResultConsumer);
mResultConsumer.accept(regResult);
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), eq(DomainSelectionService.SCAN_TYPE_LIMITED_SERVICE), any(), any());
+ any(), eq(DomainSelectionService.SCAN_TYPE_LIMITED_SERVICE),
+ eq(false), any(), any());
}
@Test
@@ -1876,16 +1875,6 @@
}
@Test
- public void testStopCrossStackTimerOnCancel() throws Exception {
- createSelector(SLOT_0_SUB_ID);
- unsolBarringInfoChanged(false);
-
- mDomainSelector.cancelSelection();
-
- verify(mCsrdCtrl).stopTimer();
- }
-
- @Test
public void testStopCrossStackTimerOnFinish() throws Exception {
createSelector(SLOT_0_SUB_ID);
unsolBarringInfoChanged(false);
@@ -1912,6 +1901,7 @@
verifyCsDialed();
attr = new SelectionAttributes.Builder(SLOT_0, SLOT_0_SUB_ID, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setEmergency(true)
.setEmergencyRegResult(regResult)
.setCsDisconnectCause(PreciseDisconnectCause.EMERGENCY_TEMP_FAILURE)
@@ -1940,6 +1930,7 @@
verifyCsDialed();
attr = new SelectionAttributes.Builder(SLOT_0, SLOT_0_SUB_ID, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setEmergency(true)
.setEmergencyRegResult(regResult)
.setCsDisconnectCause(PreciseDisconnectCause.EMERGENCY_PERM_FAILURE)
@@ -2203,7 +2194,7 @@
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
assertEquals(4, mAccessNetwork.size());
assertEquals(EUTRAN, (int) mAccessNetwork.get(0));
assertEquals(NGRAN, (int) mAccessNetwork.get(1));
@@ -2229,7 +2220,7 @@
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
assertEquals(4, mAccessNetwork.size());
assertEquals(EUTRAN, (int) mAccessNetwork.get(0));
assertEquals(UTRAN, (int) mAccessNetwork.get(1));
@@ -2253,7 +2244,7 @@
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
assertEquals(4, mAccessNetwork.size());
assertEquals(EUTRAN, (int) mAccessNetwork.get(0));
assertEquals(UTRAN, (int) mAccessNetwork.get(1));
@@ -2280,7 +2271,7 @@
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
assertEquals(4, mAccessNetwork.size());
assertEquals(EUTRAN, (int) mAccessNetwork.get(0));
assertEquals(NGRAN, (int) mAccessNetwork.get(1));
@@ -2323,24 +2314,13 @@
@Ignore("Deprecated.")
@Test
public void testTestEmergencyNumberOverCs() throws Exception {
- EmergencyNumber num = new EmergencyNumber(TEST_EMERGENCY_NUMBER, "us", "",
- EmergencyNumber.EMERGENCY_SERVICE_CATEGORY_POLICE, new ArrayList<String>(),
- EmergencyNumber.EMERGENCY_NUMBER_SOURCE_TEST,
- EmergencyNumber.EMERGENCY_CALL_ROUTING_UNKNOWN);
-
- Map<Integer, List<EmergencyNumber>> lists = new HashMap<>();
- List<EmergencyNumber> list = new ArrayList<>();
- list.add(num);
- lists.put(SLOT_0_SUB_ID, list);
-
- doReturn(lists).when(mTelephonyManager).getEmergencyNumberList();
-
createSelector(SLOT_0_SUB_ID);
unsolBarringInfoChanged(false);
EmergencyRegResult regResult = getEmergencyRegResult(EUTRAN, REGISTRATION_STATE_UNKNOWN,
0, false, true, 0, 0, "", "");
- SelectionAttributes attr = getSelectionAttributes(SLOT_0, SLOT_0_SUB_ID, regResult);
+ SelectionAttributes attr = getSelectionAttributes(SLOT_0, SLOT_0_SUB_ID,
+ true /*isTestEmergencyNumber*/, regResult);
mDomainSelector.selectDomain(attr, mTransportSelectorCallback);
processAllMessages();
@@ -2352,24 +2332,13 @@
@Ignore("Deprecated.")
@Test
public void testTestEmergencyNumberOverPs() throws Exception {
- EmergencyNumber num = new EmergencyNumber(TEST_EMERGENCY_NUMBER, "us", "",
- EmergencyNumber.EMERGENCY_SERVICE_CATEGORY_POLICE, new ArrayList<String>(),
- EmergencyNumber.EMERGENCY_NUMBER_SOURCE_TEST,
- EmergencyNumber.EMERGENCY_CALL_ROUTING_UNKNOWN);
-
- Map<Integer, List<EmergencyNumber>> lists = new HashMap<>();
- List<EmergencyNumber> list = new ArrayList<>();
- list.add(num);
- lists.put(SLOT_0_SUB_ID, list);
-
- doReturn(lists).when(mTelephonyManager).getEmergencyNumberList();
-
createSelector(SLOT_0_SUB_ID);
unsolBarringInfoChanged(false);
EmergencyRegResult regResult = getEmergencyRegResult(EUTRAN, REGISTRATION_STATE_UNKNOWN,
0, false, true, 0, 0, "", "");
- SelectionAttributes attr = getSelectionAttributes(SLOT_0, SLOT_0_SUB_ID, regResult);
+ SelectionAttributes attr = getSelectionAttributes(SLOT_0, SLOT_0_SUB_ID,
+ true /*isTestEmergencyNumber*/, regResult);
mDomainSelector.selectDomain(attr, mTransportSelectorCallback);
processAllMessages();
@@ -2381,24 +2350,13 @@
@Ignore("Deprecated.")
@Test
public void testTestEmergencyNumberOverWifi() throws Exception {
- EmergencyNumber num = new EmergencyNumber(TEST_EMERGENCY_NUMBER, "us", "",
- EmergencyNumber.EMERGENCY_SERVICE_CATEGORY_POLICE, new ArrayList<String>(),
- EmergencyNumber.EMERGENCY_NUMBER_SOURCE_TEST,
- EmergencyNumber.EMERGENCY_CALL_ROUTING_UNKNOWN);
-
- Map<Integer, List<EmergencyNumber>> lists = new HashMap<>();
- List<EmergencyNumber> list = new ArrayList<>();
- list.add(num);
- lists.put(SLOT_0_SUB_ID, list);
-
- doReturn(lists).when(mTelephonyManager).getEmergencyNumberList();
-
createSelector(SLOT_0_SUB_ID);
unsolBarringInfoChanged(false);
EmergencyRegResult regResult = getEmergencyRegResult(EUTRAN, REGISTRATION_STATE_UNKNOWN,
0, false, true, 0, 0, "", "");
- SelectionAttributes attr = getSelectionAttributes(SLOT_0, SLOT_0_SUB_ID, regResult);
+ SelectionAttributes attr = getSelectionAttributes(SLOT_0, SLOT_0_SUB_ID,
+ true /*isTestEmergencyNumber*/, regResult);
mDomainSelector.selectDomain(attr, mTransportSelectorCallback);
processAllMessages();
@@ -2577,7 +2535,7 @@
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
assertNotNull(mResultConsumer);
}
@@ -2611,7 +2569,7 @@
private void verifyScanPreferred(int scanType, int expectedPreferredAccessNetwork) {
processAllMessages();
verify(mWwanSelectorCallback, times(1)).onRequestEmergencyNetworkScan(
- any(), eq(scanType), any(), any());
+ any(), eq(scanType), anyBoolean(), any(), any());
assertEquals(expectedPreferredAccessNetwork, (int) mAccessNetwork.get(0));
}
@@ -2753,12 +2711,18 @@
return bundle;
}
- public static SelectionAttributes getSelectionAttributes(int slotId, int subId,
+ private static SelectionAttributes getSelectionAttributes(int slotId, int subId,
EmergencyRegResult regResult) {
+ return getSelectionAttributes(slotId, subId, false, regResult);
+ }
+
+ private static SelectionAttributes getSelectionAttributes(int slotId, int subId,
+ boolean isTestEmergencyNumber, EmergencyRegResult regResult) {
SelectionAttributes.Builder builder =
new SelectionAttributes.Builder(slotId, subId, SELECTOR_TYPE_CALLING)
- .setNumber(TEST_EMERGENCY_NUMBER)
+ .setAddress(TEST_URI)
.setEmergency(true)
+ .setTestEmergencyNumber(isTestEmergencyNumber)
.setEmergencyRegResult(regResult);
return builder.build();
}
diff --git a/tests/src/com/android/services/telephony/domainselection/EmergencySmsDomainSelectorTest.java b/tests/src/com/android/services/telephony/domainselection/EmergencySmsDomainSelectorTest.java
index 2af0b3f..e10e9bd 100644
--- a/tests/src/com/android/services/telephony/domainselection/EmergencySmsDomainSelectorTest.java
+++ b/tests/src/com/android/services/telephony/domainselection/EmergencySmsDomainSelectorTest.java
@@ -22,6 +22,7 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
@@ -764,7 +765,8 @@
processAllMessages();
// onRequestEmergencyNetworkScan is invoked only once.
- verify(mWwanSelectorCallback).onRequestEmergencyNetworkScan(any(), anyInt(), any(), any());
+ verify(mWwanSelectorCallback).onRequestEmergencyNetworkScan(any(), anyInt(),
+ anyBoolean(), any(), any());
}
@Test
@@ -991,11 +993,11 @@
doAnswer((invocation) -> {
Object[] args = invocation.getArguments();
- final Consumer<EmergencyRegResult> result = (Consumer<EmergencyRegResult>) args[3];
+ final Consumer<EmergencyRegResult> result = (Consumer<EmergencyRegResult>) args[4];
result.accept(mEmergencyRegResult);
return null;
}).when(mWwanSelectorCallback).onRequestEmergencyNetworkScan(
- any(), anyInt(), any(), any());
+ any(), anyInt(), anyBoolean(), any(), any());
}
private void setUpEmergencyRegResult(
diff --git a/tests/src/com/android/services/telephony/domainselection/NormalCallDomainSelectorTest.java b/tests/src/com/android/services/telephony/domainselection/NormalCallDomainSelectorTest.java
index 002c7d5..d6e701a 100644
--- a/tests/src/com/android/services/telephony/domainselection/NormalCallDomainSelectorTest.java
+++ b/tests/src/com/android/services/telephony/domainselection/NormalCallDomainSelectorTest.java
@@ -17,7 +17,6 @@
package com.android.services.telephony.domainselection;
import static android.telephony.DomainSelectionService.SELECTOR_TYPE_CALLING;
-import static android.telephony.DomainSelectionService.SELECTOR_TYPE_UT;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -28,10 +27,12 @@
import android.annotation.NonNull;
import android.content.Context;
+import android.net.Uri;
import android.os.CancellationSignal;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.PersistableBundle;
+import android.telecom.PhoneAccount;
import android.telecom.TelecomManager;
import android.telephony.AccessNetworkConstants;
import android.telephony.CarrierConfigManager;
@@ -69,10 +70,12 @@
public class NormalCallDomainSelectorTest {
private static final String TAG = "NormalCallDomainSelectorTest";
+ private static final int SELECTOR_TYPE_UT = 3;
private static final int SLOT_ID = 0;
private static final int SUB_ID_1 = 1;
private static final int SUB_ID_2 = 2;
private static final String TEST_CALLID = "01234";
+ private static final Uri TEST_URI = Uri.fromParts(PhoneAccount.SCHEME_TEL, "123456789", null);
private HandlerThread mHandlerThread;
private NormalCallDomainSelector mNormalCallDomainSelector;
@@ -157,6 +160,7 @@
DomainSelectionService.SelectionAttributes attributes =
new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SUB_ID_1, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setCallId(TEST_CALLID)
.setEmergency(false)
.setVideoCall(true)
@@ -193,6 +197,7 @@
// Case 4: Invalid Subscription-id
attributes = new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SubscriptionManager.INVALID_SUBSCRIPTION_ID, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setCallId(TEST_CALLID)
.setEmergency(false)
.setVideoCall(true)
@@ -211,6 +216,7 @@
attributes =
new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SUB_ID_1, SELECTOR_TYPE_UT)
+ .setAddress(TEST_URI)
.setCallId(TEST_CALLID)
.setEmergency(false)
.setVideoCall(true)
@@ -228,6 +234,7 @@
// Case 6: Emergency Call
attributes = new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SUB_ID_1, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setCallId(TEST_CALLID)
.setEmergency(true)
.setVideoCall(true)
@@ -250,6 +257,7 @@
DomainSelectionService.SelectionAttributes attributes =
new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SUB_ID_1, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setCallId(TEST_CALLID)
.setEmergency(false)
.setVideoCall(true)
@@ -270,6 +278,7 @@
DomainSelectionService.SelectionAttributes attributes =
new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SUB_ID_1, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setCallId(TEST_CALLID)
.setEmergency(false)
.setVideoCall(false)
@@ -296,6 +305,7 @@
imsReasonInfo.mCode = ImsReasonInfo.CODE_LOCAL_CALL_CS_RETRY_REQUIRED;
attributes = new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SUB_ID_1, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setCallId(TEST_CALLID)
.setEmergency(false)
.setVideoCall(false)
@@ -334,7 +344,7 @@
DomainSelectionService.SelectionAttributes attributes =
new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SUB_ID_1, SELECTOR_TYPE_CALLING)
- .setNumber("*272121")
+ .setAddress(Uri.fromParts(PhoneAccount.SCHEME_TEL, "*272121", null))
.setCallId(TEST_CALLID)
.setEmergency(false)
.setVideoCall(false)
@@ -378,6 +388,7 @@
DomainSelectionService.SelectionAttributes attributes =
new DomainSelectionService.SelectionAttributes.Builder(
SLOT_ID, SUB_ID_1, SELECTOR_TYPE_CALLING)
+ .setAddress(TEST_URI)
.setCallId(TEST_CALLID)
.setEmergency(false)
.setVideoCall(false)
@@ -451,13 +462,6 @@
}
@Override
- public synchronized WwanSelectorCallback onWwanSelected() {
- mWwanSelected = true;
- notifyAll();
- return (WwanSelectorCallback) this;
- }
-
- @Override
public void onWwanSelected(final Consumer<WwanSelectorCallback> consumer) {
mWwanSelected = true;
Executors.newSingleThreadExecutor().execute(() -> {
@@ -500,6 +504,7 @@
@Override
public void onRequestEmergencyNetworkScan(@NonNull List<Integer> preferredNetworks,
int scanType,
+ boolean resetScan,
@NonNull CancellationSignal signal,
@NonNull Consumer<EmergencyRegResult> consumer) {
Log.i(TAG, "onRequestEmergencyNetworkScan - called");
diff --git a/tests/src/com/android/services/telephony/domainselection/SmsDomainSelectorTest.java b/tests/src/com/android/services/telephony/domainselection/SmsDomainSelectorTest.java
index 8f78a58..38e058b 100644
--- a/tests/src/com/android/services/telephony/domainselection/SmsDomainSelectorTest.java
+++ b/tests/src/com/android/services/telephony/domainselection/SmsDomainSelectorTest.java
@@ -190,21 +190,6 @@
@Test
@SmallTest
- public void testCancelSelection() {
- setUpImsStateTracker(AccessNetworkType.EUTRAN);
-
- mDomainSelector.selectDomain(mSelectionAttributes, mTransportSelectorCallback);
-
- assertTrue(mDomainSelector.isDomainSelectionRequested());
-
- mDomainSelector.cancelSelection();
-
- assertFalse(mDomainSelector.isDomainSelectionRequested());
- verify(mDomainSelectorDestroyListener).onDomainSelectorDestroyed(eq(mDomainSelector));
- }
-
- @Test
- @SmallTest
public void testFinishSelection() {
setUpImsStateTracker(AccessNetworkType.EUTRAN);
diff --git a/tests/src/com/android/services/telephony/domainselection/TelephonyDomainSelectionServiceTest.java b/tests/src/com/android/services/telephony/domainselection/TelephonyDomainSelectionServiceTest.java
index d9c737e..53bbce9 100644
--- a/tests/src/com/android/services/telephony/domainselection/TelephonyDomainSelectionServiceTest.java
+++ b/tests/src/com/android/services/telephony/domainselection/TelephonyDomainSelectionServiceTest.java
@@ -86,8 +86,7 @@
@NonNull EmergencyCallbackModeHelper ecbmHelper) {
switch (selectorType) {
case DomainSelectionService.SELECTOR_TYPE_CALLING: // fallthrough
- case DomainSelectionService.SELECTOR_TYPE_SMS: // fallthrough
- case DomainSelectionService.SELECTOR_TYPE_UT:
+ case DomainSelectionService.SELECTOR_TYPE_SMS:
mDomainSelectorDestroyListener = listener;
if (subId == SUB_1) {
return mDomainSelectorBase1;