Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 140) sorted by relevance

123456

/platform_testing/libraries/compatibility-common-util/src/com/android/compatibility/common/util/
DStat.java64 for (int i = 1; i < data.length; i++) { in getStat()
73 average /= data.length; in getStat()
75 for (int i = 0; i < data.length; i++) { in getStat()
79 double variance = sumOfSquares / (data.length - 1); in getStat()
82 return new StatResult(average, min, max, stddev, median, data.length); in getStat()
95 double[] validData = new double[data.length]; in getStatWithOutlierRejection()
97 for (int i = 0; i < data.length; i++) { in getStatWithOutlierRejection()
109 double[] dataCopied = Arrays.copyOf(data, data.length); in getMedian()
111 int medianIndex = dataCopied.length / 2; in getMedian()
113 if (dataCopied.length % 2 == 1) { in getMedian()
[all …]
DInfoStore.java137 if (values.length > MAX_ARRAY_LENGTH) { in checkArray()
145 if (values.length > MAX_ARRAY_LENGTH) { in checkArray()
153 if (values.length > MAX_ARRAY_LENGTH) { in checkArray()
161 if (values.length > MAX_ARRAY_LENGTH) { in checkArray()
169 if (values.length > MAX_ARRAY_LENGTH) { in checkArray()
187 if (value.length() > MAX_STRING_LENGTH) { in checkString()
DStreamUtil.java59 int length; in readInputStream() local
60 while ((length = inputStream.read(buffer)) != -1) { in readInputStream()
61 result.write(buffer, 0, length); in readInputStream()
DStacktrace.java49 for (int i = 0; i < elements.length; i++) { in getTestCallerClassMethodName()
61 depth = Math.min(depth, elements.length - 1); in buildClassMethodName()
DBusinessLogicFactory.java130 for (int i = 0; i < jsonRulesLists.length(); i++) { in createBL()
151 for (int i = 0; i < redactionRegexesJSONArray.length(); i++) { in parseRedactionRegexes()
175 for (int j = 0; j < rulesJSONArray.length(); j++) { in extractRulesList()
199 for (int i = 0; i < ruleConditionsJSONArray.length(); i++) { in extractRuleConditionList()
216 for (int j = 0; j < methodArgsJSONArray.length(); j++) { in extractRuleConditionList()
230 for (int i = 0; i < ruleActionsJSONArray.length(); i++) { in extractRuleActionList()
242 for (int j = 0; j < methodArgsJSONArray.length(); j++) { in extractRuleActionList()
263 StringBuilder sb = new StringBuilder((int) f.length()); in readFile()
DLogcatInspector.java59 if (nextStringIndex < logcatStrings.length) { in assertLogcatContainsInOrder()
86 if (stringsFound == logcatStrings.length) { in assertLogcatDoesNotContainInOrder()
123 if (stringIndex >= logcatStrings.length) { in numberOfLogcatStringsFound()
/platform_testing/libraries/collectors-helper/lyric/src/com/android/helpers/
DLyricMemProfilerHelper.java127 for (int i = 0; i < mMaxCameraMemInfoList.length; i++) { in setMaxResult()
149 && 0 < mCameraProcNameList.length in startCollecting()
151 && mCameraProcNameList.length == mMetricNameList.length) { in startCollecting()
152 mCameraPidList = new String[mCameraProcNameList.length]; in startCollecting()
153 mCameraDmabufPatternList = new Pattern[mCameraProcNameList.length]; in startCollecting()
154 for (int i = 0; i < mCameraProcNameList.length; i++) { in startCollecting()
170 mMaxCameraMemInfoList = new MemInfo[mCameraProcNameList.length]; in startCollecting()
171 for (int i = 0; i < mMaxCameraMemInfoList.length; i++) in startCollecting()
173 mMaxCameraDmabufList = new int[mCameraProcNameList.length]; in startCollecting()
187 new MyTimerTask(mCameraProcNameList.length) { in startCollecting()
[all …]
/platform_testing/libraries/compatibility-common-util/tests/src/com/android/compatibility/common/util/
DMetricsXmlSerializerTest.java60 assertEquals(HEADER.length(), mByteArrayOutputStream.toByteArray().length); in testSerialize_null()
68 assertEquals(HEADER.length(), mByteArrayOutputStream.toByteArray().length); in testSerialize_noData()
/platform_testing/libraries/screenshot/src/main/java/platform/test/screenshot/
DFontsUtils.kt89 if (fromValue.length != toValue.length) { return } in stringReplaceOnce()
91 if (i + fromValue.length > contents.size) { return } in stringReplaceOnce()
93 for (j in 0..<fromValue.length) { in stringReplaceOnce()
100 for (j in 0..<toValue.length) { in stringReplaceOnce()
/platform_testing/libraries/flicker/utils/src/android/tools/traces/component/
DComponentName.kt38 val sb = StringBuilder(packageName.length + className.length) in toActivityName()
97 val packageNameLength = packageName.length in appendShortClassName()
98 val classNameLength = className.length in appendShortClassName()
DComponentNameMatcher.kt162 if (sep < 0 || sep + 1 >= str.length) { in unflattenFromString()
184 if (sep < 0 || sep + 1 >= str.length) { in unflattenFromStringWithJunk()
198 if (!(pkgSep < 0 || pkgSep + 1 >= pkg.length)) { in unflattenFromStringWithJunk()
199 pkg = pkg.substring(pkgSep, pkg.length) in unflattenFromStringWithJunk()
212 if (!(clsSep < 0 || clsSep + 1 >= cls.length)) { in unflattenFromStringWithJunk()
/platform_testing/libraries/health/rules/src/android/platform/test/rule/
DSystemHealthRule.java72 for (int i = 0; i < maxLines && i < lines.length; i++) {
76 if (lines.length > maxLines) {
78 ret.append(lines.length - maxLines);
103 return errorDetails.length() != 0 ? errorDetails.toString() : null;
125 return errors.length() != 0
DDittoBenchRule.java51 if (splitPath != null && splitPath.length != 0) { in finished()
52 String dittoBinaryName = splitPath[splitPath.length - 1]; in finished()
/platform_testing/libraries/uiautomator-helpers/src/android/platform/uiautomator_helpers/
DTracingUtils.kt34 if (length > MAX_TRACE_NAME_LEN) { in shortenedIfNeeded()
35 Log.w(TAG, "Section name too long: \"$this\" (len=$length, max=$MAX_TRACE_NAME_LEN)") in shortenedIfNeeded()
/platform_testing/libraries/collectors-helper/statsd/test/src/com/android/helpers/
DAppStartupHelperTest.java134 assertEquals(1, appLaunchMetrics.get(coldLaunchMetricKey).toString().split(",").length); in testSingleColdLaunchMetric()
145 appLaunchMetrics.get(coldLaunchTransitionMetricKey).toString().split(",").length); in testSingleColdLaunchMetric()
154 appLaunchMetrics.get(coldLaunchProcessMetricKey).toString().split(",").length); in testSingleColdLaunchMetric()
168 appLaunchMetrics.get(sourceEventDelayMetricKey).toString().split(",").length); in testSingleColdLaunchMetric()
191 assertEquals(2, appLaunchMetrics.get(coldLaunchMetricKey).toString().split(",").length); in testMultipleColdLaunchMetric()
203 appLaunchMetrics.get(coldLaunchProcessMetricKey).toString().split(",").length); in testMultipleColdLaunchMetric()
250 appLaunchMetrics.get(coldLaunchCalculatorMetricKey).toString().split(",").length); in testDifferentAppColdLaunchMetric()
252 appLaunchMetrics.get(coldLaunchClockCountPkgKey).toString().split(",").length); in testDifferentAppColdLaunchMetric()
270 appLaunchMetrics.get(coldLaunchTransCalMetricKey).toString().split(",").length); in testDifferentAppColdLaunchMetric()
272 appLaunchMetrics.get(coldLaunchTransSetMetricKey).toString().split(",").length); in testDifferentAppColdLaunchMetric()
[all …]
/platform_testing/libraries/audio-test-harness/client-lib/src/test/java/com/android/media/audiotestharness/client/grpc/
DGrpcAudioCaptureStreamTests.java150 byte[] readBytes = new byte[AudioTestHarnessTestImpl.MESSAGE.length];
154 assertEquals(AudioTestHarnessTestImpl.MESSAGE.length, numBytesRead);
176 grpcAudioCaptureStream.read(new byte[AudioTestHarnessTestImpl.MESSAGE.length]);
188 new byte[AudioTestHarnessTestImpl.MESSAGE.length], /* off= */ 1, /* len= */ 2);
196 grpcAudioCaptureStream.read(new byte[AudioTestHarnessTestImpl.MESSAGE.length]);
203 short[] expected = new short[AudioTestHarnessTestImpl.MESSAGE.length / 2];
209 short[] actual = new short[AudioTestHarnessTestImpl.MESSAGE.length / 2];
211 grpcAudioCaptureStream.read(actual, /* offset= */ 0, /* max= */ actual.length);
214 assertEquals(AudioTestHarnessTestImpl.MESSAGE.length / 2, numRead);
/platform_testing/libraries/collectors-helper/utilities/src/com/android/helpers/
DMetricUtility.java96 if (value.length() == 0) { in getMetricDoubles()
101 for (int i = 0; i < values.length; i++) { in getMetricDoubles()
130 int length; in executeCommandBlocking() local
132 while ((length = is.read(buf)) >= 0) { in executeCommandBlocking()
133 out.write(buf, 0, length); in executeCommandBlocking()
/platform_testing/tests/health/scenarios/src/android/platform/test/scenario/generic/
DOpenApps.java55 if (names.length != pkgs.length) { in testOpen()
59 for (int i = 0; i < names.length; i++) { in testOpen()
/platform_testing/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/helper/
DSquare.java84 squareCoords.length * 4); in Square()
93 drawOrder.length * 2); in Square()
150 GLES20.GL_TRIANGLES, drawOrder.length, in draw()
/platform_testing/libraries/audio-test-harness/instrumentation/src/com/android/media/audiotestharness/instrumentation/
DAudioTestHarnessCaptureTest.java92 samples, samplesRead, samples.length - samplesRead); in testPlayAudioFile_outputsAudio()
102 for (int i = 1; i < samples.length; i++) { in testPlayAudioFile_outputsAudio()
165 ByteBuffer buf = ByteBuffer.allocate(toWrite.length * 2).order(ByteOrder.LITTLE_ENDIAN); in writeSamplesToAppStorage()
172 Log.v(TAG, String.format("Wrote file (%s) of size (%d)", outputFile, toWrite.length)); in writeSamplesToAppStorage()
/platform_testing/libraries/audio-test-harness/utilities/src/com/android/media/audiotestharness/utilities/
DAudioSystemDiagnostic.java55 diagnosticStringBuilder.append("Number of Mixers = " + mixers.length + "\n"); in buildAudioSystemDiagnosticString()
57 for (int i = 0; i < mixers.length; i++) { in buildAudioSystemDiagnosticString()
/platform_testing/tests/functional/downloadapp/src/com/android/functional/downloadapp/
DDownloadAppTestHelper.java182 DownloadAppTestHelper.FILE_TYPES[random.nextInt(FILE_TYPES.length)]); in populateContentInDLApp()
194 DownloadAppTestHelper.FILE_TYPES[random.nextInt(FILE_TYPES.length)], in populateContentInDLApp()
208 boolean isMediaScannerScannable, String mimeType, String path, long length, in addToDownloadContentDB() argument
231 values.put("total_bytes", length); in addToDownloadContentDB()
255 if (removeIds.length > 0) { in removeContentInDLApp()
256 Assert.assertEquals(removeIds.length, getDLManager().remove(removeIds)); in removeContentInDLApp()
294 public static String randomWord(int length) { in randomWord() argument
297 for (int j = 0; j < length; j++) { in randomWord()
/platform_testing/libraries/automotive-helpers/lock-screen-helper/src/android/platform/helpers/
DLockScreenHelperImpl.java111 int length = pin.length(); in selectPinOnPinPad() local
112 for (int i = 0; i < length; i++) { in selectPinOnPinPad()
/platform_testing/libraries/collectors-helper/app/src/com/android/helpers/
DAppVersionHelper.java59 if (mPackageNames == null || mPackageNames.length == 0 || mPackageNames[0].length() == 0) { in getMetrics()
/platform_testing/libraries/sts-common-util/host-side/src/com/android/sts/common/
DRegexUtils.java107 end = Math.min(input.length(), end + after); in getInputContext()
135 public int length() { in length() method in RegexUtils.TimeoutCharSequence
136 return chars.length(); in length()

123456