am 9ff70492: am 212e20bb: am 5fefa581: Merge "Checking physical cameras exist on the device for graphics.TextureView test."

* commit '9ff704921d6f737b7ddd9e07a335a3d81c2dbe44':
  Checking physical cameras exist on the device for graphics.TextureView test.
diff --git a/tests/tests/graphics2/src/android/graphics2/cts/TextureViewTest.java b/tests/tests/graphics2/src/android/graphics2/cts/TextureViewTest.java
index 932a5d5..c84919a 100644
--- a/tests/tests/graphics2/src/android/graphics2/cts/TextureViewTest.java
+++ b/tests/tests/graphics2/src/android/graphics2/cts/TextureViewTest.java
@@ -17,6 +17,7 @@
 package android.graphics2.cts;
 
 import android.graphics2.cts.TextureViewCameraActivity;
+import android.hardware.Camera;
 import android.test.ActivityInstrumentationTestCase2;
 
 
@@ -30,10 +31,16 @@
     @Override
     protected void setUp() throws Exception {
         super.setUp();
+        if (Camera.getNumberOfCameras() < 1) {
+            return;
+        }
         mActivity = getActivity();
     }
 
     public void testTextureViewActivity() throws InterruptedException {
+        if (Camera.getNumberOfCameras() < 1) {
+            return;
+        }
         assertTrue(mActivity.waitForCompletion(WAIT_TIMEOUT_IN_SECS));
     }