Loading tests/Android.mk +2 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ android-ex-camera2 \ android-support-v4 \ guava \ mockito-target mockito-target \ platform-test-annotations LOCAL_SRC_FILES := \ $(call all-java-files-under, src) \ Loading tests/src/com/android/server/telecom/tests/CallLogManagerTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.os.Looper; import android.os.PersistableBundle; import android.os.UserHandle; import android.os.UserManager; import android.platform.test.annotations.Postsubmit; import android.provider.CallLog; import android.provider.CallLog.Calls; import android.telecom.DisconnectCause; Loading Loading @@ -423,6 +424,7 @@ public class CallLogManagerTest extends TelecomTestCase { } @MediumTest @Postsubmit public void testLogCallDirectionOutgoingWithMultiUserCapability() { when(mMockPhoneAccountRegistrar.getPhoneAccountUnchecked(any(PhoneAccountHandle.class))) .thenReturn(makeFakePhoneAccount(mOtherUserAccountHandle, Loading Loading @@ -516,6 +518,7 @@ public class CallLogManagerTest extends TelecomTestCase { } @MediumTest @Postsubmit public void testLogCallDirectionOutgoingFromManagedProfile() { when(mMockPhoneAccountRegistrar.getPhoneAccountUnchecked(any(PhoneAccountHandle.class))) .thenReturn(makeFakePhoneAccount(mManagedProfileAccountHandle, 0)); Loading tests/src/com/android/server/telecom/tests/InCallControllerTests.java +2 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.text.TextUtils; import com.android.internal.telecom.IInCallAdapter; import com.android.internal.telecom.IInCallService; import com.android.server.telecom.Analytics; import com.android.server.telecom.BluetoothHeadsetProxy; import com.android.server.telecom.Call; import com.android.server.telecom.CallsManager; Loading Loading @@ -101,6 +102,7 @@ public class InCallControllerTests extends TelecomTestCase { public void setUp() throws Exception { super.setUp(); MockitoAnnotations.initMocks(this); when(mMockCall.getAnalytics()).thenReturn(new Analytics.CallInfo()); doReturn(mMockResources).when(mMockContext).getResources(); doReturn(SYS_PKG).when(mMockResources).getString(R.string.ui_default_package); doReturn(SYS_CLASS).when(mMockResources).getString(R.string.incall_default_class); Loading @@ -121,7 +123,6 @@ public class InCallControllerTests extends TelecomTestCase { when(mMockCall.isIncoming()).thenReturn(true); when(mMockCall.isExternalCall()).thenReturn(false); Intent queryIntent = new Intent(InCallService.SERVICE_INTERFACE); setupMockPackageManager(false /* default */, true /* system */, false /* external calls */); mInCallController.bindToServices(mMockCall); Loading Loading
tests/Android.mk +2 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ android-ex-camera2 \ android-support-v4 \ guava \ mockito-target mockito-target \ platform-test-annotations LOCAL_SRC_FILES := \ $(call all-java-files-under, src) \ Loading
tests/src/com/android/server/telecom/tests/CallLogManagerTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.os.Looper; import android.os.PersistableBundle; import android.os.UserHandle; import android.os.UserManager; import android.platform.test.annotations.Postsubmit; import android.provider.CallLog; import android.provider.CallLog.Calls; import android.telecom.DisconnectCause; Loading Loading @@ -423,6 +424,7 @@ public class CallLogManagerTest extends TelecomTestCase { } @MediumTest @Postsubmit public void testLogCallDirectionOutgoingWithMultiUserCapability() { when(mMockPhoneAccountRegistrar.getPhoneAccountUnchecked(any(PhoneAccountHandle.class))) .thenReturn(makeFakePhoneAccount(mOtherUserAccountHandle, Loading Loading @@ -516,6 +518,7 @@ public class CallLogManagerTest extends TelecomTestCase { } @MediumTest @Postsubmit public void testLogCallDirectionOutgoingFromManagedProfile() { when(mMockPhoneAccountRegistrar.getPhoneAccountUnchecked(any(PhoneAccountHandle.class))) .thenReturn(makeFakePhoneAccount(mManagedProfileAccountHandle, 0)); Loading
tests/src/com/android/server/telecom/tests/InCallControllerTests.java +2 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import android.text.TextUtils; import com.android.internal.telecom.IInCallAdapter; import com.android.internal.telecom.IInCallService; import com.android.server.telecom.Analytics; import com.android.server.telecom.BluetoothHeadsetProxy; import com.android.server.telecom.Call; import com.android.server.telecom.CallsManager; Loading Loading @@ -101,6 +102,7 @@ public class InCallControllerTests extends TelecomTestCase { public void setUp() throws Exception { super.setUp(); MockitoAnnotations.initMocks(this); when(mMockCall.getAnalytics()).thenReturn(new Analytics.CallInfo()); doReturn(mMockResources).when(mMockContext).getResources(); doReturn(SYS_PKG).when(mMockResources).getString(R.string.ui_default_package); doReturn(SYS_CLASS).when(mMockResources).getString(R.string.incall_default_class); Loading @@ -121,7 +123,6 @@ public class InCallControllerTests extends TelecomTestCase { when(mMockCall.isIncoming()).thenReturn(true); when(mMockCall.isExternalCall()).thenReturn(false); Intent queryIntent = new Intent(InCallService.SERVICE_INTERFACE); setupMockPackageManager(false /* default */, true /* system */, false /* external calls */); mInCallController.bindToServices(mMockCall); Loading