Remove Telecom CTS tests

android.telecom.* APIs have been marked @hide, so remove their CTS
tests.

Bug: 17569532
Change-Id: Ibd7240ed3442b1d3c9257eb2c65673f9a577f54a
diff --git a/CtsTestCaseList.mk b/CtsTestCaseList.mk
index 2be82a4..a3ca867 100644
--- a/CtsTestCaseList.mk
+++ b/CtsTestCaseList.mk
@@ -114,7 +114,6 @@
     CtsSaxTestCases \
     CtsSecurityTestCases \
     CtsSpeechTestCases \
-    CtsTelecomTestCases \
     CtsTelephonyTestCases \
     CtsTextTestCases \
     CtsTextureViewTestCases \
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index e151325..c655594 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -47,7 +47,6 @@
     <uses-feature android:name="android.hardware.usb.accessory" />
     <uses-permission android:name="android.permission.CALL_PHONE" />
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-    <uses-feature android:name="android.software.connectionservice" android:required="false" />
 
     <!-- Needed by the Audio Quality Verifier to store the sound samples that will be mailed. -->
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
@@ -1149,67 +1148,6 @@
                  android:label="@string/projection_service_name"
                  android:process=":projectionservice" />
 
-        <activity android:name=".telecom.TelecomTestActivity"
-                  android:label="@string/telecom_test_title">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.cts.intent.category.MANUAL_TEST" />
-            </intent-filter>
-            <meta-data android:name="test_category" android:value="@string/test_category_telecom" />
-            <meta-data android:name="test_required_features" android:value="android.software.connectionservice"/>
-        </activity>
-
-        <activity android:name=".telecom.CancelCallTestActivity"
-                  android:label="@string/telecom_cancel_call_title">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.cts.intent.category.MANUAL_TEST" />
-            </intent-filter>
-            <meta-data android:name="test_category" android:value="@string/test_category_telecom" />
-            <meta-data android:name="test_parent" android:value="com.android.cts.verifier.telecom.TelecomTestActivity" />
-        </activity>
-
-        <service android:name=".telecom.CancelCallTestActivity$ConnectionService"
-                 android:permission="android.permission.BIND_CONNECTION_SERVICE">
-            <intent-filter>
-                <action android:name="android.telecom.ConnectionService" />
-            </intent-filter>
-        </service>
-
-        <activity android:name=".telecom.FailedCallTestActivity"
-                  android:label="@string/telecom_failed_call_title">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.cts.intent.category.MANUAL_TEST" />
-            </intent-filter>
-            <meta-data android:name="test_category" android:value="@string/test_category_telecom" />
-            <meta-data android:name="test_parent" android:value="com.android.cts.verifier.telecom.TelecomTestActivity" />
-        </activity>
-
-        <service android:name=".telecom.FailedCallTestActivity$ConnectionService"
-                 android:permission="android.permission.BIND_CONNECTION_SERVICE">
-            <intent-filter>
-                <action android:name="android.telecom.ConnectionService" />
-            </intent-filter>
-        </service>
-
-        <activity android:name=".telecom.BasicCallTestActivity"
-                  android:label="@string/telecom_basic_call_title">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.cts.intent.category.MANUAL_TEST" />
-            </intent-filter>
-            <meta-data android:name="test_category" android:value="@string/test_category_telecom" />
-            <meta-data android:name="test_parent" android:value="com.android.cts.verifier.telecom.TelecomTestActivity" />
-        </activity>
-
-        <service android:name=".telecom.BasicCallTestActivity$ConnectionService"
-                 android:permission="android.permission.BIND_CONNECTION_SERVICE">
-            <intent-filter>
-                <action android:name="android.telecom.ConnectionService" />
-            </intent-filter>
-        </service>
-
    </application>
 
 </manifest>
diff --git a/apps/CtsVerifier/res/layout/telecom_test_activity.xml b/apps/CtsVerifier/res/layout/telecom_test_activity.xml
deleted file mode 100644
index 9ca7cde..0000000
--- a/apps/CtsVerifier/res/layout/telecom_test_activity.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical"
-                android:padding="10dip" >
-    <Button android:id="@+id/open_settings"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="@string/telecom_open_settings" />
-    <EditText android:id="@+id/phone_number"
-              android:layout_width="match_parent"
-              android:layout_height="wrap_content"
-              android:text="@string/telecom_default_phone_number"
-              android:hint="@string/telecom_phone_number_hint" />
-    <Button android:id="@+id/simulate_call"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="@string/telecom_simulate_call" />
-    <include layout="@layout/pass_fail_buttons" />
-</LinearLayout>
\ No newline at end of file
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 6676a01..f5f919d 100644
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -1119,29 +1119,4 @@
     <string name="snsr_rotation_vector_set_final">Place the device back to the reference position.</string>
     <string name="snsr_rotation_vector_verification">Angular deviation [%1$4.1f %2$4.1f %3$4.1f]. Current: %4$f deg. Max tolerated: %5$f.</string>
 
-    <string name="test_category_telecom">Telecom</string>
-    <string name="telecom_test_title">Telecom Tests</string>
-    <string name="telecom_test_summary">These tests cover aspects of Telecom call routing.
-        These tests may be run in any order, but each one will require user input before it can be run.
-    </string>
-    <string name="telecom_open_settings">Open settings</string>
-    <string name="telecom_simulate_call">Place call</string>
-    <string name="telecom_default_phone_number">555-263-7643</string>
-    <string name="telecom_phone_number_hint">Phone number to call</string>
-    <string name="telecom_cancel_call_title">Canceled Call Test</string>
-    <string name="telecom_cancel_call_info">This tests to make sure that canceled calls are handled correctly.
-        Press the \"Open settings\" button and make sure that \"Call Cancel Manager\" is the default Wi-Fi calling account.
-        Then press the \"Place call\" button; the test will pass (or fail) automatically.
-    </string>
-    <string name="telecom_failed_call_title">Failed Call Test</string>
-    <string name="telecom_failed_call_info">This tests to make sure that failed calls are handled correctly.
-        Press the \"Open settings\" button and make sure that \"Call Failed Manager\" is the default Wi-Fi calling account.
-        Then press the \"Place call\" button; the test will pass (or fail) automatically.
-    </string>
-    <string name="telecom_basic_call_title">Basic Call Test</string>
-    <string name="telecom_basic_call_info">This tests to make sure that basic calls are handled correctly.
-        Press the \"Open settings\" button and make sure that \"Basic Call Manager\" is the default Wi-Fi calling account.
-        Then press the \"Place call\" button; the test will pass (or fail) automatically.
-    </string>
-
 </resources>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/BasicCallTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/BasicCallTestActivity.java
deleted file mode 100644
index 70d141c..0000000
--- a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/BasicCallTestActivity.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package com.android.cts.verifier.telecom;
-
-import com.android.cts.verifier.R;
-
-import android.net.Uri;
-import android.os.SystemClock;
-import android.telecom.Connection;
-import android.telecom.ConnectionRequest;
-import android.telecom.DisconnectCause;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.RemoteConnection;
-import android.telecom.StatusHints;
-
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Tests that a basic call with RemoteConnections will go through. When this ConnectionService is
- * notified of an outgoing call, it will create a Connection which wraps a RemoteConnection. Then,
- * once the RemoteConnection starts dialing, it will disconnect the call and the test will pass.
- */
-public class BasicCallTestActivity extends TelecomBaseTestActivity {
-    private static final Semaphore sLock = new Semaphore(0);
-
-    @Override
-    protected int getTestTitleResource() {
-        return R.string.telecom_basic_call_title;
-    }
-
-    @Override
-    protected int getTestInfoResource() {
-        return R.string.telecom_basic_call_info;
-    }
-
-    @Override
-    protected Class<? extends android.telecom.ConnectionService> getConnectionService() {
-        return ConnectionService.class;
-    }
-
-    @Override
-    protected String getConnectionServiceLabel() {
-        return "Basic Call Manager";
-    }
-
-    @Override
-    protected boolean onCallPlacedBackgroundThread() {
-        try {
-            if (!sLock.tryAcquire(5000, TimeUnit.MILLISECONDS)) {
-                return false;
-            }
-
-            // Wait for the listeners to be fired so the call is cleaned up.
-            SystemClock.sleep(1000);
-
-            return !getTelecomManager().isInCall();
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    public static class ConnectionService extends android.telecom.ConnectionService {
-        @Override
-        public Connection onCreateOutgoingConnection(
-                PhoneAccountHandle connectionManagerPhoneAccount,
-                ConnectionRequest request) {
-            RemoteConnection remoteConnection =
-                    createRemoteOutgoingConnection(connectionManagerPhoneAccount, request);
-            return new ProxyConnection(remoteConnection);
-        }
-    }
-
-    private static class ProxyConnection extends Connection {
-        private final RemoteConnection mRemoteConnection;
-
-        private final RemoteConnection.Callback mCallback = new RemoteConnection.Callback() {
-            @Override
-            public void onStateChanged(RemoteConnection connection, int state) {
-                switch (state) {
-                    case Connection.STATE_ACTIVE:
-                        setActive();
-                        break;
-                    case Connection.STATE_DIALING:
-                        setDialing();
-                        break;
-                    case Connection.STATE_DISCONNECTED:
-                        sLock.release();
-                        break;
-                    case Connection.STATE_HOLDING:
-                        setOnHold();
-                        break;
-                    case Connection.STATE_INITIALIZING:
-                        setInitializing();
-                        break;
-                    case Connection.STATE_NEW:
-                        setInitialized();
-                        break;
-                    case Connection.STATE_RINGING:
-                        setRinging();
-                        break;
-                }
-            }
-
-            @Override
-            public void onDisconnected(
-                    RemoteConnection connection, DisconnectCause disconnectCause) {
-                setDisconnected(disconnectCause);
-            }
-
-            @Override
-            public void onStatusHintsChanged(RemoteConnection connection, StatusHints statusHints) {
-                setStatusHints(statusHints);
-            }
-
-            @Override
-            public void onAddressChanged(
-                    RemoteConnection connection, Uri address, int presentation) {
-                setAddress(address, presentation);
-            }
-
-            @Override
-            public void onCallerDisplayNameChanged(RemoteConnection connection,
-                    String callerDisplayName,
-                    int presentation) {
-                setCallerDisplayName(callerDisplayName, presentation);
-            }
-
-            @Override
-            public void onDestroyed(RemoteConnection connection) {
-                destroy();
-            }
-        };
-
-        public ProxyConnection(RemoteConnection connection) {
-            mRemoteConnection = connection;
-            if (connection.getState() == Connection.STATE_DISCONNECTED) {
-                sLock.release();
-            } else {
-                mRemoteConnection.registerCallback(mCallback);
-            }
-        }
-
-        @Override
-        public void onStateChanged(int state) {
-            if (state == Connection.STATE_DIALING) {
-                // Good enough; let's disconnect this call.
-                mRemoteConnection.disconnect();
-                sLock.release();
-            }
-        }
-    }
-}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/CancelCallTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/CancelCallTestActivity.java
deleted file mode 100644
index 58d71ce..0000000
--- a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/CancelCallTestActivity.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.cts.verifier.telecom;
-
-import android.os.SystemClock;
-import android.telecom.Connection;
-import android.telecom.ConnectionRequest;
-import android.telecom.PhoneAccountHandle;
-
-import com.android.cts.verifier.R;
-
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Tests that a call can be canceled by a ConnectionService (and that the cancelation is respected).
- * Once the ConnectionService returns a canceled connection, the test verifies that Telecomm does
- * not have any active calls. If this is the case, the test will pass.
- */
-public class CancelCallTestActivity extends TelecomBaseTestActivity {
-    private static final Semaphore sLock = new Semaphore(0);
-
-    @Override
-    protected int getTestTitleResource() {
-        return R.string.telecom_cancel_call_title;
-    }
-
-    @Override
-    protected int getTestInfoResource() {
-        return R.string.telecom_cancel_call_info;
-    }
-
-    @Override
-    protected Class<? extends android.telecom.ConnectionService> getConnectionService() {
-        return ConnectionService.class;
-    }
-
-    @Override
-    protected String getConnectionServiceLabel() {
-        return "Call Cancel Manager";
-    }
-
-    @Override
-    protected boolean onCallPlacedBackgroundThread() {
-        try {
-            if (!sLock.tryAcquire(1000, TimeUnit.MILLISECONDS)) {
-                return false;
-            }
-
-            // Wait for the listeners to be fired so the call is cleaned up.
-            SystemClock.sleep(1000);
-
-            // Make sure that there aren't any ongoing calls.
-            return !getTelecomManager().isInCall();
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    public static class ConnectionService extends android.telecom.ConnectionService {
-        @Override
-        public Connection onCreateOutgoingConnection(
-                PhoneAccountHandle connectionManagerPhoneAccount,
-                ConnectionRequest request) {
-            sLock.release();
-            return Connection.createCanceledConnection();
-        }
-    }
-}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/FailedCallTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/FailedCallTestActivity.java
deleted file mode 100644
index 74a8637..0000000
--- a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/FailedCallTestActivity.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.cts.verifier.telecom;
-
-import android.os.SystemClock;
-import android.telecom.Connection;
-import android.telecom.ConnectionRequest;
-import android.telecom.DisconnectCause;
-import android.telecom.PhoneAccountHandle;
-
-import com.android.cts.verifier.R;
-
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Tests that a connection manager can fail calls and they're handled appropriately. That is, when
- * a call is failed, it will not go through. The flow here is that the ConnectionService will say
- * that the call failed because it's busy, and then make sure that there are no active calls. If
- * this is the case, the test will pass.
- */
-public class FailedCallTestActivity extends TelecomBaseTestActivity {
-    private static final Semaphore sLock = new Semaphore(0);
-
-    @Override
-    protected int getTestTitleResource() {
-        return R.string.telecom_failed_call_title;
-    }
-
-    @Override
-    protected int getTestInfoResource() {
-        return R.string.telecom_failed_call_info;
-    }
-
-    @Override
-    protected Class<? extends android.telecom.ConnectionService> getConnectionService() {
-        return ConnectionService.class;
-    }
-
-    @Override
-    protected String getConnectionServiceLabel() {
-        return "Call Failed Manager";
-    }
-
-    @Override
-    protected boolean onCallPlacedBackgroundThread() {
-        try {
-            if (!sLock.tryAcquire(1000, TimeUnit.MILLISECONDS)) {
-                return false;
-            }
-
-            // Wait for the listeners to be fired so the call is cleaned up.
-            SystemClock.sleep(1000);
-
-            // Make sure that there aren't any ongoing calls.
-            return !getTelecomManager().isInCall();
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    public static class ConnectionService extends android.telecom.ConnectionService {
-        @Override
-        public Connection onCreateOutgoingConnection(
-                PhoneAccountHandle connectionManagerPhoneAccount,
-                ConnectionRequest request) {
-            sLock.release();
-            return Connection.createFailedConnection(
-                    new DisconnectCause(DisconnectCause.BUSY, "Test; no need to continue"));
-        }
-    }
-}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/TelecomBaseTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/TelecomBaseTestActivity.java
deleted file mode 100644
index 03a986b..0000000
--- a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/TelecomBaseTestActivity.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package com.android.cts.verifier.telecom;
-
-import android.content.ComponentName;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.telecom.ConnectionService;
-import android.telecom.PhoneAccount;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.TelecomManager;
-import android.view.View;
-import android.widget.Button;
-import android.widget.EditText;
-
-import com.android.cts.verifier.PassFailButtons;
-import com.android.cts.verifier.R;
-
-import java.util.Objects;
-
-public abstract class TelecomBaseTestActivity extends PassFailButtons.Activity {
-    protected PhoneAccountHandle mPhoneAccountHandle;
-
-    private Button mOpenSettingsBtn;
-    private Button mPlaceCallBtn;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        setResult(RESULT_CANCELED);
-        setContentView(R.layout.telecom_test_activity);
-        setPassFailButtonClickListeners();
-        setInfoResources(getTestTitleResource(), getTestInfoResource(), 0);
-
-        mOpenSettingsBtn = (Button) findViewById(R.id.open_settings);
-        mOpenSettingsBtn.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                mPhoneAccountHandle = new PhoneAccountHandle(
-                        new ComponentName(getApplicationContext(), getConnectionService()),
-                        getClass().getSimpleName()
-                );
-                PhoneAccount account = new PhoneAccount.Builder(mPhoneAccountHandle,
-                                getConnectionServiceLabel())
-                        .setCapabilities(PhoneAccount.CAPABILITY_CONNECTION_MANAGER)
-                        .build();
-
-                getTelecomManager().registerPhoneAccount(account);
-
-                Intent i = new Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS);
-                startActivity(i);
-            }
-        });
-
-        mPlaceCallBtn = (Button) findViewById(R.id.simulate_call);
-        mPlaceCallBtn.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                runTest();
-            }
-        });
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        PhoneAccountHandle defaultConnectionManager = getTelecomManager().getConnectionManager();
-        boolean isDefaultConnectionManager = mPhoneAccountHandle != null &&
-                Objects.equals(mPhoneAccountHandle, defaultConnectionManager);
-        mOpenSettingsBtn.setEnabled(!isDefaultConnectionManager);
-        mPlaceCallBtn.setEnabled(isDefaultConnectionManager);
-    }
-
-    abstract protected int getTestTitleResource();
-
-    abstract protected int getTestInfoResource();
-
-    abstract protected Class<? extends ConnectionService> getConnectionService();
-
-    abstract protected String getConnectionServiceLabel();
-
-    /**
-     * Perform any tests once the call has been placed. This is called from a background thread, so
-     * it is safe to block until the result is known.
-     *
-     * @return True if the test passed.
-     */
-    abstract protected boolean onCallPlacedBackgroundThread();
-
-    protected void runTest() {
-        new Thread() {
-            @Override
-            public void run() {
-                EditText phoneNumberEdit = (EditText) findViewById(R.id.phone_number);
-                String numberText = phoneNumberEdit.getText().toString();
-                Uri number = Uri.fromParts("tel", numberText, null);
-
-                Intent call = new Intent(Intent.ACTION_CALL);
-                call.setData(number);
-                startActivity(call);
-
-                boolean passed = onCallPlacedBackgroundThread();
-                setTestResultAndFinish(passed);
-            }
-        }.start();
-    }
-
-    protected TelecomManager getTelecomManager() {
-        return (TelecomManager) getSystemService(TELECOM_SERVICE);
-    }
-
-    @Override
-    public void setTestResultAndFinish(boolean passed) {
-        super.setTestResultAndFinish(passed);
-        if (mPhoneAccountHandle != null) {
-            getTelecomManager().unregisterPhoneAccount(mPhoneAccountHandle);
-        }
-    }
-}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/TelecomTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/telecom/TelecomTestActivity.java
deleted file mode 100644
index 3f7596a..0000000
--- a/apps/CtsVerifier/src/com/android/cts/verifier/telecom/TelecomTestActivity.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.cts.verifier.telecom;
-
-import com.android.cts.verifier.ManifestTestListAdapter;
-import com.android.cts.verifier.PassFailButtons;
-import com.android.cts.verifier.R;
-
-import android.os.Bundle;
-
-public class TelecomTestActivity extends PassFailButtons.TestListActivity {
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.pass_fail_list);
-        setPassFailButtonClickListeners();
-        setInfoResources(R.string.telecom_test_title, R.string.telecom_test_summary, -1);
-
-        setTestListAdapter(new ManifestTestListAdapter(this, getClass().getName()));
-    }
-}
diff --git a/tests/tests/telecomm/Android.mk b/tests/tests/telecomm/Android.mk
deleted file mode 100644
index 6984b18..0000000
--- a/tests/tests/telecomm/Android.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2014 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-# don't include this package in any target
-LOCAL_MODULE_TAGS := optional
-# and when built explicitly put it in the data partition
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-
-#LOCAL_JAVA_LIBRARIES := Telecomm
-
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := CtsTelecomTestCases
-
-# uncomment when b/13250611 is fixed
-#LOCAL_SDK_VERSION := current
-LOCAL_JAVA_LIBRARIES += android.test.runner
-
-include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/telecomm/AndroidManifest.xml b/tests/tests/telecomm/AndroidManifest.xml
deleted file mode 100644
index 9179a0a..0000000
--- a/tests/tests/telecomm/AndroidManifest.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.cts.telecom">
-
-    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
-    <!-- We won't be granted this, but we should at least ask for it (to make sure we don't get it). -->
-    <uses-permission android:name="com.android.server.telecom.permission.REGISTER_PROVIDER_OR_SUBSCRIPTION" />
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
-                     android:targetPackage="com.android.cts.telecom"
-                     android:label="CTS tests of android.telecom">
-        <meta-data android:name="listener"
-            android:value="com.android.cts.runner.CtsTestRunListener" />
-    </instrumentation>
-
-</manifest>
-
diff --git a/tests/tests/telecomm/src/android/telecom/cts/ConnectionTest.java b/tests/tests/telecomm/src/android/telecom/cts/ConnectionTest.java
deleted file mode 100644
index e552733..0000000
--- a/tests/tests/telecomm/src/android/telecom/cts/ConnectionTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telecom.cts;
-
-import android.telecom.Connection;
-import android.telecom.DisconnectCause;
-import android.test.AndroidTestCase;
-
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-public class ConnectionTest extends AndroidTestCase {
-    public void testStateCallbacks() {
-        final Semaphore lock = new Semaphore(0);
-        Connection connection = createConnection(lock);
-
-        waitForStateChange(lock);
-        assertEquals(Connection.STATE_NEW, connection.getState());
-
-        connection.setInitializing();
-        waitForStateChange(lock);
-        assertEquals(Connection.STATE_INITIALIZING, connection.getState());
-
-        connection.setInitialized();
-        waitForStateChange(lock);
-        assertEquals(Connection.STATE_NEW, connection.getState());
-
-        connection.setRinging();
-        waitForStateChange(lock);
-        assertEquals(Connection.STATE_RINGING, connection.getState());
-
-        connection.setDialing();
-        waitForStateChange(lock);
-        assertEquals(Connection.STATE_DIALING, connection.getState());
-
-        connection.setActive();
-        waitForStateChange(lock);
-        assertEquals(Connection.STATE_ACTIVE, connection.getState());
-
-        connection.setOnHold();
-        waitForStateChange(lock);
-        assertEquals(Connection.STATE_HOLDING, connection.getState());
-
-        connection.setDisconnected(
-                new DisconnectCause(DisconnectCause.LOCAL, "Test call"));
-        waitForStateChange(lock);
-        assertEquals(Connection.STATE_DISCONNECTED, connection.getState());
-
-        connection.setRinging();
-        waitForStateChange(lock);
-        assertEquals("Connection should not move out of STATE_DISCONNECTED.",
-                Connection.STATE_DISCONNECTED, connection.getState());
-    }
-
-    public void testFailedState() {
-        Connection connection = Connection.createFailedConnection(
-                new DisconnectCause(DisconnectCause.LOCAL, "Test call"));
-        assertEquals(Connection.STATE_DISCONNECTED, connection.getState());
-
-        connection.setRinging();
-        assertEquals("Connection should not move out of STATE_DISCONNECTED.",
-                Connection.STATE_DISCONNECTED, connection.getState());
-    }
-
-    public void testCanceledState() {
-        Connection connection = Connection.createCanceledConnection();
-        assertEquals(Connection.STATE_DISCONNECTED, connection.getState());
-
-        connection.setDialing();
-        assertEquals("Connection should not move out of STATE_DISCONNECTED",
-                Connection.STATE_DISCONNECTED, connection.getState());
-    }
-
-    private static Connection createConnection(final Semaphore lock) {
-        Connection.Listener listener = new Connection.Listener() {
-            @Override
-            public void onStateChanged(Connection c, int state) {
-                lock.release();
-            }
-        };
-
-        Connection connection = new BasicConnection();
-        connection.addConnectionListener(listener);
-        return connection;
-    }
-
-    private static void waitForStateChange(Semaphore lock) {
-        try {
-            lock.tryAcquire(1000, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException e) {
-            fail("State transition timed out");
-        }
-    }
-
-    private static final class BasicConnection extends Connection {
-    }
-}
diff --git a/tests/tests/telecomm/src/android/telecom/cts/TelecomManagerTest.java b/tests/tests/telecomm/src/android/telecom/cts/TelecomManagerTest.java
deleted file mode 100644
index 8f97d77..0000000
--- a/tests/tests/telecomm/src/android/telecom/cts/TelecomManagerTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.telecom.cts;
-
-import android.content.ComponentName;
-import android.content.pm.PackageManager;
-import android.net.Uri;
-import android.telecom.PhoneAccount;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.PhoneCapabilities;
-import android.telecom.TelecomManager;
-import android.test.AndroidTestCase;
-import android.util.Log;
-
-import java.util.List;
-
-public class TelecomManagerTest extends AndroidTestCase {
-    private static final String TAG = "TelecommManagerTest";
-
-    public void testRegisterAccountsBlocked() {
-        PackageManager pm = getContext().getPackageManager();
-        if (!pm.hasSystemFeature(PackageManager.FEATURE_CONNECTION_SERVICE)) {
-            Log.d(TAG, "Skipping the test because FEATURE_CONNECTION_SERVICE is disabled.");
-            return;
-        }
-
-        PhoneAccount phoneAccount = new PhoneAccount.Builder(
-                new PhoneAccountHandle(
-                        new ComponentName(getContext(), TelecomManagerTest.class),
-                        "testRegisterAccountsBlocked"),
-                "Mock PhoneAccount")
-                .setAddress(Uri.parse("tel:6502637643"))
-                .setSubscriptionAddress(Uri.parse("tel:650-263-7643"))
-                .setCapabilities(PhoneCapabilities.ALL)
-                .setIconResId(0)
-                .setShortDescription("PhoneAccount used in TelecomManagerTest")
-                .build();
-
-        TelecomManager tm = TelecomManager.from(getContext());
-        List<PhoneAccountHandle> handles = tm.getCallCapablePhoneAccounts();
-
-        try {
-            tm.registerPhoneAccount(phoneAccount);
-            fail("This should have failed (CTS can't get the permission)");
-        } catch (SecurityException e) {
-            assertEquals(handles, tm.getCallCapablePhoneAccounts());
-        }
-    }
-}