• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 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;
18 
19 /**
20  * Used for receiving sensor additional information frames.
21  */
22 public abstract class SensorEventCallback implements SensorEventListener2 {
23 
24     /**
25      * Called when sensor values have changed.
26      *
27      * @see android.hardware.SensorEventListener#onSensorChanged(SensorEvent)
28      */
29     @Override
onSensorChanged(SensorEvent event)30     public void onSensorChanged(SensorEvent event) {}
31 
32     /**
33      * Called when the accuracy of the registered sensor has changed.
34      *
35      * @see android.hardware.SensorEventListener#onAccuracyChanged(Sensor, int)
36      */
37     @Override
onAccuracyChanged(Sensor sensor, int accuracy)38     public void onAccuracyChanged(Sensor sensor, int accuracy) {}
39 
40     /**
41      * Called after flush() is completed.
42      *
43      * @see android.hardware.SensorEventListener2#onFlushCompleted(Sensor)
44      */
45     @Override
onFlushCompleted(Sensor sensor)46     public void onFlushCompleted(Sensor sensor) {}
47 
48     /**
49      * Called when a sensor additional information frame is available.
50      *
51      * @param info A {@link android.hardware.SensorAdditionalInfo SensorAdditionalInfo} frame
52      * reported from sensor hardware.
53      */
onSensorAdditionalInfo(SensorAdditionalInfo info)54     public void onSensorAdditionalInfo(SensorAdditionalInfo info) {}
55 }
56