Home
last modified time | relevance | path

Searched refs:sensor (Results 1 – 25 of 45) sorted by relevance

12

/cts/tests/sensor/src/android/hardware/cts/
DSensorTest.java129 Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in testSensorOperations() local
134 assertEquals(Sensor.TYPE_ACCELEROMETER, sensor.getType()); in testSensorOperations()
135 assertSensorValues(sensor); in testSensorOperations()
137 assertNull(sensor); in testSensorOperations()
140 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); in testSensorOperations()
145 assertEquals(Sensor.TYPE_STEP_COUNTER, sensor.getType()); in testSensorOperations()
146 assertSensorValues(sensor); in testSensorOperations()
148 assertNull(sensor); in testSensorOperations()
151 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR); in testSensorOperations()
156 assertEquals(Sensor.TYPE_STEP_DETECTOR, sensor.getType()); in testSensorOperations()
[all …]
DSensorParameterRangeTest.java149 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkSensorRangeAndFrequency() local
150 if (sensor == null) { in checkSensorRangeAndFrequency()
163 sensor.getName(), sensor.getMaximumRange(), range, in checkSensorRangeAndFrequency()
164 SensorCtsHelper.getUnitsForSensor(sensor)), in checkSensorRangeAndFrequency()
165 sensor.getMaximumRange() >= range); in checkSensorRangeAndFrequency()
167 double actualMaxFrequency = SensorCtsHelper.getFrequency(sensor.getMinDelay(), in checkSensorRangeAndFrequency()
170 sensor.getName(), actualMaxFrequency, frequency), actualMaxFrequency >= in checkSensorRangeAndFrequency()
174 double actualMinFrequency = SensorCtsHelper.getFrequency(sensor.getMaxDelay(), in checkSensorRangeAndFrequency()
177 sensor.getName(), actualMinFrequency, hifiMinFrequency), in checkSensorRangeAndFrequency()
210 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkMinFifoLength() local
[all …]
DSensorBatchingFifoTest.java80 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in getReservedFifoLength() local
81 assertTrue(String.format("sensor of type=%d (null)", sensorType), sensor != null); in getReservedFifoLength()
82 return sensor.getFifoReservedEventCount(); in getReservedFifoLength()
89 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in runBatchingSensorFifoTest() local
91 sensor, in runBatchingSensorFifoTest()
93 sensor.getMinDelay(), in runBatchingSensorFifoTest()
DSensorIntegrationTests.java91 Sensor sensor = TestSensorEnvironment.getSensor(context, sensorType); in testSensorsWithSeveralClients() local
97 sensor.getMinDelay(), in testSensorsWithSeveralClients()
243 Sensor sensor = sensorManager.getDefaultSensor(sensorType); in verifySensorReconfigureWhileActive() local
244 if(sensor == null) { in verifySensorReconfigureWhileActive()
252 sensor, in verifySensorReconfigureWhileActive()
255 sensor.getMaxDelay(), in verifySensorReconfigureWhileActive()
269 sensor, in verifySensorReconfigureWhileActive()
272 sensor.getMinDelay(), in verifySensorReconfigureWhileActive()
402 Sensor sensor = TestSensorEnvironment.getSensor(getContext(), sensorType); in generateSamplingRateInUs() local
403 int maxSamplingRate = sensor.getMinDelay(); in generateSamplingRateInUs()
DSensorSupportTest.java131 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkSupportsSensor() local
132 assertTrue(sensor != null); in checkSupportsSensor()
134 … assertTrue(sensor.isDirectChannelTypeSupported(SensorDirectChannel.TYPE_HARDWARE_BUFFER)); in checkSupportsSensor()
/cts/tools/cts-device-info/src/com/android/cts/deviceinfo/
DSensorDeviceInfo.java71 for (Sensor sensor : sensors) { in collectDeviceInfo()
73 store.addResult(REPORTING_MODE, sensor.getReportingMode()); in collectDeviceInfo()
74 store.addResult(NAME, sensor.getName()); in collectDeviceInfo()
75 store.addResult(VENDOR, sensor.getVendor()); in collectDeviceInfo()
76 store.addResult(TYPE, sensor.getType()); in collectDeviceInfo()
77 store.addResult(VERSION, sensor.getVersion()); in collectDeviceInfo()
78 store.addResult(MAXIMUM_RANGE, sensor.getMaximumRange()); in collectDeviceInfo()
79 store.addResult(RESOLUTION, sensor.getResolution()); in collectDeviceInfo()
80 store.addResult(POWER, sensor.getPower()); in collectDeviceInfo()
81 store.addResult(MIN_DELAY, sensor.getMinDelay()); in collectDeviceInfo()
[all …]
/cts/apps/CameraITS/tests/scene0/
Dtest_unified_timestamps.py49 for sensor, existing in sensors.iteritems():
51 assert events[sensor], '%s sensor has no events!' % sensor
52 ts_sensor_first[sensor] = events[sensor][0]['time']
53 ts_sensor_last[sensor] = events[sensor][-1]['time']
62 for sensor, existing in sensors.iteritems():
64 print '%s timestamps: %d %d' % (sensor, ts_sensor_first[sensor],
65 ts_sensor_last[sensor])
66 assert ts_image0 < ts_sensor_first[sensor] < ts_image1
67 assert ts_image0 < ts_sensor_last[sensor] < ts_image1
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DDeviceSuspendTestActivity.java295 for (Sensor sensor : sensorList) { in testTimestampClockSource()
296 if (sensor.getReportingMode() != Sensor.REPORTING_MODE_CONTINUOUS) { in testTimestampClockSource()
297 … Log.i(TAG, "testTimestampClockSource skipping non-continuous sensor: '" + sensor.getName()); in testTimestampClockSource()
300 if (sensor.getType() >= Sensor.TYPE_DEVICE_PRIVATE_BASE) { in testTimestampClockSource()
301 … Log.i(TAG, "testTimestampClockSource skipping vendor specific sensor: '" + sensor.getName()); in testTimestampClockSource()
311 string = runVerifySensorTimestampClockbase(sensor, false); in testTimestampClockSource()
326 public String runAPWakeUpWhenReportLatencyExpires(Sensor sensor) throws Throwable { in runAPWakeUpWhenReportLatencyExpires() argument
328 verifyBatchingSupport(sensor); in runAPWakeUpWhenReportLatencyExpires()
330 int fifoMaxEventCount = sensor.getFifoMaxEventCount(); in runAPWakeUpWhenReportLatencyExpires()
331 int samplingPeriodUs = sensor.getMaxDelay(); in runAPWakeUpWhenReportLatencyExpires()
[all …]
DEventSanitizationTestActivity.java63 final Sensor sensor = sensorManager.getDefaultSensor( in testNoTriggerEventsWhileUidIdle() local
65 if (sensor == null) { in testNoTriggerEventsWhileUidIdle()
82 sensorManager.requestTriggerSensor(listener, sensor); in testNoTriggerEventsWhileUidIdle()
93 sensorManager.cancelTriggerSensor(listener, sensor); in testNoTriggerEventsWhileUidIdle()
107 final Sensor sensor = sensorManager.getDefaultSensor( in testNoOnChangeEventsWhileUidIdle() local
109 if (sensor == null) { in testNoOnChangeEventsWhileUidIdle()
127 public void onAccuracyChanged(Sensor sensor, int accuracy) { in testNoOnChangeEventsWhileUidIdle()
131 sensorManager.registerListener(listener, sensor, in testNoOnChangeEventsWhileUidIdle()
132 sensor.getMinDelay(), sensor.getMaxDelay()); in testNoOnChangeEventsWhileUidIdle()
143 sensorManager.unregisterListener(listener, sensor); in testNoOnChangeEventsWhileUidIdle()
DRotationVectorTestActivity.java126 Sensor sensor = mSensor[sensorIndex]; in verifyVector() local
127 if (sensor == null) { in verifyVector()
198 Sensor sensor = mSensor[i]; in onResume() local
199 if (sensor != null) { in onResume()
201 .registerListener(mListener, sensor, SensorManager.SENSOR_DELAY_GAME); in onResume()
202 Log.v(LOG_TAG, "Renderer using sensor: " + sensor.getName()); in onResume()
214 if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { in onSensorChanged()
217 if (event.sensor.getType() == Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR) { in onSensorChanged()
220 if (event.sensor.getType() == Sensor.TYPE_GAME_ROTATION_VECTOR) { in onSensorChanged()
226 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged() argument
DStepSensorPermissionTestActivity.java171 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkSensor() local
172 mSensorUnderTest = sensor; in checkSensor()
175 expected ? "" : "not ", sensor.getName()); in checkSensor()
176 assertTrue(msg, mSensorManager.registerListener(this, sensor, 0, 0) == expected); in checkSensor()
183 assertTrue("Failed to receive event for " + sensor.getName(), eventReceived); in checkSensor()
185 assertFalse("Should not have received event for " + sensor.getName(), eventReceived); in checkSensor()
197 if (sensorEvent.sensor == mSensorUnderTest) { in onSensorChanged()
203 public void onAccuracyChanged(Sensor sensor, int i) { in onAccuracyChanged() argument
247 if (sensorEvent.sensor == mAccel) { in onSensorChanged()
256 public void onAccuracyChanged(Sensor sensor, int i) { in onAccuracyChanged() argument
DStepCounterTestActivity.java215 String sensorName = counterEvent.sensor.getName(); in verifyStepCounterMeasurements()
243 + TestSensorEnvironment.getSensorMaxDetectionLatencyNs(counterEvent.sensor); in verifyStepCounterMeasurements()
248 counterEvent.sensor.getName()); in verifyStepCounterMeasurements()
272 counterEvent.sensor.getName()); in verifyStepCounterMeasurements()
294 String sensorName = detectorEvent.sensor.getName(); in verifyStepDetectorMeasurements()
317 public final void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged() argument
322 int type = event.sensor.getType(); in onSensorChanged()
DDynamicSensorDiscoveryTestActivity.java164 public void onDynamicSensorConnected(Sensor sensor) { in onDynamicSensorConnected() argument
165 Log.d(TAG, "Sensor Connected: " + sensor); in onDynamicSensorConnected()
167 if (mExpectSensorId == null || mExpectSensorId == sensor.getId()) { in onDynamicSensorConnected()
168 mSensor = sensor; in onDynamicSensorConnected()
176 public void onDynamicSensorDisconnected(Sensor sensor) { in onDynamicSensorDisconnected() argument
177 if (mSensor == sensor) { in onDynamicSensorDisconnected()
DOffBodySensorTestActivity.java109 public void onAccuracyChanged(Sensor sensor, int accuracy) {} in onAccuracyChanged() argument
114 int type = event.sensor.getType(); in onSensorChanged()
179 int eventType = registry.event.sensor.getType(); in verifyEvent()
189 String sensorName = registry.event.sensor.getName(); in verifyEvent()
387 public String runOffbodyDetectResponseTimeTest(Sensor sensor) throws Throwable { in runOffbodyDetectResponseTimeTest() argument
390 mOffBodySensor = sensor; in runOffbodyDetectResponseTimeTest()
449 public String runOnbodyDetectResponseTimeTest(Sensor sensor) throws Throwable { in runOnbodyDetectResponseTimeTest() argument
450 mOffBodySensor = sensor; in runOnbodyDetectResponseTimeTest()
495 public String runWakeAPOffbodyDetectTest(Sensor sensor) throws Throwable { in runWakeAPOffbodyDetectTest() argument
502 mOffBodySensor = sensor; in runWakeAPOffbodyDetectTest()
DSensorSynchronizationTestActivity.java75 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { in analyzeData()
83 } else if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) { in analyzeData()
92 if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) { in analyzeData()
166 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged() argument
/cts/tests/sensor/src/android/hardware/cts/helpers/
DTestSensorEnvironment.java171 Sensor sensor, in TestSensorEnvironment() argument
175 sensor, in TestSensorEnvironment()
194 Sensor sensor, in TestSensorEnvironment() argument
199 sensor, in TestSensorEnvironment()
208 Sensor sensor, in TestSensorEnvironment() argument
214 sensor, in TestSensorEnvironment()
224 Sensor sensor, in TestSensorEnvironment() argument
229 this(context, sensor, sensorMightHaveMoreListeners, in TestSensorEnvironment()
237 Sensor sensor, in TestSensorEnvironment() argument
244 mSensor = sensor; in TestSensorEnvironment()
[all …]
DTestSensorEvent.java30 public final Sensor sensor; field in TestSensorEvent
55 sensor = event.sensor; in TestSensorEvent()
65 public TestSensorEvent(Sensor sensor, long timestamp, int accuracy, float[] values) { in TestSensorEvent() argument
66 this(sensor, timestamp, timestamp, accuracy, values); in TestSensorEvent()
72 public TestSensorEvent(Sensor sensor, long timestamp, long receivedTimestamp, int accuracy, in TestSensorEvent() argument
74 this.sensor = sensor; in TestSensorEvent()
DSensorCtsHelper.java315 public static String getUnitsForSensor(Sensor sensor) { in getUnitsForSensor() argument
316 switch(sensor.getType()) { in getUnitsForSensor()
331 public static boolean hasResolutionRequirement(Sensor sensor, boolean hasHifiSensors) { in hasResolutionRequirement() argument
332 switch (sensor.getType()) { in hasResolutionRequirement()
348 public static float getRequiredResolutionForSensor(Sensor sensor) { in getRequiredResolutionForSensor() argument
349 switch (sensor.getType()) { in getRequiredResolutionForSensor()
360 return (float)(2.001f * sensor.getMaximumRange() / Math.pow(2, 12)); in getRequiredResolutionForSensor()
DSensorCalibratedUncalibratedVerifier.java120 calibratedEvent.sensor.getName(), in verifyCalibratedUncalibratedPair()
121 uncalibratedEvent.sensor.getName(), in verifyCalibratedUncalibratedPair()
/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/
DFrequencyVerification.java68 Sensor sensor = environment.getSensor(); in getDefault() local
69 if (sensor.getReportingMode() != Sensor.REPORTING_MODE_CONTINUOUS) { in getDefault()
75 sensor.getName(), in getDefault()
76 sensor.getMinDelay(), in getDefault()
77 sensor.getMaxDelay())); in getDefault()
79 double minDelayUs = sensor.getMinDelay(); in getDefault()
80 double maxDelayUs = sensor.getMaxDelay(); in getDefault()
86 Log.w(LOG_TAG, "This sensor (" + sensor.getName() + ") didn't report its maxDelay." in getDefault()
106 if (sensor.getMaxDelay() > 0) { in getDefault()
DEventBasicVerification.java64 Sensor sensor) { in EventBasicVerification() argument
66 mSensor = sensor; in EventBasicVerification()
204 if (event.sensor == mSensor) { in addSensorEventInternal()
/cts/apps/CtsVerifier/assets/scripts/
Dexecute_power_tests.py593 def setPowerOn(self, sensor, powered_on): argument
595 (("ON" if powered_on else "OFF"), sensor))
597 response == "ERR", "Unable to set sensor %s state" % sensor)
598 logging.info("Set %s %s", sensor, ("ON" if powered_on else "OFF"))
602 self, sensor, max_amperes_allowed, baseline_amps, user_request = None): argument
616 sensor, ("Under_Motion" if user_request is not None else "Still")))
620 print ("Running power test on %s under motion." % sensor)
622 print ("Running power test on %s while device is still." % sensor)
625 PowerTest.REQUEST_SENSOR_AVAILABILITY % sensor)
629 test_message = "Sensor %s not available on this platform" % sensor)
[all …]
/cts/tests/sensor/jni/
DSensorTestCases.cpp150 TestSensor sensor = mManager->getDefaultSensor(sensorType); in testDirectReport() local
151 if (!sensor.isValid() in testDirectReport()
152 || sensor.getHighestDirectReportRateLevel() < rateLevel in testDirectReport()
153 || !sensor.isDirectChannelTypeSupported(channelType)) { in testDirectReport()
186 eventToken = mManager->configureDirectReport(sensor, channel, rateLevel); in testDirectReport()
213 ASSERT_EQ(e.sensor, eventToken); in testDirectReport()
241 mManager->configureDirectReport(sensor, channel, ASENSOR_DIRECT_RATE_STOP); in testDirectReport()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/
DPowerTestHostLink.java212 final String sensor = request.substring(REQUEST_SENSOR_AVAILABILITY.length()); in processClientRequest() local
213 final int sensorId = getSensorId(sensor); in processClientRequest()
415 for (Sensor sensor : allSensors) { in switchAllSensors()
416 if (sensor.getType() >= Sensor.TYPE_DEVICE_PRIVATE_BASE) { in switchAllSensors()
419 response = switchSensor(sensor.getType(), on); in switchAllSensors()
438 public void onAccuracyChanged(Sensor sensor, int accuracy) {}
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-2025/
Dpoc.cpp64 sp<ISensorServer> sensor = interface_cast<ISensorServer>(binder); in bcfree_helper() local
66 sensor->createSensorEventConnection(packageName, 0 /*NORMAL*/, in bcfree_helper()
85 sp<ISensorServer> sensor = interface_cast<ISensorServer>(binder); in bcfree() local
87 sensor->createSensorEventConnection(packageName, 0 /*NORMAL*/, in bcfree()

12