diff options
author | Shuo Qian <shuoq@google.com> | 2019-04-09 11:40:51 -0700 |
---|---|---|
committer | Shuo Qian <shuoq@google.com> | 2019-04-09 21:30:42 +0000 |
commit | c8f2b3adf900efa882d22a4b6c05f69a04670114 (patch) | |
tree | 3bd87b703fbbce5f9cdd2fc0b5b2793db20e8e72 /tests/src/com/android/server/telecom | |
parent | f1a141982f7e3b459d5b2f7c79bd88ce8ca6b08f (diff) | |
download | android_packages_services_Telecomm-c8f2b3adf900efa882d22a4b6c05f69a04670114.tar.gz android_packages_services_Telecomm-c8f2b3adf900efa882d22a4b6c05f69a04670114.tar.bz2 android_packages_services_Telecomm-c8f2b3adf900efa882d22a4b6c05f69a04670114.zip |
Use Received Uri as Gateway Uri
Gateway information is the core component to perform redirection.
We should clarify the uri we received from
CallRedirectionService is gateway Uri. And apply it in Telecom.
Test: Manual; Treehugger
Bug: 130048865
Change-Id: Ie7b16411e6d26c88e990009733a9f5a0514d4902
Merged-In: Ie7b16411e6d26c88e990009733a9f5a0514d4902
Diffstat (limited to 'tests/src/com/android/server/telecom')
-rw-r--r-- | tests/src/com/android/server/telecom/tests/CallRedirectionProcessorTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/src/com/android/server/telecom/tests/CallRedirectionProcessorTest.java b/tests/src/com/android/server/telecom/tests/CallRedirectionProcessorTest.java index fa78383d..f0f0fe45 100644 --- a/tests/src/com/android/server/telecom/tests/CallRedirectionProcessorTest.java +++ b/tests/src/com/android/server/telecom/tests/CallRedirectionProcessorTest.java @@ -27,6 +27,7 @@ import android.os.IBinder; import android.os.UserHandle; import android.telecom.GatewayInfo; import android.telecom.PhoneAccountHandle; +import android.telephony.TelephonyManager; import com.android.internal.telecom.ICallRedirectionService; import com.android.server.telecom.Call; import com.android.server.telecom.CallsManager; @@ -66,6 +67,7 @@ public class CallRedirectionProcessorTest extends TelecomTestCase { @Mock private Call mCall; @Mock private PackageManager mPackageManager; + @Mock private TelephonyManager mTelephonyManager; @Mock private IBinder mBinder; @Mock private ICallRedirectionService mCallRedirectionService; @@ -118,6 +120,8 @@ public class CallRedirectionProcessorTest extends TelecomTestCase { .thenReturn(CARRIER_SHORT_TIMEOUT_MS); when(mCallsManager.getLock()).thenReturn(mLock); when(mCallsManager.getCurrentUserHandle()).thenReturn(mUserHandle); + when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); + when(mTelephonyManager.getNetworkCountryIso()).thenReturn(""); when(mContext.bindServiceAsUser(nullable(Intent.class), nullable(ServiceConnection.class), anyInt(), eq(UserHandle.CURRENT))).thenReturn(true); } |