From dabf0ae37eb37eede35e767924ed720ad9defa4a Mon Sep 17 00:00:00 2001 From: Usman Abdullah Date: Wed, 20 Apr 2016 11:24:36 -0700 Subject: Replace Call with CallSdkCompat Change-Id: Ida1dcd52029b36bf7455846ea190bd75d50bce9f --- .../tests/src/com/android/incallui/ExternalCallListTest.java | 10 ++++++---- .../src/com/android/incallui/ExternalCallNotifierTest.java | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'InCallUI') diff --git a/InCallUI/tests/src/com/android/incallui/ExternalCallListTest.java b/InCallUI/tests/src/com/android/incallui/ExternalCallListTest.java index 070bdf522..59434700c 100644 --- a/InCallUI/tests/src/com/android/incallui/ExternalCallListTest.java +++ b/InCallUI/tests/src/com/android/incallui/ExternalCallListTest.java @@ -24,6 +24,8 @@ import android.telecom.*; import android.telecom.Call; import android.test.AndroidTestCase; +import com.android.contacts.common.compat.CallSdkCompat; + import java.lang.reflect.Constructor; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -87,7 +89,7 @@ public class ExternalCallListTest extends AndroidTestCase { } public void testAddCallSuccess() { - TestTelecomCall call = getTestCall(Call.Details.PROPERTY_IS_EXTERNAL_CALL); + TestTelecomCall call = getTestCall(CallSdkCompat.Details.PROPERTY_IS_EXTERNAL_CALL); mExternalCallList.onCallAdded(call.getCall()); assertTrue(mExternalCallListener.awaitCallAdded()); } @@ -102,7 +104,7 @@ public class ExternalCallListTest extends AndroidTestCase { } public void testUpdateCall() { - TestTelecomCall call = getTestCall(Call.Details.PROPERTY_IS_EXTERNAL_CALL); + TestTelecomCall call = getTestCall(CallSdkCompat.Details.PROPERTY_IS_EXTERNAL_CALL); mExternalCallList.onCallAdded(call.getCall()); assertTrue(mExternalCallListener.awaitCallAdded()); @@ -111,7 +113,7 @@ public class ExternalCallListTest extends AndroidTestCase { } public void testRemoveCall() { - TestTelecomCall call = getTestCall(Call.Details.PROPERTY_IS_EXTERNAL_CALL); + TestTelecomCall call = getTestCall(CallSdkCompat.Details.PROPERTY_IS_EXTERNAL_CALL); mExternalCallList.onCallAdded(call.getCall()); assertTrue(mExternalCallListener.awaitCallAdded()); @@ -128,7 +130,7 @@ public class ExternalCallListTest extends AndroidTestCase { TelecomManager.PRESENTATION_ALLOWED, /* callerDisplayNamePresentation */ new PhoneAccountHandle(new ComponentName("test", "class"), "handle"), /* accountHandle */ - Call.Details.CAPABILITY_CAN_PULL_CALL, /* capabilities */ + CallSdkCompat.Details.CAPABILITY_CAN_PULL_CALL, /* capabilities */ properties, /* properties */ null, /* disconnectCause */ 0, /* connectTimeMillis */ diff --git a/InCallUI/tests/src/com/android/incallui/ExternalCallNotifierTest.java b/InCallUI/tests/src/com/android/incallui/ExternalCallNotifierTest.java index e57efef67..64ddd2ea5 100644 --- a/InCallUI/tests/src/com/android/incallui/ExternalCallNotifierTest.java +++ b/InCallUI/tests/src/com/android/incallui/ExternalCallNotifierTest.java @@ -46,6 +46,8 @@ import android.telephony.TelephonyManager; import android.test.AndroidTestCase; import android.test.mock.MockContext; +import com.android.contacts.common.compat.CallSdkCompat; + /** * Unit tests for {@link ExternalCallNotifier}. */ @@ -168,7 +170,7 @@ public class ExternalCallNotifierTest extends AndroidTestCase { mExternalCallNotifier.onExternalCallAdded(call.getCall()); verifyNotificationPosted(); - call.setCapabilities(android.telecom.Call.Details.CAPABILITY_CAN_PULL_CALL); + call.setCapabilities(CallSdkCompat.Details.CAPABILITY_CAN_PULL_CALL); mExternalCallNotifier.onExternalCallUpdated(call.getCall()); ArgumentCaptor notificationCaptor = @@ -198,8 +200,8 @@ public class ExternalCallNotifierTest extends AndroidTestCase { TelecomManager.PRESENTATION_ALLOWED, /* callerDisplayNamePresentation */ new PhoneAccountHandle(new ComponentName("test", "class"), "handle"), /* accountHandle */ - canPull ? android.telecom.Call.Details.CAPABILITY_CAN_PULL_CALL : 0, /* capabilities */ - Call.Details.PROPERTY_IS_EXTERNAL_CALL, /* properties */ + canPull ? CallSdkCompat.Details.CAPABILITY_CAN_PULL_CALL : 0, /* capabilities */ + CallSdkCompat.Details.PROPERTY_IS_EXTERNAL_CALL, /* properties */ null, /* disconnectCause */ 0, /* connectTimeMillis */ null, /* GatewayInfo */ -- cgit v1.2.3