Make sure telecom settings intents are handled

If the device has FEATURE_TELEPHONY, make sure the intents:

  ACTION_CHANGE_PHONE_ACCOUNTS
  ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS
  ACTION_SHOW_CALL_SETTINGS
  ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS

are handled.

Change-Id: I750f2db954734510aa387ddf531c05b2c85607eb
diff --git a/tests/tests/content/src/android/content/cts/AvailableIntentsTest.java b/tests/tests/content/src/android/content/cts/AvailableIntentsTest.java
index a2dddb5..e037507 100644
--- a/tests/tests/content/src/android/content/cts/AvailableIntentsTest.java
+++ b/tests/tests/content/src/android/content/cts/AvailableIntentsTest.java
@@ -27,6 +27,7 @@
 import android.provider.AlarmClock;
 import android.provider.MediaStore;
 import android.provider.Settings;
+import android.telecom.TelecomManager;
 import android.test.AndroidTestCase;
 
 import java.util.List;
@@ -137,6 +138,50 @@
     }
 
     /**
+     * Test ACTION_CHANGE_PHONE_ACCOUNTS, it will display the phone account preferences.
+     */
+    public void testChangePhoneAccounts() {
+        PackageManager packageManager = mContext.getPackageManager();
+        if (packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
+            Intent intent = new Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS);
+            assertCanBeHandled(intent);
+        }
+    }
+
+    /**
+     * Test ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS, it will display the call accessibility preferences.
+     */
+    public void testShowCallAccessibilitySettings() {
+        PackageManager packageManager = mContext.getPackageManager();
+        if (packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
+            Intent intent = new Intent(TelecomManager.ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS);
+            assertCanBeHandled(intent);
+        }
+    }
+
+    /**
+     * Test ACTION_SHOW_CALL_SETTINGS, it will display the call preferences.
+     */
+    public void testShowCallSettings() {
+        PackageManager packageManager = mContext.getPackageManager();
+        if (packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
+            Intent intent = new Intent(TelecomManager.ACTION_SHOW_CALL_SETTINGS);
+            assertCanBeHandled(intent);
+        }
+    }
+
+    /**
+     * Test ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS, it will display the respond by SMS preferences.
+     */
+    public void testShowRespondViaSmsSettings() {
+        PackageManager packageManager = mContext.getPackageManager();
+        if (packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
+            Intent intent = new Intent(TelecomManager.ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS);
+            assertCanBeHandled(intent);
+        }
+    }
+
+    /**
      * Test start camera by intent
      */
     public void testCamera() {