| /cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
| RotationVectorTestActivity.java | 26 import android.hardware.Sensor; 72 private final Sensor[] mSensor = new Sensor[3]; 120 * Verifies that a given 'Rotation Vector' sensor does not drift over time. 126 Sensor sensor = mSensor[sensorIndex]; local 127 if (sensor == null) { 150 return verifyVector(ROTATION_VECTOR_INDEX, Sensor.TYPE_ROTATION_VECTOR); 156 Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR); 160 return verifyVector(GAME_ROTATION_VECTOR_INDEX, Sensor.TYPE_GAME_ROTATION_VECTOR) 198 Sensor sensor = mSensor[i]; local [all...] |
| /frameworks/base/core/java/android/hardware/ |
| LegacySensorManager.java | 31 * Helper class for implementing the legacy sensor manager API. 72 final List<Sensor> fullList = mSensorManager.getFullSensorList(); 73 for (Sensor i : fullList) { 75 case Sensor.TYPE_ACCELEROMETER: 78 case Sensor.TYPE_MAGNETIC_FIELD: 81 case Sensor.TYPE_ORIENTATION: 96 Sensor.TYPE_ACCELEROMETER, listener, sensors, rate) || result; 98 Sensor.TYPE_MAGNETIC_FIELD, listener, sensors, rate) || result; 100 Sensor.TYPE_ORIENTATION, listener, sensors, rate) || result; 102 Sensor.TYPE_ORIENTATION, listener, sensors, rate) || result 114 Sensor sensor = mSensorManager.getDefaultSensor(type); local 166 Sensor sensor = mSensorManager.getDefaultSensor(type); local [all...] |
| SensorManager.java | 34 * SensorManager lets you access the device's {@link android.hardware.Sensor 44 * Note: Don't use this mechanism with a Trigger Sensor, have a look 45 * at {@link TriggerEventListener}. {@link Sensor#TYPE_SIGNIFICANT_MOTION} 46 * is an example of a trigger sensor. 51 * private final Sensor mAccelerometer; 55 * mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 68 * public void onAccuracyChanged(Sensor sensor, int accuracy) { 78 * @see Sensor 89 private final SparseArray<List<Sensor>> mSensorListByType [all...] |
| SensorAdditionalInfo.java | 25 * This class represents a {@link android.hardware.Sensor Sensor} additional information frame, 31 * @see Sensor 38 * The sensor that generated this event. See 41 public final Sensor sensor; field in class:SensorAdditionalInfo 95 * not taken into account by sensor timestamps. 104 * Internal temperature. Sensor hardware device internal temperature. 112 * Vector calibration parameter. Calibration applied to a sensor with 3 elements vector output, 122 * Sensor placement. Describes location and installation angle of the sensor device [all...] |
| /device/google/contexthub/sensorhal/ |
| hubconnection.cpp | 55 #define NANOHUB_LOCK_DIR "/data/vendor/sensor/nanohub_lock" 106 static bool isWakeEvent(int32_t sensor) 108 switch (sensor) { 281 // enable hall sensor for folio 315 // Set main thread to SCHED_FIFO to lower sensor event latency when system is under load 582 sensors_event_t *HubConnection::initEv(sensors_event_t *ev, uint64_t timestamp, uint32_t type, uint32_t sensor) 588 ev->sensor = sensor; 593 ssize_t HubConnection::decrementIfWakeEventLocked(int32_t sensor) 595 if (isWakeEvent(sensor)) { 1138 uint32_t type, sensor, bias, currSensor; local [all...] |
| sensors.cpp | 216 if (event->sensor != SENSORS_HANDLE_BASE - 1) { 240 ALOGE("sensor p = %p, n = %zu", mSensorList.data(), mSensorList.size()); 266 sensor_t sensor = kSensorList[i]; local 267 if (sensor.handle != handle) { 271 if ((sensor.flags & REPORTING_MODE_MASK) == SENSOR_FLAG_CONTINUOUS_MODE) { 272 if ((delayNs/1000) < sensor.minDelay) { 273 delayNsClamped = sensor.minDelay * 1000; 274 } else if ((delayNs/1000) > sensor.maxDelay) { 275 delayNsClamped = sensor.maxDelay * 1000; 292 sensor_t sensor = kSensorList[i] local [all...] |
| /cts/tests/sensor/src/android/hardware/cts/ |
| SensorSupportTest.java | 21 import android.hardware.Sensor; 56 checkSupportsSensor(Sensor.TYPE_ACCELEROMETER); 60 checkSupportsSensor(Sensor.TYPE_ACCELEROMETER_UNCALIBRATED); 64 checkSupportsSensor(Sensor.TYPE_GYROSCOPE); 68 checkSupportsSensor(Sensor.TYPE_GYROSCOPE_UNCALIBRATED); 72 checkSupportsSensor(Sensor.TYPE_MAGNETIC_FIELD); 76 checkSupportsSensor(Sensor.TYPE_MAGNETIC_FIELD_UNCALIBRATED); 80 checkSupportsSensor(Sensor.TYPE_PRESSURE); 84 checkSupportsSensor(Sensor.TYPE_ROTATION_VECTOR); 88 checkSupportsSensor(Sensor.TYPE_SIGNIFICANT_MOTION) 121 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); local [all...] |
| /external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
| SensorManagerTest.java | 4 import android.hardware.Sensor; 45 Sensor sensor = sensorManager.getDefaultSensor(SensorManager.SENSOR_ACCELEROMETER); local 46 sensorManager.registerListener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL); 74 public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
| /packages/apps/Camera2/src/com/android/camera/hardware/ |
| HeadingSensor.java | 21 import android.hardware.Sensor; 27 * A virtual sensor that reports device heading based on information 28 * provided by accelerometer sensor or magnetic sensor. 38 /** Device sensor manager. */ 41 private final Sensor mAccelerometerSensor; 43 private final Sensor mMagneticSensor; 47 /** Magnetic sensor data. */ 53 * Constructs a heading sensor. 60 mAccelerometerSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) [all...] |
| /frameworks/native/services/sensorservice/ |
| SensorEventConnection.h | 34 #include <sensor/Sensor.h> 35 #include <sensor/BitTube.h> 36 #include <sensor/ISensorServer.h> 37 #include <sensor/ISensorEventConnection.h> 89 // wake_up sensor event in the buffer else return -1. This wake_up sensor event will have the 112 // has read events from a wake up sensor, decrement mWakeLockRefCount. If this fd is available 116 // Increment mPendingFlushEventsToSend for the given sensor handle. 149 // The number of flush complete events dropped for this sensor is stored here. They ar [all...] |
| SensorEventConnection.cpp | 20 #include <sensor/SensorEventQueue.h> 234 int32_t sensor_handle = buffer[i].sensor; 236 ALOGD_IF(DEBUG_CONNECTIONS, "flush complete event sensor==%d ", 237 buffer[i].meta_data.sensor); 238 // Setting sensor_handle to the correct sensor to ensure the sensor events per 239 // connection are filtered correctly. buffer[i].sensor is zero for meta_data 241 sensor_handle = buffer[i].meta_data.sensor; 245 // Check if this connection has registered for this sensor. If not continue to the 253 // Check if there is a pending flush_complete event for this sensor on this connection 677 const Sensor& sensor = si->getSensor(); local [all...] |
| SensorService.cpp | 31 #include <sensor/SensorEventQueue.h> 67 * - what about a gyro-corrected magnetic-field sensor? 68 * - run mag sensor from time to time to force calibration 69 * - gravity sensor length is wrong (=> drift in linear-acc sensor) 104 ALOGW("Can't generate HMAC key; dynamic sensor getId() will be wrong."); 121 ALOGW("Unable to write HMAC key; dynamic sensor getId() will change " 129 // Set main thread to SCHED_FIFO to lower sensor event latency when system is under load 232 // counts for each sensor. 235 [&batchingSupported] (const Sensor& s) -> bool 894 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local 903 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local 993 Sensor sensor = initialSensorList[i]; local 1262 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local 1443 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local 1516 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local [all...] |
| /frameworks/native/services/sensorservice/hidl/ |
| utils.h | 23 #include <sensor/Sensor.h> 30 ::android::hardware::sensors::V1_0::SensorInfo convertSensor(const ::android::Sensor &src);
|
| /packages/apps/Dialer/java/com/android/incallui/ |
| AccelerometerListener.java | 20 import android.hardware.Sensor; 46 private Sensor sensor; field in class:AccelerometerListener 49 // mPendingOrientation is the latest orientation computed based on the sensor value. 86 public void onAccuracyChanged(Sensor sensor, int accuracy) { 93 sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 108 sensorManager.registerListener(sensorListener, sensor, SensorManager.SENSOR_DELAY_NORMAL); 148 // If some values are exactly zero, then likely the sensor is not powered up yet [all...] |
| /packages/services/Car/tools/ |
| update-obd2-sensors.py | 35 def addSensor(self, sensor): 36 """Add a new sensor to the list.""" 37 if not hasattr(sensor, 'id'): 39 sensor.id = self.id 40 self.sensors.append(sensor) 43 """Complete the list, adding well-known sensor information.""" 55 """A formatter object that does processing on sensor data.""" 63 def sensor(self, theSensor, theSensors): member in class:SensorPolicy 64 """Produce output for a sensor.""" 68 """Prefix string before any sensor data is generated."" 105 def sensor(self, theSensor, theSensors): member in class:JavaSensorPolicy 155 def sensor(self, theSensor, theSensors): member in class:PythonSensorPolicy 168 def sensor(self, theSensor, theSensors): member in class:IntDefSensorPolicy [all...] |
| /system/chre/platform/slpi/smgr/ |
| platform_sensor.cc | 32 #include "chre_api/chre/sensor.h" 34 #include "chre/core/sensor.h" 51 // As SMGR doesn't support passive sensor request, it's now implemented on the 56 // 1. A sensor status monitor is added in addSensorMonitor() to receive the 57 // SNS_SMGR_SENSOR_STATUS_MONITOR_IND_V02 message the first time a sensor is 65 // 2) If the request is allowed, a QMI request to add the sensor request is 66 // made. Otherwise, a QMI request to remove the sensor request is made to 69 // 3) The merged mode of a sensor is the strongest mode of all sensor 70 // requests of the same sensor ID, with active > passive > off 321 Sensor sensor; local 696 const Sensor *sensor = EventLoopManagerSingleton::get() local 1148 const Sensor *sensor = EventLoopManagerSingleton::get() local 1223 Sensor *sensor = EventLoopManagerSingleton::get()->getSensorRequestManager() local 1266 const Sensor *sensor = EventLoopManagerSingleton::get() local 1292 const Sensor *sensor = EventLoopManagerSingleton::get() local [all...] |
| /hardware/invensense/6515/libsensors_iio/software/simple_apps/stress_iio/ |
| stress_iio.c | 700 void get_sensor_data(char *d, short *sensor) 705 sensor[i] = *(short *)(d + 2 + i * 2); 712 short sensor[3]; local 790 get_sensor_data(dptr, sensor); 792 printf("PRESSURE:%d, %lld\n", (sensor[1] << 16) + (unsigned short)sensor[2], *(long long *)dptr); 798 get_sensor_data(dptr, sensor); 800 printf("A:%d, %d, %d, %lld\n", sensor[0], sensor[1], sensor[2], *(long long *)dptr) [all...] |
| /device/google/contexthub/firmware/os/inc/ |
| halIntf.h | 30 #define APP_TO_SENSOR_HAL_TYPE(sensor, subtype) (((sensor) && 0xFF) | (((subtype) & 0x7F) << 8)) 34 // gyro sensor calibration: GyroCalBias 37 // gyro sensor over temperature calibration: GyroOtcData 40 // mag sensor calibration: MagCalBias 46 // mag sensor spherical calibration: MagSphericalData 88 // data structure for upload bulk data to sensor hal
|
| /external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
| ShadowSensorManager.java | 3 import android.hardware.Sensor; 25 public boolean registerListener(SensorEventListener listener, Sensor sensor, int rate) { 37 public void unregisterListener(SensorEventListener listener, Sensor sensor) {
|
| /frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/ |
| ProximityClassifier.java | 19 import android.hardware.Sensor; 24 * A classifier which looks at the proximity sensor during the gesture. It calculates the percentage 25 * the proximity sensor showing the near state during the whole gesture 44 if (event.sensor.getType() == Sensor.TYPE_PROXIMITY) { 45 update(event.values[0] < event.sensor.getMaximumRange(), event.timestamp); 73 * @param near is the sensor showing the near state right now
|
| /frameworks/hardware/interfaces/sensorservice/1.0/ |
| ISensorManager.hal | 43 * Get the default sensor of the specified type. 45 * @return sensor the default sensor for the given type, or undetermined 48 NOT_EXIST if no sensor of that type exists. 51 generates (SensorInfo sensor, Result result); 57 * for configuring sensor direct report. 64 * 0x0004 int32_t sensor report token 91 * for configuring sensor direct report. 107 * Create a sensor event queue. 109 * Create a sensor event queue with an IEventQueueCallback object [all...] |
| /frameworks/native/libs/binder/ |
| IBatteryStats.cpp | 37 virtual void noteStartSensor(int uid, int sensor) { 41 data.writeInt32(sensor); 45 virtual void noteStopSensor(int uid, int sensor) { 49 data.writeInt32(sensor); 146 int sensor = data.readInt32(); local 147 noteStartSensor(uid, sensor); 154 int sensor = data.readInt32(); local 155 noteStopSensor(uid, sensor);
|
| /packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/ |
| ProximityClassifier.java | 19 import android.hardware.Sensor; 25 * A classifier which looks at the proximity sensor during the gesture. It calculates the percentage 26 * the proximity sensor showing the near state during the whole gesture 44 if (event.sensor.getType() == Sensor.TYPE_PROXIMITY) { 45 update(event.values[0] < event.sensor.getMaximumRange(), event.timestamp); 72 * @param near is the sensor showing the near state right now
|
| /packages/apps/Dialer/java/com/android/incallui/answerproximitysensor/ |
| PseudoProximityWakeLock.java | 20 import android.hardware.Sensor; 29 * PseudoScreenState} to fake a black screen when the proximity sensor is near. 35 private final Sensor proximitySensor; 45 context.getSystemService(SensorManager.class).getDefaultSensor(Sensor.TYPE_PROXIMITY); 75 boolean near = sensorEvent.values[0] < sensorEvent.sensor.getMaximumRange(); 84 public void onAccuracyChanged(Sensor sensor, int i) {}
|
| /device/google/contexthub/util/nanotool/ |
| contexthub.h | 38 // The order of this enum must correspond to sensor types in nanohub's 78 // Overloaded values of rate used in sensor enable request (see sensors.h) 89 // When enabling a sensor, rate can be specified in Hz or as one of the 131 * Performs the sensor calibration routine and writes the resulting data to 137 * Performs the sensor self-test routine. 142 * Sends a sensor enable request to the context hub. 144 bool EnableSensor(const SensorSpec& sensor); 148 * Sends a disable sensor request to context hub. Note that this always 149 * results in sending a request, i.e. this does not check whether the sensor 156 * Sends a disable sensor request for every sensor type we know about [all...] |