1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.location;
18 
19 import android.annotation.IntDef;
20 import android.annotation.SystemApi;
21 
22 import java.lang.annotation.Retention;
23 import java.lang.annotation.RetentionPolicy;
24 import java.util.List;
25 
26 /**
27  * Used for receiving notifications from the LocationManager when
28  * the a batch of location is ready. These methods are called if the
29  * BatchedLocationCallback has been registered with the location manager service
30  * using the
31  * {@link LocationManager#registerGnssBatchedLocationCallback#startGnssBatch(long,
32  * boolean, BatchedLocationCallback, android.os.Handler)} method.
33  * @hide
34  */
35 @SystemApi
36 public abstract class BatchedLocationCallback {
37 
38     /**
39      * Called when a new batch of locations is ready
40      *
41      * @param locations A list of all new locations (possibly zero of them.)
42      */
onLocationBatch(List<Location> locations)43     public void onLocationBatch(List<Location> locations) {}
44 }
45