Home
last modified time | relevance | path

Searched refs:environment (Results 1 – 25 of 35) sorted by relevance

12

/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/
DEventBasicVerification.java84 TestSensorEnvironment environment, in getDefault() argument
90 long sampleUs = environment.getExpectedSamplingPeriodUs(); in getDefault()
92 long askedBatchUs = environment.getMaxReportLatencyUs(); in getDefault()
94 long reservedFifoUs = sampleUs * environment.getSensor().getFifoReservedEventCount(); //>=0 in getDefault()
98 sampleUs * environment.getSensor().getFifoMaxEventCount(), reservedFifoUs); //>=0 in getDefault()
101 Math.max(ALLOWED_SENSOR_START_DELAY_US, environment.getAllowedSensorStartDelay()) - in getDefault()
104 boolean isSingleSensorTest = !environment.isIntegrationTest(); in getDefault()
160 return new EventBasicVerification(expectedMinNumEvent, environment.getSensor()); in getDefault()
164 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
DFifoLengthVerification.java62 TestSensorEnvironment environment) { in getDefault() argument
63 if (environment.getSensor().getReportingMode() != Sensor.REPORTING_MODE_CONTINUOUS) { in getDefault()
66 long expectedReportLatencyUs = environment.getMaxReportLatencyUs(); in getDefault()
67 long fifoReservedEventCount = environment.getSensor().getFifoReservedEventCount(); in getDefault()
68 int maximumExpectedSamplingPeriodUs = environment.getMaximumExpectedSamplingPeriodUs(); in getDefault()
74 if (environment.isDeviceSuspendTest() && !environment.getSensor().isWakeUpSensor()) { in getDefault()
93 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
DBatchArrivalVerification.java58 public static BatchArrivalVerification getDefault(TestSensorEnvironment environment) { in getDefault() argument
59 if (environment.getSensor().getReportingMode() != Sensor.REPORTING_MODE_CONTINUOUS) { in getDefault()
62 long fifoMaxEventCount = environment.getSensor().getFifoMaxEventCount(); in getDefault()
63 int maximumExpectedSamplingPeriodUs = environment.getMaximumExpectedSamplingPeriodUs(); in getDefault()
64 long reportLatencyUs = environment.getMaxReportLatencyUs(); in getDefault()
71 if (environment.isDeviceSuspendTest() && !environment.getSensor().isWakeUpSensor()) { in getDefault()
89 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
DFrequencyVerification.java67 public static FrequencyVerification getDefault(TestSensorEnvironment environment) { in getDefault() argument
68 Sensor sensor = environment.getSensor(); in getDefault()
89 if (environment.isSensorSamplingRateOverloaded()) { in getDefault()
94 double delayUs = environment.getRequestedSamplingPeriodUs(); in getDefault()
117 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
132 environment.getSensor().getName(), in verify()
133 environment.getFrequencyString(), in verify()
DEventTimestampSynchronizationVerification.java70 TestSensorEnvironment environment) { in getDefault() argument
71 long reportLatencyUs = environment.getMaxReportLatencyUs(); in getDefault()
72 long fifoMaxEventCount = environment.getSensor().getFifoMaxEventCount(); in getDefault()
73 int maximumExpectedSamplingPeriodUs = environment.getMaximumExpectedSamplingPeriodUs(); in getDefault()
79 if (environment.isDeviceSuspendTest() && !environment.getSensor().isWakeUpSensor()) { in getDefault()
99 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
DTimestampClockSourceVerification.java68 TestSensorEnvironment environment) { in getDefault() argument
69 long reportLatencyUs = environment.getMaxReportLatencyUs(); in getDefault()
70 long fifoMaxEventCount = environment.getSensor().getFifoMaxEventCount(); in getDefault()
71 int maximumExpectedSamplingPeriodUs = environment.getMaximumExpectedSamplingPeriodUs(); in getDefault()
77 if (environment.isDeviceSuspendTest() && !environment.getSensor().isWakeUpSensor()) { in getDefault()
96 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
DEventGapVerification.java57 public static EventGapVerification getDefault(TestSensorEnvironment environment) { in getDefault() argument
58 if (environment.getSensor().getReportingMode() != Sensor.REPORTING_MODE_CONTINUOUS) { in getDefault()
61 return new EventGapVerification(environment.getExpectedSamplingPeriodUs()); in getDefault()
68 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
69 if (environment.isSensorSamplingRateOverloaded()) { in verify()
DJitterVerification.java78 public static JitterVerification getDefault(TestSensorEnvironment environment) { in getDefault() argument
79 int sensorType = environment.getSensor().getType(); in getDefault()
85 boolean hasHifiSensors = environment.getContext().getPackageManager().hasSystemFeature( in getDefault()
91 long expectedPeriodNs = (long) environment.getExpectedSamplingPeriodUs() * 1000; in getDefault()
104 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
106 if (timestampsCount < 2 || environment.isSensorSamplingRateOverloaded()) { in verify()
DStandardDeviationVerification.java69 public static StandardDeviationVerification getDefault(TestSensorEnvironment environment) { in getDefault() argument
70 int sensorType = environment.getSensor().getType(); in getDefault()
73 float currOperatingFreq = (float) environment.getFrequencyHz(); in getDefault()
75 environment.getSensor().getMinDelay(), TimeUnit.MICROSECONDS); in getDefault()
77 environment.getSensor().getMaxDelay(), TimeUnit.MICROSECONDS); in getDefault()
102 boolean hasHifiSensors = environment.getContext().getPackageManager().hasSystemFeature( in getDefault()
126 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
DEventGapVerificationTest.java72 TestSensorEnvironment environment = new TestSensorEnvironment(null, null, false, 0, 0); in runVerification() local
74 verification.verify(environment, stats); in runVerification()
78 verification.verify(environment, stats); in runVerification()
DGyroscopeIntegrationVerification.java57 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
58 int sensorType = environment.getSensor().getType(); in verify()
66 int gyroscopeAxes = environment.getSensorAxesCount(); in verify()
DMagnitudeVerification.java68 public static MagnitudeVerification getDefault(TestSensorEnvironment environment) { in getDefault() argument
69 int sensorType = environment.getSensor().getType(); in getDefault()
85 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
DEventOrderingVerification.java50 public static EventOrderingVerification getDefault(TestSensorEnvironment environment) { in getDefault() argument
51 int reportingMode = environment.getSensor().getReportingMode(); in getDefault()
65 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
DJitterVerificationTest.java38 TestSensorEnvironment environment = new TestSensorEnvironment( in testVerify() local
52 verification.verify(environment, stats); in testVerify()
64 verification.verify(environment, stats); in testVerify()
DMeanVerification.java62 public static MeanVerification getDefault(TestSensorEnvironment environment) { in getDefault() argument
63 int sensorType = environment.getSensor().getType(); in getDefault()
79 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/
DTestSensorOperation.java84 public TestSensorOperation(TestSensorEnvironment environment, Executor executor) { in TestSensorOperation() argument
85 this(environment, executor, null /* handler */); in TestSensorOperation()
92 TestSensorEnvironment environment, in TestSensorOperation() argument
95 mEnvironment = environment; in TestSensorOperation()
233 TestSensorEnvironment environment, in createOperation() argument
247 return new TestSensorOperation(environment, executor); in createOperation()
260 final TestSensorEnvironment environment, in createOperation() argument
275 environment.toString(), in createOperation()
314 environment.toString()); in createOperation()
323 environment.toString(), in createOperation()
[all …]
/cts/tests/tests/hardware/src/android/hardware/cts/
DSensorBatchingFifoTest.java90 TestSensorEnvironment environment = new TestSensorEnvironment(getContext(), in runBatchingSensorFifoTest() local
97 int postFlushMs = environment.getExpectedSamplingPeriodUs() * 100 /1000; in runBatchingSensorFifoTest()
99 environment.getSensor().getFifoReservedEventCount() * in runBatchingSensorFifoTest()
100 environment.getExpectedSamplingPeriodUs() / (int)(1000 / 1.2); // 120% in runBatchingSensorFifoTest()
103 environment, new int [] { preFlushMs, testFlushMs, postFlushMs }, -1); in runBatchingSensorFifoTest()
105 op.addVerification(FifoLengthVerification.getDefault(environment)); in runBatchingSensorFifoTest()
DSensorBatchingTests.java259 TestSensorEnvironment environment = new TestSensorEnvironment( in runBatchingSensorTest() local
266 TestSensorOperation.createOperation(environment, testDurationSec, TimeUnit.SECONDS); in runBatchingSensorTest()
270 environment, TimeUnit.SECONDS.toMicros(testDurationSec) in runBatchingSensorTest()
274 executeTest(environment, operation, false /* flushExpected */); in runBatchingSensorTest()
282 TestSensorEnvironment environment = new TestSensorEnvironment( in runFlushSensorTest() local
289 .createFlushOperation(environment, flushDurationSec, TimeUnit.SECONDS); in runFlushSensorTest()
291 executeTest(environment, operation, true /* flushExpected */); in runFlushSensorTest()
295 TestSensorEnvironment environment, in executeTest() argument
308 if (environment.getRequestedSamplingPeriodUs() == SensorManager.SENSOR_DELAY_FASTEST) { in executeTest()
311 sensorRate = String.format("%.0fhz", environment.getFrequencyHz()); in executeTest()
[all …]
DSensorTest.java345 TestSensorEnvironment environment = new TestSensorEnvironment( in testBatchAndFlushWithHandler() local
350 mTestSensorManager = new TestSensorManager(environment); in testBatchAndFlushWithHandler()
355 TestSensorEventListener listener = new TestSensorEventListener(environment, handler); in testBatchAndFlushWithHandler()
381 TestSensorEnvironment environment = new TestSensorEnvironment( in testBatchAndFlushUseDefaultHandler() local
386 mTestSensorManager = new TestSensorManager(environment); in testBatchAndFlushUseDefaultHandler()
388 TestSensorEventListener listener = new TestSensorEventListener(environment, null); in testBatchAndFlushUseDefaultHandler()
419 TestSensorEnvironment environment = new TestSensorEnvironment( in testBatchAndFlushWithMultipleSensors() local
425 FlushExecutor executor = new FlushExecutor(environment, 500 /* eventCount */); in testBatchAndFlushWithMultipleSensors()
426 parallelSensorOperation.add(new TestSensorOperation(environment, executor)); in testBatchAndFlushWithMultipleSensors()
489 TestSensorEnvironment environment = new TestSensorEnvironment( in verifyLongActivation() local
[all …]
DSensorIntegrationTests.java78 TestSensorEnvironment environment = new TestSensorEnvironment( in testSensorsWithSeveralClients() local
84 TestSensorOperation.createOperation(environment, 100 /* eventCount */); in testSensorsWithSeveralClients()
143 TestSensorEnvironment environment = new TestSensorEnvironment( in testSensorsMovingRates() local
151 TestSensorOperation.createOperation(environment, 100 /* eventCount */); in testSensorsMovingRates()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DMagneticFieldMeasurementTestActivity.java76 TestSensorEnvironment environment = new TestSensorEnvironment( in testNorm() local
81 TestSensorOperation.createOperation(environment, 100 /* event count */); in testNorm()
121 TestSensorEnvironment environment = new TestSensorEnvironment( in testStandardDeviation() local
126 TestSensorOperation.createOperation(environment, 100 /* event count */); in testStandardDeviation()
168 TestSensorEnvironment environment = new TestSensorEnvironment( in calibrateMagnetometer() local
173 TestSensorEventListener listener = new TestSensorEventListener(environment) { in calibrateMagnetometer()
193 TestSensorManager magnetometer = new TestSensorManager(environment); in calibrateMagnetometer()
DBatchingTestActivity.java121 TestSensorEnvironment environment = new TestSensorEnvironment( in runBatchTest() local
129 TestSensorOperation.createOperation(environment, testDurationSec,TimeUnit.SECONDS); in runBatchTest()
139 TestSensorEnvironment environment = new TestSensorEnvironment( in runFlushTest() local
147 .createFlushOperation(environment, flushDurationSec, TimeUnit.SECONDS); in runFlushTest()
DDeviceSuspendTestActivity.java278 TestSensorEnvironment environment = new TestSensorEnvironment( in runAPWakeUpWhenReportLatencyExpires() local
286 TestSensorOperation op = TestSensorOperation.createOperation(environment, in runAPWakeUpWhenReportLatencyExpires()
293 op.addVerification(BatchArrivalVerification.getDefault(environment)); in runAPWakeUpWhenReportLatencyExpires()
329 TestSensorEnvironment environment = new TestSensorEnvironment( in runAPWakeUpWhenFIFOFull() local
337 TestSensorOperation op = TestSensorOperation.createOperation(environment, in runAPWakeUpWhenFIFOFull()
393 TestSensorEnvironment environment = new TestSensorEnvironment( in runVerifySensorTimestampClockbase() local
400 …TestSensorOperation op = TestSensorOperation.createOperation(environment, MIN_TIMESTAMP_BASE_SAMPL… in runVerifySensorTimestampClockbase()
401 op.addVerification(TimestampClockSourceVerification.getDefault(environment)); in runVerifySensorTimestampClockbase()
423 TestSensorEnvironment environment = new TestSensorEnvironment( in runAPWakeUpByAlarmNonWakeSensor() local
432 TestSensorOperation op = TestSensorOperation.createOperation(environment, in runAPWakeUpByAlarmNonWakeSensor()
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/
DSensorCtsHelper.java171 public static String formatAssertionMessage(String label, TestSensorEnvironment environment) { in formatAssertionMessage() argument
172 return formatAssertionMessage(label, environment, "Failed"); in formatAssertionMessage()
187 TestSensorEnvironment environment, in formatAssertionMessage() argument
190 return formatAssertionMessage(label, environment, String.format(format, params)); in formatAssertionMessage()
204 TestSensorEnvironment environment, in formatAssertionMessage() argument
209 environment.getSensor().getName(), in formatAssertionMessage()
210 environment.getRequestedSamplingPeriodUs(), in formatAssertionMessage()
211 environment.getMaxReportLatencyUs(), in formatAssertionMessage()
DTestSensorManager.java60 public TestSensorManager(TestSensorEnvironment environment) { in TestSensorManager() argument
62 (SensorManager) environment.getContext().getSystemService(Context.SENSOR_SERVICE); in TestSensorManager()
63 mEnvironment = environment; in TestSensorManager()

12