Checking hardware feature when test rear camera

To support the device which do not have rear camera

Change-Id: I81bcaa1f4fbdf0b1fb94f5f7c82e2b0e179c629e

Conflicts:

	tests/tests/media/src/android/media/cts/MediaRecorderTest.java
diff --git a/tests/tests/media/src/android/media/cts/CamcorderProfileTest.java b/tests/tests/media/src/android/media/cts/CamcorderProfileTest.java
index 0587f88..e34856c 100644
--- a/tests/tests/media/src/android/media/cts/CamcorderProfileTest.java
+++ b/tests/tests/media/src/android/media/cts/CamcorderProfileTest.java
@@ -21,6 +21,7 @@
 import dalvik.annotation.TestTargetNew;
 import dalvik.annotation.TestTargets;
 
+import android.content.pm.PackageManager;
 import android.hardware.Camera;
 import android.hardware.Camera.Parameters;
 import android.hardware.Camera.Size;
@@ -237,6 +238,16 @@
         )
     })
     public void testGet() {
+        /*
+         * Device may not have rear camera for checkGet(-1).
+         * Checking PackageManager.FEATURE_CAMERA is included or not to decide the flow.
+         * Continue if the feature is included.
+         * Otherwise, exit test.
+         */
+        PackageManager pm = mContext.getPackageManager();
+        if (!pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
+            return;
+        }
         checkGet(-1);
     }