summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/tests/hardware/src/android/hardware/cts/SensorSupportTest.java2
-rw-r--r--tests/tests/voiceinteraction/src/android/voiceinteraction/cts/VoiceInteractionTest.java9
2 files changed, 9 insertions, 2 deletions
diff --git a/tests/tests/hardware/src/android/hardware/cts/SensorSupportTest.java b/tests/tests/hardware/src/android/hardware/cts/SensorSupportTest.java
index 2f25c8d7ce6..848cc399f45 100644
--- a/tests/tests/hardware/src/android/hardware/cts/SensorSupportTest.java
+++ b/tests/tests/hardware/src/android/hardware/cts/SensorSupportTest.java
@@ -61,7 +61,7 @@ public class SensorSupportTest extends AndroidTestCase {
}
public void testSupportsGeoMagneticField() {
- checkSupportsSensor(Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR);
+ checkSupportsSensor(Sensor.TYPE_MAGNETIC_FIELD);
}
public void testSupportsMagneticFieldUncalibrated() {
diff --git a/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/VoiceInteractionTest.java b/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/VoiceInteractionTest.java
index 0fa89e1cf96..8f6457aa876 100644
--- a/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/VoiceInteractionTest.java
+++ b/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/VoiceInteractionTest.java
@@ -43,6 +43,7 @@ public class VoiceInteractionTest extends ActivityInstrumentationTestCase2<TestS
private TestResultsReceiver mReceiver;
private Bundle mResults;
private final CountDownLatch mLatch = new CountDownLatch(1);
+ private ActivityManager mActivityManager;
public VoiceInteractionTest() {
super(TestStartActivity.class);
@@ -55,7 +56,8 @@ public class VoiceInteractionTest extends ActivityInstrumentationTestCase2<TestS
mContext = getInstrumentation().getTargetContext();
mReceiver = new TestResultsReceiver();
mContext.registerReceiver(mReceiver, new IntentFilter(Utils.BROADCAST_INTENT));
- }
+ mActivityManager = (ActivityManager)getContext().getSystemService(Context.ACTIVITY_SERVICE);
+ }
@Override
protected void tearDown() throws Exception {
@@ -73,6 +75,11 @@ public class VoiceInteractionTest extends ActivityInstrumentationTestCase2<TestS
}
public void testAll() throws Exception {
+
+ if (mActivityManager.isLowRamDevice()) {
+ Log.i(TAG, "Low Ram device.");
+ return;
+ }
if (!mLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
fail("Failed to receive broadcast in " + TIMEOUT_MS + "msec");
return;