Fix code style and unit test issues for the compass fix.

This commit is contained in:
Tsoi Yat Shing
2020-04-21 13:52:37 +08:00
committed by Łukasz Paczos
parent e3b2452ba2
commit d230172b3c
2 changed files with 2 additions and 3 deletions

View File

@@ -58,7 +58,6 @@ public class CompassEngineTest {
@Test
public void whenGyroscopeIsNull_fallbackToGravity() {
SensorManager sensorManager = mock(SensorManager.class);
when(sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE)).thenReturn(null);
new LocationComponentCompassEngine(windowManager, sensorManager);
verify(sensorManager, times(1)).getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
@@ -67,7 +66,6 @@ public class CompassEngineTest {
@Test
public void whenGyroscopeIsNull_fallbackToMagneticField() {
SensorManager sensorManager = mock(SensorManager.class);
when(sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE)).thenReturn(null);
new LocationComponentCompassEngine(windowManager, sensorManager);
verify(sensorManager, times(1)).getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);