Debian Codegraph @

core/java/android/hardware/location/GeofenceHardwareMonitorCallback.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2013 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.hardware.location;
18
19 import android.annotation.SystemApi;
20 import android.location.Location;
21
22 /**
23 * The callback class associated with the status change of hardware monitors
24 * in {@link GeofenceHardware}
25 *
26 * @hide
27 */
28 @SystemApi
29 public abstract class GeofenceHardwareMonitorCallback {
30 /**
31 * The callback called when the state of a monitoring system changes.
32 * {@link GeofenceHardware#MONITORING_TYPE_GPS_HARDWARE} is an example of a
33 * monitoring system.
34 *
35 * @deprecated use {@link #onMonitoringSystemChange(GeofenceHardwareMonitorEvent)} instead.
36 * NOTE: this API is will remain to be called on Android API 21 and above for backwards
37 * compatibility. But clients must stop implementing it when updating their code.
38 *
39 * @param monitoringType The type of the monitoring system.
40 * @param available Indicates whether the system is currently available or not.
41 * @param location The last known location according to the monitoring system.
42 */
43 @Deprecated
44 public void onMonitoringSystemChange(int monitoringType, boolean available, Location location) {
45 }
46
47 /**
48 * The callback called when the sate of a monitoring system changes.
49 * {@link GeofenceHardware#MONITORING_TYPE_GPS_HARDWARE} is an example of a monitoring system.
50 * {@link GeofenceHardware#MONITOR_CURRENTLY_AVAILABLE} is an example of a monitoring status.
51 * {@link GeofenceHardware#SOURCE_TECHNOLOGY_GNSS} is an example of a source.
52 *
53 * This callback must be used instead of
54 * {@link #onMonitoringSystemChange(int, boolean, android.location.Location)}.
55 *
56 * NOTE: this API is only called on Android API 21 and above.
57 *
58 * @param event An object representing the monitoring system change event.
59 */
60 public void onMonitoringSystemChange(GeofenceHardwareMonitorEvent event) {}
61 }