/frameworks/base/core/java/android/hardware/ |
D | SystemSensorManager.java | 60 Sensor sensor, int index); in nativeGetSensorAtIndex() argument 119 Sensor sensor = new Sensor(); in SystemSensorManager() local 120 if (!nativeGetSensorAtIndex(mNativeInstance, sensor, index)) break; in SystemSensorManager() 121 mFullSensorsList.add(sensor); in SystemSensorManager() 122 mHandleToSensor.put(sensor.getHandle(), sensor); in SystemSensorManager() local 145 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, in registerListenerImpl() argument 147 if (listener == null || sensor == null) { in registerListenerImpl() 152 if (sensor.getReportingMode() == Sensor.REPORTING_MODE_ONE_SHOT) { in registerListenerImpl() 179 if (!queue.addSensor(sensor, delayUs, maxBatchReportLatencyUs)) { in registerListenerImpl() 186 return queue.addSensor(sensor, delayUs, maxBatchReportLatencyUs); in registerListenerImpl() [all …]
|
D | SensorManager.java | 505 for (Sensor sensor : l) { in getDefaultSensor() 506 if (sensor.isWakeUpSensor() == wakeUpSensor) return sensor; in getDefaultSensor() 539 for (Sensor sensor : l) { in getDefaultSensor() 540 if (sensor.isWakeUpSensor() == wakeUp) { in getDefaultSensor() 541 return sensor; in getDefaultSensor() 647 public void unregisterListener(SensorEventListener listener, Sensor sensor) { in unregisterListener() argument 648 if (listener == null || sensor == null) { in unregisterListener() 652 unregisterListenerImpl(listener, sensor); in unregisterListener() 674 protected abstract void unregisterListenerImpl(SensorEventListener listener, Sensor sensor); in unregisterListenerImpl() argument 728 public boolean registerListener(SensorEventListener listener, Sensor sensor, in registerListener() argument [all …]
|
D | LegacySensorManager.java | 114 Sensor sensor = mSensorManager.getDefaultSensor(type); in registerLegacyListener() local 115 if (sensor != null) { in registerLegacyListener() 135 result = mSensorManager.registerListener(legacyListener, sensor, rate); in registerLegacyListener() 166 Sensor sensor = mSensorManager.getDefaultSensor(type); in unregisterLegacyListener() local 167 if (sensor != null) { in unregisterLegacyListener() 180 mSensorManager.unregisterListener(legacyListener, sensor); in unregisterLegacyListener() 249 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged() argument 251 mTarget.onAccuracyChanged(getLegacySensorType(sensor.getType()), accuracy); in onAccuracyChanged() 263 int type = event.sensor.getType(); in onSensorChanged() 287 private void mapSensorDataToWindow(int sensor, in mapSensorDataToWindow() argument [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/hardware/ |
D | FakeSensorManager.java | 104 protected void unregisterListenerImpl(SensorEventListener listener, Sensor sensor) { in unregisterListenerImpl() argument 107 if (sensor == null || s.mSensor == sensor) { in unregisterListenerImpl() 114 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, in registerListenerImpl() argument 117 Preconditions.checkNotNull(sensor); in registerListenerImpl() 120 if (s.mSensor == sensor) { in registerListenerImpl() 162 protected boolean requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) { in requestTriggerSensorImpl() argument 167 protected boolean cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, in cancelTriggerSensorImpl() argument 178 protected boolean injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, in injectSensorDataImpl() argument 191 Sensor sensor = constr.newInstance(); in createSensor() local 193 setSensorType(sensor, type); in createSensor() [all …]
|
/frameworks/base/native/android/ |
D | sensor.cpp | 52 if (sensor == nullptr) { \ 189 ASensorManager *manager, ASensor const *sensor, int channelId, int rate) { in ASensorManager_configureDirectReport() argument 193 if (sensor == nullptr) { in ASensorManager_configureDirectReport() 201 sensorHandle = static_cast<Sensor const *>(sensor)->getHandle(); in ASensorManager_configureDirectReport() 209 int ASensorEventQueue_registerSensor(ASensorEventQueue* queue, ASensor const* sensor, in ASensorEventQueue_registerSensor() argument 219 static_cast<Sensor const*>(sensor)->getHandle(), samplingPeriodUs, in ASensorEventQueue_registerSensor() 223 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor) { in ASensorEventQueue_enableSensor() argument 228 static_cast<Sensor const*>(sensor)); in ASensorEventQueue_enableSensor() 231 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor) { in ASensorEventQueue_disableSensor() argument 236 static_cast<Sensor const*>(sensor)); in ASensorEventQueue_disableSensor() [all …]
|
/frameworks/hardware/interfaces/sensorservice/libsensorndkbridge/ |
D | ASensorManager.cpp | 128 [&](const auto &sensor, auto result) { in getDefaultSensor() argument 134 if (sensor == mSensors[i]) { in getDefaultSensor() 224 if (sensor == NULL) { \ 297 ASensor const* sensor, 306 ASensor const* sensor, in ASensorEventQueue_registerSensor() argument 312 sensor, samplingPeriodUs, maxBatchReportLatencyUs); in ASensorEventQueue_registerSensor() 316 ASensorEventQueue* queue, ASensor const* sensor) { in ASensorEventQueue_enableSensor() argument 319 return queue->enableSensor(sensor); in ASensorEventQueue_enableSensor() 323 ASensorEventQueue* queue, ASensor const* sensor) { in ASensorEventQueue_disableSensor() argument 326 return queue->disableSensor(sensor); in ASensorEventQueue_disableSensor() [all …]
|
D | ASensorEventQueue.cpp | 40 ASensorRef sensor, in registerSensor() argument 44 reinterpret_cast<const SensorInfo *>(sensor)->sensorHandle, in registerSensor() 55 int ASensorEventQueue::enableSensor(ASensorRef sensor) { in enableSensor() argument 59 sensor, SENSOR_DELAY_NORMAL, 0 /* maxBatchReportLatencyUs */); in enableSensor() 63 ASensorRef sensor, int32_t samplingPeriodUs) { in setEventRate() argument 67 sensor, samplingPeriodUs, 0 /* maxBatchReportLatencyUs */); in setEventRate() 75 int ASensorEventQueue::disableSensor(ASensorRef sensor) { in disableSensor() argument 77 reinterpret_cast<const SensorInfo *>(sensor)->sensorHandle); in disableSensor()
|
D | ASensorEventQueue.h | 48 ASensorRef sensor, 52 int enableSensor(ASensorRef sensor); 53 int disableSensor(ASensorRef sensor); 55 int setEventRate(ASensorRef sensor, int32_t samplingPeriodUs);
|
/frameworks/native/include/android/ |
D | sensor.h | 387 int32_t sensor; member 431 int32_t sensor; member 693 ASensor const* sensor, int channelId, int rate) __INTRODUCED_IN(26); 711 int ASensorEventQueue_registerSensor(ASensorEventQueue* queue, ASensor const* sensor, 724 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor); 735 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor); 750 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec); 812 const char* ASensor_getName(ASensor const* sensor); 817 const char* ASensor_getVendor(ASensor const* sensor); 822 int ASensor_getType(ASensor const* sensor); [all …]
|
/frameworks/native/include_sensor/android/ |
D | sensor.h | 387 int32_t sensor; member 431 int32_t sensor; member 693 ASensor const* sensor, int channelId, int rate) __INTRODUCED_IN(26); 711 int ASensorEventQueue_registerSensor(ASensorEventQueue* queue, ASensor const* sensor, 724 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor); 735 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor); 750 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec); 812 const char* ASensor_getName(ASensor const* sensor); 817 const char* ASensor_getVendor(ASensor const* sensor); 822 int ASensor_getType(ASensor const* sensor); [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/ |
D | AsyncSensorManager.java | 90 Sensor sensor, int delayUs, Handler handler, int maxReportLatencyUs, in registerListenerImpl() argument 93 if (!mInner.registerListener(listener, sensor, delayUs, maxReportLatencyUs, handler)) { in registerListenerImpl() 94 Log.e(TAG, "Registering " + listener + " for " + sensor + " failed."); in registerListenerImpl() 133 protected boolean requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) { in requestTriggerSensorImpl() argument 135 if (!mInner.requestTriggerSensor(listener, sensor)) { in requestTriggerSensorImpl() 136 Log.e(TAG, "Requesting " + listener + " for " + sensor + " failed."); in requestTriggerSensorImpl() 143 protected boolean cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, in cancelTriggerSensorImpl() argument 148 if (!mInner.cancelTriggerSensor(listener, sensor)) { in cancelTriggerSensorImpl() 149 Log.e(TAG, "Canceling " + listener + " for " + sensor + " failed."); in cancelTriggerSensorImpl() 160 public void registerPluginListener(SensorManagerPlugin.Sensor sensor, in registerPluginListener() argument [all …]
|
/frameworks/native/services/sensorservice/ |
D | SensorInterface.cpp | 32 BaseSensor::BaseSensor(const sensor_t& sensor) : in BaseSensor() argument 34 mSensor(&sensor, mSensorDevice.getHalDeviceVersion()) { in BaseSensor() 37 BaseSensor::BaseSensor(const sensor_t& sensor, const uint8_t (&uuid)[16]) : in BaseSensor() argument 39 mSensor(sensor, Sensor::uuid_t(uuid), mSensorDevice.getHalDeviceVersion()) { in BaseSensor() 44 HardwareSensor::HardwareSensor(const sensor_t& sensor): in HardwareSensor() argument 45 BaseSensor(sensor) { in HardwareSensor() 48 HardwareSensor::HardwareSensor(const sensor_t& sensor, const uint8_t (&uuid)[16]): in HardwareSensor() argument 49 BaseSensor(sensor, uuid) { in HardwareSensor()
|
D | SensorService.cpp | 690 int handle = buffer[i].sensor; in cleanupAutoDisabledSensorLocked() 692 handle = buffer[i].meta_data.sensor; in cleanupAutoDisabledSensorLocked() 828 const int sensor_handle = mSensorEventBuffer[i].meta_data.sensor; in threadLoop() 842 *(mSensorEventBuffer[i].dynamic_sensor_meta.sensor); in threadLoop() 972 auto logger = mRecentEvent.find(buffer[i].sensor); in recordLastValueLocked() 995 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); in isVirtualSensor() local 996 return sensor != nullptr && sensor->isVirtual(); in isVirtualSensor() 1000 int handle = event.sensor; in isWakeUpSensorEvent() 1002 handle = event.meta_data.sensor; in isWakeUpSensorEvent() 1004 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); in isWakeUpSensorEvent() local [all …]
|
D | SensorEventConnection.cpp | 242 int32_t sensor_handle = buffer[i].sensor; in sendEvents() 245 buffer[i].meta_data.sensor); in sendEvents() 249 sensor_handle = buffer[i].meta_data.sensor; in sendEvents() 266 buffer[i].meta_data.sensor); in sendEvents() 295 } while ((i<numEvents) && ((buffer[i].sensor == sensor_handle && in sendEvents() 298 buffer[i].meta_data.sensor == sensor_handle))); in sendEvents() 392 const auto iter = mHandleToAppOp.find(event.sensor); in noteOpIfRequired() 487 flushCompleteEvent.meta_data.sensor = handle; in sendPendingFlushEventsLocked() 499 flushCompleteEvent.meta_data.sensor); in sendPendingFlushEventsLocked() 571 ssize_t index = mSensorInfo.indexOfKey(scratch[j].meta_data.sensor); in countFlushCompleteEventsLocked() [all …]
|
D | RotationVectorSensor.cpp | 32 const sensor_t sensor = { in RotationVectorSensor() local 43 mSensor = Sensor(&sensor); in RotationVectorSensor() 57 outEvent->sensor = getSensorToken(); in process() 118 const sensor_t sensor = { in GyroDriftSensor() local 129 mSensor = Sensor(&sensor); in GyroDriftSensor() 142 outEvent->sensor = '_gbs'; in process()
|
/frameworks/base/core/jni/ |
D | android_hardware_SensorManager.cpp | 154 translateNativeSensorToJavaSensor(JNIEnv *env, jobject sensor, const Sensor& nativeSensor) { in translateNativeSensorToJavaSensor() argument 157 if (sensor == NULL) { in translateNativeSensorToJavaSensor() 159 sensor = env->NewObject(sensorOffsets.clazz, sensorOffsets.init, ""); in translateNativeSensorToJavaSensor() 162 if (sensor != NULL) { in translateNativeSensorToJavaSensor() 168 env->SetObjectField(sensor, sensorOffsets.name, name); in translateNativeSensorToJavaSensor() 169 env->SetObjectField(sensor, sensorOffsets.vendor, vendor); in translateNativeSensorToJavaSensor() 170 env->SetIntField(sensor, sensorOffsets.version, nativeSensor.getVersion()); in translateNativeSensorToJavaSensor() 171 env->SetIntField(sensor, sensorOffsets.handle, nativeSensor.getHandle()); in translateNativeSensorToJavaSensor() 172 env->SetFloatField(sensor, sensorOffsets.range, nativeSensor.getMaxValue()); in translateNativeSensorToJavaSensor() 173 env->SetFloatField(sensor, sensorOffsets.resolution, nativeSensor.getResolution()); in translateNativeSensorToJavaSensor() [all …]
|
/frameworks/base/packages/SystemUI/plugin/src/com/android/systemui/plugins/ |
D | SensorManagerPlugin.java | 38 void registerListener(Sensor sensor, SensorEventListener listener); in registerListener() argument 45 void unregisterListener(Sensor sensor, SensorEventListener listener); in unregisterListener() argument 90 public SensorEvent(Sensor sensor, int vendorType) { in SensorEvent() argument 91 this(sensor, vendorType, null); in SensorEvent() 101 public SensorEvent(Sensor sensor, int vendorType, float[] values) { in SensorEvent() argument 102 mSensor = sensor; in SensorEvent()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/ |
D | DozeSensors.java | 183 for (TriggerSensor sensor : mSensors) { in setTouchscreenSensorsListening() 184 if (sensor.mRequiresTouchscreen) { in setTouchscreenSensorsListening() 185 sensor.setListening(listening); in setTouchscreenSensorsListening() 218 for (TriggerSensor sensor : mSensors) { in ignoreTouchScreenSensorsSettingInterferingWithDocking() 219 if (sensor.mRequiresTouchscreen) { in ignoreTouchScreenSensorsSettingInterferingWithDocking() 220 sensor.ignoreSetting(ignore); in ignoreTouchScreenSensorsSettingInterferingWithDocking() 268 Sensor sensor = DozeSensors.findSensorWithType(mSensorManager, in ProxSensor() local 270 if (sensor == null) { in ProxSensor() 271 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); in ProxSensor() 273 mSensor = sensor; in ProxSensor() [all …]
|
/frameworks/hardware/interfaces/sensorservice/1.0/ |
D | IDirectReportChannel.hal | 31 * Configure sensor direct report on a direct channel: set rate to value 32 * other than STOP so that sensor event can be directly written into the 34 * stop the sensor direct report. 36 * To stop all active sensor direct report configured to a channel, set 39 * @param sensorHandle handle of the sensor to operate on. If it is -1 41 * sensor direct report. 42 * @param rate rate level value to set on the specified sensor. 46 * rate level is not supported by sensor, etc); 48 * @return token the token used to distinguish sensor events from
|
D | IEventQueue.hal | 25 * Enable the selected sensor with a specified sampling period and 27 * same sensor, the previous calls must be overridden by the last call. 29 * @param sensorHandle the sensor to enable. Must be a sensor acquired from 45 * Disable the selected sensor. 47 * @param sensorHandle the sensor to disable. Must be a sensor acquired from
|
D | 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. 110 * Subsequently, one can enable sensors on the event queue so that sensor
|
/frameworks/native/libs/sensor/ |
D | SensorEventQueue.cpp | 125 status_t SensorEventQueue::enableSensor(Sensor const* sensor) const { in enableSensor() 126 return enableSensor(sensor, SENSOR_DELAY_NORMAL); in enableSensor() 129 status_t SensorEventQueue::enableSensor(Sensor const* sensor, int32_t samplingPeriodUs) const { in enableSensor() argument 130 return mSensorEventConnection->enableDisable(sensor->getHandle(), true, in enableSensor() 134 status_t SensorEventQueue::disableSensor(Sensor const* sensor) const { in disableSensor() 135 return mSensorEventConnection->enableDisable(sensor->getHandle(), false, 0, 0, 0); in disableSensor() 152 status_t SensorEventQueue::setEventRate(Sensor const* sensor, nsecs_t ns) const { in setEventRate() argument 153 return mSensorEventConnection->setEventRate(sensor->getHandle(), ns); in setEventRate()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/display/whitebalance/ |
D | AmbientSensorTest.java | 163 private SensorEvent createSensorEvent(Sensor sensor, int lux) throws Exception { in createSensorEvent() argument 168 event.sensor = sensor; in createSensorEvent() 175 private void setSensorType(Sensor sensor, int type, String strType) throws Exception { in setSensorType() argument 178 setter.invoke(sensor, type); in setSensorType() 180 Field f = sensor.getClass().getDeclaredField("mStringType"); in setSensorType() 182 f.set(sensor, strType); in setSensorType() 189 Sensor sensor = constr.newInstance(); in createSensor() local 190 setSensorType(sensor, type, strType); in createSensor() 191 return sensor; in createSensor()
|
/frameworks/native/libs/binder/ |
D | IBatteryStats.cpp | 37 virtual void noteStartSensor(int uid, int sensor) { in noteStartSensor() argument 41 data.writeInt32(sensor); in noteStartSensor() 45 virtual void noteStopSensor(int uid, int sensor) { in noteStopSensor() argument 49 data.writeInt32(sensor); in noteStopSensor() 147 int sensor = data.readInt32(); in onTransact() local 148 noteStartSensor(uid, sensor); in onTransact() 155 int sensor = data.readInt32(); in onTransact() local 156 noteStopSensor(uid, sensor); in onTransact()
|
/frameworks/native/libs/sensor/include/sensor/ |
D | SensorEventQueue.h | 82 status_t enableSensor(Sensor const* sensor) const; 83 status_t enableSensor(Sensor const* sensor, int32_t samplingPeriodUs) const; 84 status_t disableSensor(Sensor const* sensor) const; 85 status_t setEventRate(Sensor const* sensor, nsecs_t ns) const;
|