am 37eaaa0a: Remove tests for Fused Location
* commit '37eaaa0ac1ead9561a6af2a1cc5106efee5a0855':
Remove tests for Fused Location
diff --git a/tests/tests/location2/src/android/location2/cts/LocationManagerTest.java b/tests/tests/location2/src/android/location2/cts/LocationManagerTest.java
index e68fea0..8b818ba 100755
--- a/tests/tests/location2/src/android/location2/cts/LocationManagerTest.java
+++ b/tests/tests/location2/src/android/location2/cts/LocationManagerTest.java
@@ -30,7 +30,6 @@
import android.location.LocationListener;
import android.location.LocationManager;
import android.location.LocationProvider;
-import android.location.LocationRequest;
import android.os.Bundle;
import android.os.HandlerThread;
import android.os.Looper;
@@ -49,8 +48,6 @@
*/
public class LocationManagerTest extends InstrumentationTestCase {
- private static final String FUSED_PROVIDER_NAME = "fused";
-
private static final long TEST_TIME_OUT_MS = 10 * 1000;
private static final double LAT = 10.0;
@@ -174,50 +171,6 @@
mManager.removeTestProvider(providerName);
}
- public void testGetFusedLocationUpdates_withIntent() {
- addTestProvider(FUSED_PROVIDER_NAME, Criteria.ACCURACY_COARSE, true, false, true);
- registerIntentReceiver();
-
- mManager.requestLocationUpdates(LocationRequest.create(), mPendingIntent);
- updateLocation(FUSED_PROVIDER_NAME, LAT, LNG);
- waitForReceiveBroadcast();
-
- assertNotNull(mIntentReceiver.getLastReceivedIntent());
- final Location location = mManager.getLastKnownLocation(FUSED_PROVIDER_NAME);
- assertEquals(FUSED_PROVIDER_NAME, location.getProvider());
-
- assertEquals(3000.0f, location.getAccuracy());
- assertEquals(LAT, location.getLatitude(), FUDGER_DELTA);
- assertEquals(LNG, location.getLongitude(), FUDGER_DELTA);
-
- mManager.removeUpdates(mPendingIntent);
- mManager.removeTestProvider(FUSED_PROVIDER_NAME);
- }
-
- public void testGetFusedLocationUpdates_withListener() {
- addTestProvider(FUSED_PROVIDER_NAME, Criteria.ACCURACY_COARSE, true, false, true);
-
- MockLocationListener listener = new MockLocationListener();
- HandlerThread handlerThread = new HandlerThread(
- "testLocationUpdates for " + FUSED_PROVIDER_NAME);
- handlerThread.start();
-
- mManager.requestLocationUpdates(LocationRequest.create(),
- listener, handlerThread.getLooper());
- updateLocation(FUSED_PROVIDER_NAME, LAT, LNG);
-
- assertTrue(listener.hasCalledOnLocationChanged(TEST_TIME_OUT_MS));
- Location location = listener.getLocation();
- assertEquals(FUSED_PROVIDER_NAME, location.getProvider());
-
- assertEquals(3000.0f, location.getAccuracy());
- assertEquals(LAT, location.getLatitude(), FUDGER_DELTA);
- assertEquals(LNG, location.getLongitude(), FUDGER_DELTA);
-
- mManager.removeUpdates(listener);
- mManager.removeTestProvider(FUSED_PROVIDER_NAME);
- }
-
/**
* Helper method to add a test provider with given name.
*/