Check SIP Feature Reporting

Bug 3097462

Change-Id: I4d0cbd95abe6e388facdba60979a691437f6c954
diff --git a/tests/tests/app/src/android/app/cts/SystemFeaturesTest.java b/tests/tests/app/src/android/app/cts/SystemFeaturesTest.java
index 2ce1e75..678fe48 100644
--- a/tests/tests/app/src/android/app/cts/SystemFeaturesTest.java
+++ b/tests/tests/app/src/android/app/cts/SystemFeaturesTest.java
@@ -32,6 +32,7 @@
 import android.hardware.SensorManager;
 import android.hardware.Camera.Parameters;
 import android.location.LocationManager;
+import android.net.sip.SipManager;
 import android.net.wifi.WifiManager;
 import android.telephony.TelephonyManager;
 import android.test.InstrumentationTestCase;
@@ -205,6 +206,30 @@
         return features;
     }
 
+    public void testSipFeatures() {
+        if (SipManager.newInstance(mContext) != null) {
+            assertAvailable(PackageManager.FEATURE_SIP);
+        } else {
+            assertNotAvailable(PackageManager.FEATURE_SIP);
+            assertNotAvailable(PackageManager.FEATURE_SIP_VOIP);
+        }
+
+        if (SipManager.isApiSupported(mContext)) {
+            assertAvailable(PackageManager.FEATURE_SIP);
+        } else {
+            assertNotAvailable(PackageManager.FEATURE_SIP);
+            assertNotAvailable(PackageManager.FEATURE_SIP_VOIP);
+        }
+
+        if (SipManager.isVoipSupported(mContext)) {
+            assertAvailable(PackageManager.FEATURE_SIP);
+            assertAvailable(PackageManager.FEATURE_SIP_VOIP);
+        } else {
+            assertNotAvailable(PackageManager.FEATURE_SIP);
+            assertNotAvailable(PackageManager.FEATURE_SIP_VOIP);
+        }
+    }
+
     /**
      * Check that if the PackageManager declares a sensor feature that the device has at least
      * one sensor that matches that feature. Also check that if a PackageManager does not declare