remove TYPE_ORIENTATION sensor requirement.

Orientation sensor is deprecated, as documented in
http://source.android.com/devices/sensors/sensor-types.html#orientation_deprecated

Hence the test should not fail if not present.

BUG 25145630


Change-Id: I46eb08bff5a52efb518f23ca1173dab8e4da82dc
Signed-off-by: Gwendal Grignou <gwendal@google.com>
diff --git a/tests/tests/hardware/src/android/hardware/cts/SensorTest.java b/tests/tests/hardware/src/android/hardware/cts/SensorTest.java
index cffafdc..2bbf053 100644
--- a/tests/tests/hardware/src/android/hardware/cts/SensorTest.java
+++ b/tests/tests/hardware/src/android/hardware/cts/SensorTest.java
@@ -168,8 +168,8 @@
         }
 
         sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
-        // orientation sensor is required if the device can physically implement it
-        if (hasCompass && hasAccelerometer) {
+        // Note: orientation sensor is deprecated.
+        if (sensor != null) {
             assertEquals(Sensor.TYPE_ORIENTATION, sensor.getType());
             assertSensorValues(sensor);
         }