Home
last modified time | relevance | path

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

12

/cts/tests/tests/hardware/src/android/hardware/cts/
DSensorTest.java115 Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in testSensorOperations() local
120 assertEquals(Sensor.TYPE_ACCELEROMETER, sensor.getType()); in testSensorOperations()
121 assertSensorValues(sensor); in testSensorOperations()
123 assertNull(sensor); in testSensorOperations()
126 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); in testSensorOperations()
131 assertEquals(Sensor.TYPE_STEP_COUNTER, sensor.getType()); in testSensorOperations()
132 assertSensorValues(sensor); in testSensorOperations()
134 assertNull(sensor); in testSensorOperations()
137 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR); in testSensorOperations()
142 assertEquals(Sensor.TYPE_STEP_DETECTOR, sensor.getType()); in testSensorOperations()
[all …]
DSensorBatchingFifoTest.java87 Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); in testProximityFifoLength()
88 if (sensor != null) { in testProximityFifoLength()
89 assertTrue(sensor.getFifoReservedEventCount() <= PROXIMITY_SENSOR_MIN_FIFO_LENGTH); in testProximityFifoLength()
99 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkMinFifoLength() local
100 assertTrue(String.format("sensor of type=%d (null)", sensorType), sensor != null); in checkMinFifoLength()
101 int maxFifoLength = sensor.getFifoReservedEventCount(); in checkMinFifoLength()
103 sensor.getName(), minRequiredLength, maxFifoLength), in checkMinFifoLength()
112 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in runBatchingSensorFifoTest() local
114 sensor, in runBatchingSensorFifoTest()
116 sensor.getMinDelay(), in runBatchingSensorFifoTest()
[all …]
DSensorParameterRangeTest.java97 Sensor sensor, double maxRange, double minFrequency, double maxFrequency) { in checkSensorRangeAndFrequency() argument
100 sensor.getName(), sensor.getMaximumRange(), maxRange, in checkSensorRangeAndFrequency()
101 SensorCtsHelper.getUnitsForSensor(sensor)), in checkSensorRangeAndFrequency()
102 sensor.getMaximumRange() >= maxRange); in checkSensorRangeAndFrequency()
103 double actualMinFrequency = SensorCtsHelper.getFrequency(sensor.getMaxDelay(), in checkSensorRangeAndFrequency()
106 sensor.getName(), actualMinFrequency, minFrequency), actualMinFrequency <= in checkSensorRangeAndFrequency()
109 double actualMaxFrequency = SensorCtsHelper.getFrequency(sensor.getMinDelay(), in checkSensorRangeAndFrequency()
112 sensor.getName(), actualMaxFrequency, maxFrequency), actualMaxFrequency >= in checkSensorRangeAndFrequency()
DSensorIntegrationTests.java88 Sensor sensor = TestSensorEnvironment.getSensor(context, sensorType); in testSensorsWithSeveralClients() local
93 sensor.getMinDelay(), in testSensorsWithSeveralClients()
268 Sensor sensor = TestSensorEnvironment.getSensor(getContext(), sensorType); in generateSamplingRateInUs() local
269 int maxSamplingRate = sensor.getMinDelay(); in generateSamplingRateInUs()
DSingleSensorTests.java124 Sensor sensor = sensorManager.getDefaultSensor(entry.getKey()); in testSensorProperties() local
125 if (sensor != null) { in testSensorProperties()
130 sensor.getName(), in testSensorProperties()
131 sensor.getMinDelay(), in testSensorProperties()
133 assertTrue(msg, sensor.getMinDelay() <= expected); in testSensorProperties()
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/
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()
DTestSensorEnvironment.java140 Sensor sensor, in TestSensorEnvironment() argument
144 sensor, in TestSensorEnvironment()
163 Sensor sensor, in TestSensorEnvironment() argument
168 sensor, in TestSensorEnvironment()
177 Sensor sensor, in TestSensorEnvironment() argument
183 mSensor = sensor; in TestSensorEnvironment()
312 Sensor sensor = sensorManager.getDefaultSensor(sensorType); in getSensor() local
313 if(sensor == null) { in getSensor()
316 return sensor; in getSensor()
337 public static long getSensorMaxDetectionLatencyNs(Sensor sensor) { in getSensorMaxDetectionLatencyNs() argument
[all …]
DSensorCalibratedUncalibratedVerifier.java120 calibratedEvent.sensor.getName(), in verifyCalibratedUncalibratedPair()
121 uncalibratedEvent.sensor.getName(), in verifyCalibratedUncalibratedPair()
DSensorStats.java156 public static String getSanitizedSensorName(Sensor sensor) throws SensorTestPlatformException { in getSanitizedSensorName() argument
157 return SensorCtsHelper.sanitizeStringForFileName(sensor.getStringType()); in getSanitizedSensorName()
DSensorCtsHelper.java264 public static String getUnitsForSensor(Sensor sensor) { in getUnitsForSensor() argument
265 switch(sensor.getType()) { in getUnitsForSensor()
DMovementDetectorHelper.java80 public void onAccuracyChanged(Sensor sensor, int accuracy) {} in onAccuracyChanged() argument
DTestSensorEventListener.java117 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged() argument
150 public void onFlushCompleted(Sensor sensor) { in onFlushCompleted() argument
/cts/tests/tests/hardware/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()
78 double maxDelayUs = sensor.getMaxDelay(); in getDefault()
83 Log.w(LOG_TAG, "This sensor (" + sensor.getName() + ") didn't report its maxDelay." in getDefault()
86 maxDelayUs = sensor.getMinDelay(); in getDefault()
90 maxDelayUs = sensor.getMinDelay(); in getDefault()
101 Math.max(delayUs, sensor.getMinDelay()), TimeUnit.MICROSECONDS); in getDefault()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
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
DDeviceSuspendTestActivity.java188 public String runAPWakeUpWhenReportLatencyExpires(Sensor sensor) throws Throwable { in runAPWakeUpWhenReportLatencyExpires() argument
189 int fifoMaxEventCount = sensor.getFifoMaxEventCount(); in runAPWakeUpWhenReportLatencyExpires()
193 int maximumExpectedSamplingPeriodUs = sensor.getMaxDelay(); in runAPWakeUpWhenReportLatencyExpires()
209 sensor, in runAPWakeUpWhenReportLatencyExpires()
225 Log.i(TAG, "Running .. " + getCurrentTestNode().getName() + " " + sensor.getName()); in runAPWakeUpWhenReportLatencyExpires()
233 public String runAPWakeUpWhenFIFOFull(Sensor sensor) throws Throwable { in runAPWakeUpWhenFIFOFull() argument
234 int fifoMaxEventCount = sensor.getFifoMaxEventCount(); in runAPWakeUpWhenFIFOFull()
240 int maximumExpectedSamplingPeriodUs = sensor.getMinDelay(); in runAPWakeUpWhenFIFOFull()
256 sensor, in runAPWakeUpWhenFIFOFull()
270 Log.i(TAG, "Running .. " + getCurrentTestNode().getName() + " " + sensor.getName()); in runAPWakeUpWhenFIFOFull()
[all …]
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()
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
DRVCVRecordActivity.java706 public void onAccuracyChanged(Sensor sensor, int i) { in onAccuracyChanged() argument
713 switch(event.sensor.getType()) { in onSensorChanged()
728 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { in onSensorChanged()
866 public void onAccuracyChanged(Sensor sensor, int i) { in onAccuracyChanged() argument
872 if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { in onSensorChanged()
DHeartRateMonitorTestActivity.java111 public void onAccuracyChanged(Sensor sensor, int i) { in onAccuracyChanged() argument
/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/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 response = switchSensor(sensor.getType(), on); in switchAllSensors()
435 public void onAccuracyChanged(Sensor sensor, int accuracy) {}
/cts/apps/CtsVerifier/
Dproguard.flags9 # ensure we keep public sensor test methods, these are needed at runtime
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/renderers/
DGLArrowSensorTestRenderer.java166 int type = event.sensor.getType(); in onSensorChanged()
167 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { in onSensorChanged()
/cts/tests/tests/app/src/android/app/cts/
DSystemFeaturesTest.java406 for (Sensor sensor : sensors) { in assertFeatureForSensor()
407 sensorNames.add(sensor.getName()); in assertFeatureForSensor()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/
DItsService.java170 public Sensor sensor; field in ItsService.MySensorEvent
625 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { in sendResponse()
627 } else if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) { in sendResponse()
629 } else if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) { in sendResponse()
1382 ev2.sensor = event.sensor;
1393 public final void onAccuracyChanged(Sensor sensor, int accuracy) {

12