Loading src/java/com/android/internal/telephony/domainselection/DomainSelectionConnection.java +2 −26 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ public class DomainSelectionConnection { mDomainSelector = selector; if (checkState(STATUS_DISPOSED)) { try { selector.cancelSelection(); selector.finishSelection(); } catch (RemoteException e) { // ignore exception } Loading @@ -116,20 +116,6 @@ public class DomainSelectionConnection { } } @Override public @NonNull IWwanSelectorCallback onWwanSelected() { synchronized (mLock) { if (mWwanSelectorCallback == null) { mWwanSelectorCallback = new WwanSelectorCallbackAdaptor(); } if (checkState(STATUS_DISPOSED)) { return mWwanSelectorCallback; } DomainSelectionConnection.this.onWwanSelected(); return mWwanSelectorCallback; } } @Override public void onWwanSelectedAsync(@NonNull final ITransportSelectorResultCallback cb) { synchronized (mLock) { Loading Loading @@ -517,17 +503,7 @@ public class DomainSelectionConnection { * to clean up all ongoing operations with the framework. */ public void cancelSelection() { synchronized (mLock) { try { if (mDomainSelector != null) { mDomainSelector.cancelSelection(); } } catch (RemoteException e) { loge("cancelSelection exception=" + e); } finally { dispose(); } } finishSelection(); } /** Loading src/java/com/android/internal/telephony/domainselection/EmergencyCallDomainSelectionConnection.java +10 −5 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ import static com.android.internal.telephony.emergency.EmergencyConstants.MODE_E import android.annotation.NonNull; import android.annotation.Nullable; import android.net.Uri; import android.telecom.PhoneAccount; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.Annotation.DisconnectCauses; Loading Loading @@ -201,6 +203,7 @@ public class EmergencyCallDomainSelectionConnection extends DomainSelectionConne * @param exited {@code true} if the request caused the device to move out of airplane mode. * @param callId The call identifier. * @param number The dialed number. * @param isTest Indicates it's a test emergency number. * @param callFailCause The reason why the last CS attempt failed. * @param imsReasonInfo The reason why the last PS attempt failed. * @param emergencyRegResult The current registration result for emergency services. Loading @@ -208,16 +211,17 @@ public class EmergencyCallDomainSelectionConnection extends DomainSelectionConne */ public static @NonNull DomainSelectionService.SelectionAttributes getSelectionAttributes( int slotId, int subId, boolean exited, @NonNull String callId, @NonNull String number, int callFailCause, @Nullable ImsReasonInfo imsReasonInfo, @NonNull String callId, @NonNull String number, boolean isTest, int callFailCause, @Nullable ImsReasonInfo imsReasonInfo, @Nullable EmergencyRegResult emergencyRegResult) { DomainSelectionService.SelectionAttributes.Builder builder = new DomainSelectionService.SelectionAttributes.Builder( slotId, subId, SELECTOR_TYPE_CALLING) .setEmergency(true) .setTestEmergencyNumber(isTest) .setExitedFromAirplaneMode(exited) .setCallId(callId) .setNumber(number) .setAddress(Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null)) .setCsDisconnectCause(callFailCause); if (imsReasonInfo != null) builder.setPsDisconnectCause(imsReasonInfo); Loading @@ -233,11 +237,12 @@ public class EmergencyCallDomainSelectionConnection extends DomainSelectionConne if (attr == null) return null; DomainSelectionService.SelectionAttributes.Builder builder = new DomainSelectionService.SelectionAttributes.Builder( attr.getSlotId(), attr.getSubId(), SELECTOR_TYPE_CALLING) attr.getSlotIndex(), attr.getSubscriptionId(), SELECTOR_TYPE_CALLING) .setCallId(attr.getCallId()) .setNumber(attr.getNumber()) .setAddress(attr.getAddress()) .setVideoCall(attr.isVideoCall()) .setEmergency(true) .setTestEmergencyNumber(attr.isTestEmergencyNumber()) .setExitedFromAirplaneMode(attr.isExitedFromAirplaneMode()) .setEmergencyRegResult(new EmergencyRegResult(AccessNetworkType.UNKNOWN, NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN, Loading src/java/com/android/internal/telephony/domainselection/NormalCallDomainSelectionConnection.java +3 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import static android.telephony.DomainSelectionService.SELECTOR_TYPE_CALLING; import android.annotation.NonNull; import android.annotation.Nullable; import android.net.Uri; import android.telecom.PhoneAccount; import android.telephony.AccessNetworkConstants.RadioAccessNetworkType; import android.telephony.Annotation.DisconnectCauses; import android.telephony.DisconnectCause; Loading Loading @@ -119,7 +121,7 @@ public class NormalCallDomainSelectionConnection extends DomainSelectionConnecti slotId, subId, SELECTOR_TYPE_CALLING) .setEmergency(false) .setCallId(callId) .setNumber(number) .setAddress(Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null)) .setCsDisconnectCause(callFailCause) .setVideoCall(isVideoCall); Loading src/java/com/android/internal/telephony/domainselection/SmsDomainSelectionConnection.java +0 −11 Original line number Diff line number Diff line Loading @@ -53,17 +53,6 @@ public class SmsDomainSelectionConnection extends DomainSelectionConnection { if (mCallback != null) mCallback.onSelectionTerminated(cause); } @Override public void finishSelection() { CompletableFuture<Integer> future = getCompletableFuture(); if (future != null && !future.isDone()) { cancelSelection(); } else { super.finishSelection(); } } /** * Requests a domain selection for SMS. * Loading tests/telephonytests/src/com/android/internal/telephony/domainselection/DomainSelectionConnectionTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,11 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import android.net.Uri; import android.os.AsyncResult; import android.os.Handler; import android.os.RemoteException; import android.telecom.PhoneAccount; import android.telephony.AccessNetworkConstants; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.DomainSelectionService; Loading Loading @@ -255,7 +257,7 @@ public class DomainSelectionConnectionTest extends TelephonyTest { mDsc.cancelSelection(); verify(domainSelector).cancelSelection(); verify(domainSelector).finishSelection(); } @Test Loading Loading @@ -594,7 +596,9 @@ public class DomainSelectionConnectionTest extends TelephonyTest { .setCsDisconnectCause(callFailCause); if (callId != null) builder.setCallId(callId); if (number != null) builder.setNumber(number); if (number != null) { builder.setAddress(Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null)); } if (imsReasonInfo != null) builder.setPsDisconnectCause(imsReasonInfo); if (regResult != null) builder.setEmergencyRegResult(regResult); Loading Loading
src/java/com/android/internal/telephony/domainselection/DomainSelectionConnection.java +2 −26 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ public class DomainSelectionConnection { mDomainSelector = selector; if (checkState(STATUS_DISPOSED)) { try { selector.cancelSelection(); selector.finishSelection(); } catch (RemoteException e) { // ignore exception } Loading @@ -116,20 +116,6 @@ public class DomainSelectionConnection { } } @Override public @NonNull IWwanSelectorCallback onWwanSelected() { synchronized (mLock) { if (mWwanSelectorCallback == null) { mWwanSelectorCallback = new WwanSelectorCallbackAdaptor(); } if (checkState(STATUS_DISPOSED)) { return mWwanSelectorCallback; } DomainSelectionConnection.this.onWwanSelected(); return mWwanSelectorCallback; } } @Override public void onWwanSelectedAsync(@NonNull final ITransportSelectorResultCallback cb) { synchronized (mLock) { Loading Loading @@ -517,17 +503,7 @@ public class DomainSelectionConnection { * to clean up all ongoing operations with the framework. */ public void cancelSelection() { synchronized (mLock) { try { if (mDomainSelector != null) { mDomainSelector.cancelSelection(); } } catch (RemoteException e) { loge("cancelSelection exception=" + e); } finally { dispose(); } } finishSelection(); } /** Loading
src/java/com/android/internal/telephony/domainselection/EmergencyCallDomainSelectionConnection.java +10 −5 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ import static com.android.internal.telephony.emergency.EmergencyConstants.MODE_E import android.annotation.NonNull; import android.annotation.Nullable; import android.net.Uri; import android.telecom.PhoneAccount; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.AccessNetworkConstants.TransportType; import android.telephony.Annotation.DisconnectCauses; Loading Loading @@ -201,6 +203,7 @@ public class EmergencyCallDomainSelectionConnection extends DomainSelectionConne * @param exited {@code true} if the request caused the device to move out of airplane mode. * @param callId The call identifier. * @param number The dialed number. * @param isTest Indicates it's a test emergency number. * @param callFailCause The reason why the last CS attempt failed. * @param imsReasonInfo The reason why the last PS attempt failed. * @param emergencyRegResult The current registration result for emergency services. Loading @@ -208,16 +211,17 @@ public class EmergencyCallDomainSelectionConnection extends DomainSelectionConne */ public static @NonNull DomainSelectionService.SelectionAttributes getSelectionAttributes( int slotId, int subId, boolean exited, @NonNull String callId, @NonNull String number, int callFailCause, @Nullable ImsReasonInfo imsReasonInfo, @NonNull String callId, @NonNull String number, boolean isTest, int callFailCause, @Nullable ImsReasonInfo imsReasonInfo, @Nullable EmergencyRegResult emergencyRegResult) { DomainSelectionService.SelectionAttributes.Builder builder = new DomainSelectionService.SelectionAttributes.Builder( slotId, subId, SELECTOR_TYPE_CALLING) .setEmergency(true) .setTestEmergencyNumber(isTest) .setExitedFromAirplaneMode(exited) .setCallId(callId) .setNumber(number) .setAddress(Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null)) .setCsDisconnectCause(callFailCause); if (imsReasonInfo != null) builder.setPsDisconnectCause(imsReasonInfo); Loading @@ -233,11 +237,12 @@ public class EmergencyCallDomainSelectionConnection extends DomainSelectionConne if (attr == null) return null; DomainSelectionService.SelectionAttributes.Builder builder = new DomainSelectionService.SelectionAttributes.Builder( attr.getSlotId(), attr.getSubId(), SELECTOR_TYPE_CALLING) attr.getSlotIndex(), attr.getSubscriptionId(), SELECTOR_TYPE_CALLING) .setCallId(attr.getCallId()) .setNumber(attr.getNumber()) .setAddress(attr.getAddress()) .setVideoCall(attr.isVideoCall()) .setEmergency(true) .setTestEmergencyNumber(attr.isTestEmergencyNumber()) .setExitedFromAirplaneMode(attr.isExitedFromAirplaneMode()) .setEmergencyRegResult(new EmergencyRegResult(AccessNetworkType.UNKNOWN, NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN, Loading
src/java/com/android/internal/telephony/domainselection/NormalCallDomainSelectionConnection.java +3 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import static android.telephony.DomainSelectionService.SELECTOR_TYPE_CALLING; import android.annotation.NonNull; import android.annotation.Nullable; import android.net.Uri; import android.telecom.PhoneAccount; import android.telephony.AccessNetworkConstants.RadioAccessNetworkType; import android.telephony.Annotation.DisconnectCauses; import android.telephony.DisconnectCause; Loading Loading @@ -119,7 +121,7 @@ public class NormalCallDomainSelectionConnection extends DomainSelectionConnecti slotId, subId, SELECTOR_TYPE_CALLING) .setEmergency(false) .setCallId(callId) .setNumber(number) .setAddress(Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null)) .setCsDisconnectCause(callFailCause) .setVideoCall(isVideoCall); Loading
src/java/com/android/internal/telephony/domainselection/SmsDomainSelectionConnection.java +0 −11 Original line number Diff line number Diff line Loading @@ -53,17 +53,6 @@ public class SmsDomainSelectionConnection extends DomainSelectionConnection { if (mCallback != null) mCallback.onSelectionTerminated(cause); } @Override public void finishSelection() { CompletableFuture<Integer> future = getCompletableFuture(); if (future != null && !future.isDone()) { cancelSelection(); } else { super.finishSelection(); } } /** * Requests a domain selection for SMS. * Loading
tests/telephonytests/src/com/android/internal/telephony/domainselection/DomainSelectionConnectionTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,11 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import android.net.Uri; import android.os.AsyncResult; import android.os.Handler; import android.os.RemoteException; import android.telecom.PhoneAccount; import android.telephony.AccessNetworkConstants; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.DomainSelectionService; Loading Loading @@ -255,7 +257,7 @@ public class DomainSelectionConnectionTest extends TelephonyTest { mDsc.cancelSelection(); verify(domainSelector).cancelSelection(); verify(domainSelector).finishSelection(); } @Test Loading Loading @@ -594,7 +596,9 @@ public class DomainSelectionConnectionTest extends TelephonyTest { .setCsDisconnectCause(callFailCause); if (callId != null) builder.setCallId(callId); if (number != null) builder.setNumber(number); if (number != null) { builder.setAddress(Uri.fromParts(PhoneAccount.SCHEME_TEL, number, null)); } if (imsReasonInfo != null) builder.setPsDisconnectCause(imsReasonInfo); if (regResult != null) builder.setEmergencyRegResult(regResult); Loading