summaryrefslogtreecommitdiff
path: root/packages/FusedLocation/test
diff options
context:
space:
mode:
author Soonil Nagarkar <sooniln@google.com> 2020-10-25 17:23:54 -0700
committer Soonil Nagarkar <sooniln@google.com> 2020-11-10 10:14:34 -0800
commitbe6ed5aa14f7418da2a23b0755158491d4ecd179 (patch)
tree121ae291776990d86a057874902464e585b50822 /packages/FusedLocation/test
parentfded2b6d13331c11f9ec6b149834c519382d7dc1 (diff)
Add batching APIs and Location.equals()
-Moves batching APIs from SystemApi to Public, and makes them multi-client safe. -Adds equals/hashcode to Location. Bug: 171512333 Test: manual + presubmit Change-Id: I6ee28f8229fdf49386cd370ea785de63b97e7cde
Diffstat (limited to 'packages/FusedLocation/test')
-rw-r--r--packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java b/packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java
index 61349d9bb8e8..f9f1607dfc95 100644
--- a/packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java
+++ b/packages/FusedLocation/test/src/com/android/location/fused/tests/FusedLocationServiceTest.java
@@ -26,6 +26,7 @@ import android.location.Criteria;
import android.location.Location;
import android.location.LocationManager;
import android.location.LocationRequest;
+import android.location.LocationResult;
import android.os.ParcelFileDescriptor;
import android.os.SystemClock;
import android.os.WorkSource;
@@ -167,8 +168,15 @@ public class FusedLocationServiceTest {
}
@Override
- public void onReportLocation(Location location) {
- mLocations.add(location);
+ public void onReportLocation(LocationResult locationResult) {
+ for (int i = 0; i < locationResult.size(); i++) {
+ mLocations.add(locationResult.get(i));
+ }
+ }
+
+ @Override
+ public void onFlushComplete() {
+
}
public Location getNextLocation(long timeoutMs) throws InterruptedException {