/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensorverification/ |
D | EventOrderingVerificationTest.java | 37 SensorStats stats = new SensorStats(); in testNoEvents() local 39 verification.verify(stats); in testNoEvents() 40 verifyStats(stats, true, 0); in testNoEvents() 47 SensorStats stats = new SensorStats(); in testSequentialTimestamp() local 49 verification.verify(stats); in testSequentialTimestamp() 50 verifyStats(stats, true, 0); in testSequentialTimestamp() 57 SensorStats stats = new SensorStats(); in testSingleOutofOrder() local 60 verification.verify(stats); in testSingleOutofOrder() 65 verifyStats(stats, false, 1); in testSingleOutofOrder() 66 List<Integer> indices = getIndices(stats); in testSingleOutofOrder() [all …]
|
D | FrequencyVerificationTest.java | 39 SensorStats stats = new SensorStats(); in testVerifification() local 41 verification.verify(getEnvironment(1000), stats); in testVerifification() 42 verifyStats(stats, true, 1000.0); in testVerifification() 44 stats = new SensorStats(); in testVerifification() 46 verification.verify(getEnvironment(950), stats); in testVerifification() 47 verifyStats(stats, true, 1000.0); in testVerifification() 49 stats = new SensorStats(); in testVerifification() 51 verification.verify(getEnvironment(1050), stats); in testVerifification() 52 verifyStats(stats, true, 1000.0); in testVerifification() 54 stats = new SensorStats(); in testVerifification() [all …]
|
D | MeanVerificationTest.java | 47 SensorStats stats = new SensorStats(); in testVerify() local 49 verification.verify(stats); in testVerify() 50 verifyStats(stats, true, new float[]{2.0f, 3.0f, 6.0f}); in testVerify() 54 stats = new SensorStats(); in testVerify() 56 verification.verify(stats); in testVerify() 57 verifyStats(stats, true, new float[]{2.0f, 3.0f, 6.0f}); in testVerify() 61 stats = new SensorStats(); in testVerify() 64 verification.verify(stats); in testVerify() 69 verifyStats(stats, false, new float[]{2.0f, 3.0f, 6.0f}); in testVerify() 73 stats = new SensorStats(); in testVerify() [all …]
|
D | EventBasicVerificationTest.java | 49 SensorStats stats; in testVerify() local 55 stats = new SensorStats(); in testVerify() 57 verification.verify(stats); in testVerify() 58 assertEquals(true, stats.getValue(EventBasicVerification.PASSED_KEY)); in testVerify() 59 assertEquals(20, (long) stats.getValue(SensorStats.EVENT_COUNT_KEY)); in testVerify() 60 assertEquals(false, stats.getValue(SensorStats.WRONG_SENSOR_KEY)); in testVerify() 64 stats = new SensorStats(); in testVerify() 67 verification.verify(stats); in testVerify() 72 assertEquals(false, stats.getValue(EventBasicVerification.PASSED_KEY)); in testVerify() 73 assertEquals(5, (long) stats.getValue(SensorStats.EVENT_COUNT_KEY)); in testVerify() [all …]
|
D | EventGapVerificationTest.java | 70 SensorStats stats = new SensorStats(); in runVerification() local 74 verification.verify(environment, stats); in runVerification() 78 verification.verify(environment, stats); in runVerification() 85 assertEquals(pass, stats.getValue(EventGapVerification.PASSED_KEY)); in runVerification() 86 assertEquals(indices.length, stats.getValue(SensorStats.EVENT_GAP_COUNT_KEY)); in runVerification() 87 assertNotNull(stats.getValue(SensorStats.EVENT_GAP_POSITIONS_KEY)); in runVerification() 88 int[] actualIndices = (int[]) stats.getValue(SensorStats.EVENT_GAP_POSITIONS_KEY); in runVerification()
|
D | JitterVerificationTest.java | 50 SensorStats stats = new SensorStats(); in testVerify() local 52 verification.verify(environment, stats); in testVerify() 53 verifyStats(stats, true, 0.0); in testVerify() 61 stats = new SensorStats(); in testVerify() 64 verification.verify(environment, stats); in testVerify() 69 verifyStats(stats, false, 25); // 500 us range (250 us in single-sided sense) in testVerify() 116 private void verifyStats(SensorStats stats, boolean passed, double percentageJitter) { in verifyStats() argument 117 assertEquals(passed, stats.getValue(JitterVerification.PASSED_KEY)); in verifyStats() 120 (Double) stats.getValue(SensorStats.JITTER_95_PERCENTILE_PERCENT_KEY), in verifyStats()
|
D | MagnitudeVerificationTest.java | 53 SensorStats stats = new SensorStats(); in runStats() local 56 verification.verify(stats); in runStats() 59 verification.verify(stats); in runStats() 65 assertEquals(pass, stats.getValue(MagnitudeVerification.PASSED_KEY)); in runStats() 66 assertEquals(magnitude, (Float) stats.getValue(SensorStats.MAGNITUDE_KEY), 0.01); in runStats()
|
D | TimestampClockSourceVerificationTest.java | 166 SensorStats stats = new SensorStats(); in runVerification() local 170 verification.verify(environment, stats); in runVerification() 174 verification.verify(environment, stats); in runVerification() 182 assertEquals(pass, stats.getValue(TimestampClockSourceVerification.PASSED_KEY)); in runVerification() 183 … assertEquals(indices.length, stats.getValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_COUNT_KEY)); in runVerification() 184 if (0 != (Integer) stats.getValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_COUNT_KEY)) { in runVerification() 185 assertNotNull(stats.getValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_POSITIONS_KEY)); in runVerification() 188 …int[] actualIndices = (int[]) stats.getValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_POSITIONS_KE… in runVerification()
|
D | EventBasicVerification.java | 164 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 165 verify(stats); in verify() 169 void verify(SensorStats stats) { in verify() argument 171 stats.addValue(SensorStats.EVENT_COUNT_KEY, mNumEvent); in verify() 172 stats.addValue(SensorStats.EVENT_COUNT_EXPECTED_KEY, mExpectedMinNumEvent); in verify() 173 stats.addValue(SensorStats.WRONG_SENSOR_KEY, mWrongSensorObserved); in verify() 179 stats.addValue(PASSED_KEY, success); in verify()
|
D | MagnitudeVerification.java | 85 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 86 verify(stats); in verify() 92 void verify(SensorStats stats) { in verify() argument 94 stats.addValue(PASSED_KEY, true); in verify() 101 stats.addValue(PASSED_KEY, !failed); in verify() 102 stats.addValue(SensorStats.MAGNITUDE_KEY, mean); in verify()
|
D | EventOrderingVerification.java | 65 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 66 verify(stats); in verify() 72 void verify(SensorStats stats) { in verify() argument 74 stats.addValue(PASSED_KEY, count == 0); in verify() 75 stats.addValue(SensorStats.EVENT_OUT_OF_ORDER_COUNT_KEY, count); in verify() 76 stats.addValue( in verify()
|
D | StandardDeviationVerificationTest.java | 64 SensorStats stats = new SensorStats(); in runVerification() local 67 verification.verify(stats); in runVerification() 71 verification.verify(stats); in runVerification() 78 assertEquals(pass, stats.getValue(StandardDeviationVerification.PASSED_KEY)); in runVerification() 79 float[] actual = (float[]) stats.getValue(SensorStats.STANDARD_DEVIATION_KEY); in runVerification()
|
D | MeanVerification.java | 79 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 80 verify(stats); in verify() 86 void verify(SensorStats stats) { in verify() argument 88 stats.addValue(PASSED_KEY, true); in verify() 116 stats.addValue(PASSED_KEY, !failed); in verify() 117 stats.addValue(SensorStats.MEAN_KEY, means); in verify()
|
D | EventGapVerification.java | 68 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 71 stats.addValue(PASSED_KEY, "skipped (under load)"); in verify() 81 stats.addValue(PASSED_KEY, pass); in verify() 82 stats.addValue(SensorStats.EVENT_GAP_COUNT_KEY, count); in verify() 83 stats.addValue(SensorStats.EVENT_GAP_POSITIONS_KEY, getIndexArray(mEventGaps)); in verify()
|
D | TimestampClockSourceVerification.java | 96 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 106 stats.addValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_COUNT_KEY, failuresCount); in verify() 107 stats.addValue( in verify() 113 stats.addValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_COUNT_KEY, 0); in verify() 115 stats.addValue(PASSED_KEY, success); in verify()
|
D | FifoLengthVerification.java | 93 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 96 stats.addValue(PASSED_KEY, "skipped (no fifo length requirements)"); in verify() 122 stats.addValue(PASSED_KEY, success); in verify() 123 stats.addValue(SensorStats.EVENT_FIFO_LENGTH, batchCount); in verify()
|
D | FrequencyVerification.java | 117 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 119 stats.addValue(PASSED_KEY, true); in verify() 128 stats.addValue(SensorStats.FREQUENCY_KEY, measuredFrequencyHz); in verify() 129 stats.addValue(PASSED_KEY, !failed); in verify()
|
D | EventTimestampSynchronizationVerification.java | 99 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 104 stats.addValue(SensorStats.EVENT_TIME_SYNCHRONIZATION_COUNT_KEY, failuresCount); in verify() 105 stats.addValue( in verify() 110 stats.addValue(PASSED_KEY, success); in verify()
|
D | GyroscopeIntegrationVerification.java | 57 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 62 stats.addValue(PASSED_KEY, true); in verify() 84 stats.addValue(PASSED_KEY, success); in verify()
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PackageStatsTest.java | 34 PackageStats stats = new PackageStats(PACKAGE_NAME); in testPackageStats() local 35 assertEquals(PACKAGE_NAME, stats.packageName); in testPackageStats() 36 stats.cacheSize = codeSize; in testPackageStats() 37 stats.codeSize = cacheSize; in testPackageStats() 38 stats.dataSize = dataSize; in testPackageStats() 39 PackageStats infoFromExisted = new PackageStats(stats); in testPackageStats() 40 checkInfoSame(stats, infoFromExisted); in testPackageStats() 43 assertNotNull(stats.toString()); in testPackageStats() 44 assertEquals(0, stats.describeContents()); in testPackageStats() 48 stats.writeToParcel(p, 0); in testPackageStats() [all …]
|
/cts/tests/tests/uiautomation/src/android/app/uiautomation/cts/ |
D | UiAutomationTest.java | 94 WindowContentFrameStats stats = uiAutomation.getWindowContentFrameStats(windowId); in testWindowContentFrameStats() local 99 assertNotNull(stats); in testWindowContentFrameStats() 102 assertTrue(stats.getRefreshPeriodNano() > 0); in testWindowContentFrameStats() 105 final int frameCount = stats.getFrameCount(); in testWindowContentFrameStats() 109 assertWindowContentTimestampsInAscendingOrder(stats); in testWindowContentFrameStats() 112 assertEquals(stats.getStartTimeNano(), stats.getFramePresentedTimeNano(0)); in testWindowContentFrameStats() 113 assertEquals(stats.getEndTimeNano(), stats.getFramePresentedTimeNano(frameCount - 1)); in testWindowContentFrameStats() 148 WindowContentFrameStats stats = uiAutomation.getWindowContentFrameStats(windowId); in testWindowContentFrameStatsNoAnimation() local 153 assertNotNull(stats); in testWindowContentFrameStatsNoAnimation() 156 assertTrue(stats.getRefreshPeriodNano() > 0); in testWindowContentFrameStatsNoAnimation() [all …]
|
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/ |
D | SensorStatsTest.java | 32 SensorStats stats = new SensorStats(); in testFlatten() local 33 stats.addValue("value0", 0); in testFlatten() 34 stats.addValue("value1", 1); in testFlatten() 45 stats.addSensorStats("stats0", subStats); in testFlatten() 48 stats.addSensorStats("stats2", new SensorStats()); in testFlatten() 51 stats.addSensorStats("stats3", null); in testFlatten() 52 stats.addValue("value6", null); in testFlatten() 54 Map<String, Object> flattened = stats.flatten(); in testFlatten()
|
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/ |
D | SensorOperation.java | 46 protected SensorOperation(SensorStats stats) { in SensorOperation() argument 47 mStats = stats; in SensorOperation() 78 protected void addSensorStats(String key, SensorStats stats) { in addSensorStats() argument 79 getStats().addSensorStats(key, stats); in addSensorStats() 88 protected void addSensorStats(String key, int index, SensorStats stats) { in addSensorStats() argument 89 addSensorStats(String.format("%s_%03d", key, index), stats); in addSensorStats()
|
/cts/tests/tests/media/libmediandkjni/ |
D | codec-utils-jni.cpp | 438 bool Raw2YUVStats(jlong rawStats[10], jfloat stats[9]) { in Raw2YUVStats() 450 stats[0] = sum_x[0] / (float)num; // y average in Raw2YUVStats() 451 stats[1] = sum_x[1] / (float)num; // u average in Raw2YUVStats() 452 stats[2] = sum_x[2] / (float)num; // v average in Raw2YUVStats() 456 stats[3] = sqrtf((sum_xx[0] + 1) * num - sum_x[0] * sum_x[0]) / num; // y stdev in Raw2YUVStats() 457 stats[4] = sqrtf((sum_xx[1] + 1) * num - sum_x[1] * sum_x[1]) / num; // u stdev in Raw2YUVStats() 458 stats[5] = sqrtf((sum_xx[2] + 1) * num - sum_x[2] * sum_x[2]) / num; // v stdev in Raw2YUVStats() 461 stats[6] = (float)(sum_xy[0] + 1 - sum_x[0] * sum_x[1] / num) / num / stats[3] / stats[4]; in Raw2YUVStats() 463 stats[7] = (float)(sum_xy[1] + 1 - sum_x[0] * sum_x[2] / num) / num / stats[3] / stats[5]; in Raw2YUVStats() 465 stats[8] = (float)(sum_xy[2] + 1 - sum_x[1] * sum_x[2] / num) / num / stats[4] / stats[5]; in Raw2YUVStats() [all …]
|
/cts/tests/tests/app.usage/src/android/app/usage/cts/ |
D | UsageStatsTest.java | 291 for (UsageStats stats : statsList) { in testPackageUsageStatsIntervals() 293 … assertLessThanOrEqual(stats.getLastTimeStamp() - stats.getFirstTimeStamp(), intervalDuration); in testPackageUsageStatsIntervals() 294 if (stats.getPackageName().equals(mTargetPackage) && in testPackageUsageStatsIntervals() 295 stats.getLastTimeUsed() >= beforeTime - TIME_DIFF_THRESHOLD) { in testPackageUsageStatsIntervals() 311 List<UsageStats> stats = mUsageStatsManager.queryUsageStats(UsageStatsManager.INTERVAL_BEST, in testNoAccessSilentlyFails() local 313 assertFalse(stats.isEmpty()); in testNoAccessSilentlyFails() 317 stats = mUsageStatsManager.queryUsageStats(UsageStatsManager.INTERVAL_BEST, in testNoAccessSilentlyFails() 319 assertTrue(stats.isEmpty()); in testNoAccessSilentlyFails()
|