Home
last modified time | relevance | path

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

12345678910>>...43

/cts/tests/tests/renderscript/src/android/renderscript/cts/
DRSUtils.java78 for (int i = 0; i < array.length; i++) { in genRandomDoubles()
90 for (int i = 0; i < array.length; i++) { in genRandomDoubles()
96 for (int i = 0; i < sInterestingDoubles.length; i++) { in genRandomDoubles()
99 array[r.nextInt(array.length)] = d; in genRandomDoubles()
102 array[r.nextInt(array.length)] = min; in genRandomDoubles()
103 array[r.nextInt(array.length)] = max; in genRandomDoubles()
105 array[r.nextInt(array.length)] = Double.NaN; in genRandomDoubles()
106 array[r.nextInt(array.length)] = Double.POSITIVE_INFINITY; in genRandomDoubles()
107 array[r.nextInt(array.length)] = Double.NEGATIVE_INFINITY; in genRandomDoubles()
108 array[r.nextInt(array.length)] = Double.MIN_VALUE; in genRandomDoubles()
[all …]
DAtomicTest.java128 for (int i=0; i < mSrcData.length; i++) { in testAdd()
142 for (int i=0; i < mSrcData.length; i++) { in testUAdd()
156 for (int i=0; i < mSrcData.length; i++) { in testSub()
170 for (int i=0; i < mSrcData.length; i++) { in testUSub()
184 for (int i=0; i < mSrcData.length; i++) { in testXor()
198 for (int i=0; i < mSrcData.length; i++) { in testUXor()
278 for (int j = 0; j < mSrcData.length; j++) { in testAnd()
281 mSrcData[r.nextInt(mSrcData.length)] = ~0x40000000; in testAnd()
282 mSrcData[r.nextInt(mSrcData.length)] = ~0x10000000; in testAnd()
283 mSrcData[r.nextInt(mSrcData.length)] = ~0x02000000; in testAnd()
[all …]
/cts/tests/tests/renderscriptlegacy/src/android/renderscriptlegacy/cts/
DRSUtils.java56 for (int i = 0; i < array.length; i++) { in genRandomDoubles()
68 for (int i = 0; i < array.length; i++) { in genRandomDoubles()
74 for (int i = 0; i < sInterestingDoubles.length; i++) { in genRandomDoubles()
77 array[r.nextInt(array.length)] = d; in genRandomDoubles()
80 array[r.nextInt(array.length)] = min; in genRandomDoubles()
81 array[r.nextInt(array.length)] = max; in genRandomDoubles()
83 array[r.nextInt(array.length)] = Double.NaN; in genRandomDoubles()
84 array[r.nextInt(array.length)] = Double.POSITIVE_INFINITY; in genRandomDoubles()
85 array[r.nextInt(array.length)] = Double.NEGATIVE_INFINITY; in genRandomDoubles()
86 array[r.nextInt(array.length)] = Double.MIN_VALUE; in genRandomDoubles()
[all …]
/cts/tests/tests/location/src/android/location/cts/psedorange/
DGpsMathOperations.java33 for (int i = 0; i < inputVector.length; i++) { in vectorNorm()
46 double[] result = new double[firstVector.length]; in subtractTwoVectors()
47 if (firstVector.length != secondVector.length) { in subtractTwoVectors()
51 for (int i = 0; i < firstVector.length; i++) { in subtractTwoVectors()
65 double result[] = new double[matrix.length]; in matrixByColVectMultiplication()
66 int matrixLength = matrix.length; in matrixByColVectMultiplication()
67 int vectorLength = vector.length; in matrixByColVectMultiplication()
68 if (vectorLength != matrix[0].length) { in matrixByColVectMultiplication()
87 if (firstVector.length != secondVector.length) { in dotProduct()
91 for (int i = 0; i < firstVector.length; i++) { in dotProduct()
/cts/tests/tests/text/src/android/text/method/cts/
DDigitsKeyListenerTest.java88 assertNull(digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
89 dest, 0, dest.length())); in testFilter1()
93 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
94 dest, 0, dest.length())).toString()); in testFilter1()
98 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
99 dest, 0, dest.length())).toString()); in testFilter1()
103 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
104 dest, 0, dest.length())).toString()); in testFilter1()
109 spannableSource.setSpan(what, 0, spannableSource.length(), Spanned.SPAN_POINT_POINT); in testFilter1()
111 0, spannableSource.length(), dest, 0, dest.length()); in testFilter1()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DSpannedTest.java64 spanned.charAt(spanned.length()); in testCharAt()
77 text.setSpan(new UnderlineSpan(), 5, text.length(), flags); in testNextSpanTransition()
83 assertEquals(4, spanned.nextSpanTransition(1, spanned.length(), QuoteSpan.class)); in testNextSpanTransition()
84 assertEquals(spanned.length(), in testNextSpanTransition()
85 spanned.nextSpanTransition(4, spanned.length(), QuoteSpan.class)); in testNextSpanTransition()
86 assertEquals(5, spanned.nextSpanTransition(4, spanned.length(), UnderlineSpan.class)); in testNextSpanTransition()
88 assertEquals(2, spanned.nextSpanTransition(0, spanned.length(), Object.class)); in testNextSpanTransition()
89 assertEquals(4, spanned.nextSpanTransition(2, spanned.length(), Object.class)); in testNextSpanTransition()
90 assertEquals(5, spanned.nextSpanTransition(4, spanned.length(), Object.class)); in testNextSpanTransition()
91 assertEquals(7, spanned.nextSpanTransition(5, spanned.length(), Object.class)); in testNextSpanTransition()
[all …]
DLoginFilterTest.java58 assertNull(loginFilter.filter(source1, 0, source1.length(), dest1, 0, dest1.length())); in testFilter()
64 assertNull(loginFilter.filter(source1, 0, source1.length(), dest2, 5, 6)); in testFilter()
70 assertNull(loginFilter.filter(source2, 0, source2.length(), in testFilter()
71 dest1, 0, dest1.length())); in testFilter()
77 assertNull(loginFilter.filter(spannedSource, 0, spannedSource.length(), in testFilter()
78 dest1, 0, dest1.length())); in testFilter()
84 result = loginFilter.filter(source2, 0, source2.length(), dest1, 0, dest1.length()); in testFilter()
92 result = loginFilter.filter(spannedSource, 0, spannedSource.length(), in testFilter()
93 dest1, 0, dest1.length()); in testFilter()
100 loginFilter.filter(null, 0, source1.length(), dest1, 0, dest1.length()); in testFilter()
[all …]
DTextUtilsTest.java109 for (int i = 0; i < s.length(); i++) { in countChars()
272 string1.setSpan(urlSpan, 0, string1.length() - 1, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testConcat()
274 string2.setSpan(bgColorSpan, 0, string2.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testConcat()
279 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); in testConcat()
280 assertEquals(2, spans.length); in testConcat()
286 assertEquals(string1.length() - 1, strResult.getSpanEnd(urlSpan)); in testConcat()
287 assertEquals(string1.length() + comma.length(), strResult.getSpanStart(bgColorSpan)); in testConcat()
288 assertEquals(strResult.length() - 1, strResult.getSpanEnd(bgColorSpan)); in testConcat()
308 piece.setSpan(span, 0, piece.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in testConcat_NullParameters()
311 final Object[] spans = result.getSpans(0, result.length(), Object.class); in testConcat_NullParameters()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DUtil.java50 public static Complex[] padZeros(Complex[] data, int length) { in padZeros() argument
51 Complex[] result = new Complex[length]; in padZeros()
52 if (length < data.length) { in padZeros()
53 System.arraycopy(data, 0, result, 0, length); in padZeros()
55 System.arraycopy(data, 0, result, 0, data.length); in padZeros()
56 for (int i = data.length; i < result.length; i++) { in padZeros()
68 int n = nextPowerOfTwo(Math.max(data1.length, data2.length)); in computeCrossCorrelation()
76 double[] resultDouble = new double[resultComplex.length]; in computeCrossCorrelation()
77 for (int i = 0; i < resultComplex.length; i++) { in computeCrossCorrelation()
87 double[] result = new double[data.length]; in toDouble()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
DXmpDepthDecode.java47 XMP_EXTENSION_HEADER.length() + 32 + 1; // 32 byte GUID + 1 byte null termination.
139 public int length; field in XmpDepthDecode.Section
235 section.length = -1; in parse()
237 is.read(section.data, 0, section.data.length); in parse()
247 int length = lh << 8 | ll; in parse() local
249 sections.add(readSection(is, length, marker, skipExtendedContent)); in parse()
253 is.skip(length - 2); in parse()
279 if (data.length < header.length()) { in hasHeader()
283 byte[] buffer = new byte[header.length()]; in hasHeader()
284 System.arraycopy(data, 0, buffer, 0, header.length()); in hasHeader()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/generated/
DTestLength.rs24 return length(inV);
28 return length(inV);
32 return length(inV);
36 return length(inV);
40 return length(inV);
44 return length(inV);
48 return length(inV);
52 return length(inV);
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hcef/
DHceFReaderActivity.java59 byte length = (byte) (2 + nfcid2.length + payload.length); in createEchoCommand()
61 byte[] echo_cmd = new byte[length]; in createEchoCommand()
62 echo_cmd[0] = length; in createEchoCommand()
64 System.arraycopy(nfcid2, 0, echo_cmd, 2, nfcid2.length); in createEchoCommand()
65 System.arraycopy(payload, 0, echo_cmd, 2 + nfcid2.length, payload.length); in createEchoCommand()
70 byte[] cmd = new byte[2 + nfcid2.length]; in createSuccessCommand()
71 cmd[0] = (byte) (2 + nfcid2.length); in createSuccessCommand()
73 System.arraycopy(nfcid2, 0, cmd, 2, nfcid2.length); in createSuccessCommand()
81 if (resp[0] != resp.length) return false; in verifyResponse()
82 if (resp.length != cmd.length) return false; in verifyResponse()
[all …]
/cts/tools/cfassembler/src/dxconvext/util/
DFileUtils.java66 long longLength = file.length(); in readFile()
67 int length = (int) longLength; in readFile() local
68 if (length != longLength) { in readFile()
72 byte[] result = new byte[length]; in readFile()
77 while (length > 0) { in readFile()
78 int amt = in.read(result, at, length); in readFile()
83 length -= amt; in readFile()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/peripheralprofile/
DAudioStringsHelper.java43 return fmt < formatStrings.length ? formatStrings[fmt] : ("" + fmt + " Unknown Format "); in encodingToString()
47 return fmt < shortFormatStrings.length in encodingToShortString()
63 for(int rateIndex = 0; rateIndex < rates.length; rateIndex++) { in buildRatesStr()
65 if (rateIndex < rates.length - 1) { in buildRatesStr()
75 for(int encodingIndex = 0; encodingIndex < encodings.length; encodingIndex++) { in buildEncodingsStr()
77 if (encodingIndex < encodings.length - 1) { in buildEncodingsStr()
97 for (int index = 0; index < values.length; index++) { in makeIntList()
99 if (index < values.length - 1) { in makeIntList()
110 for (int index = 0; index < values.length; index++) { in makeHexList()
112 if (index < values.length - 1) { in makeHexList()
DListsHelper.java21 if (a.length != b.length) { in isMatch()
25 int len = a.length; in isMatch()
51 if (a.length > b.length) { in isSubset()
/cts/hostsidetests/dumpsys/src/android/dumpsys/cts/
DProcessStatsDumpsysTest.java62 assertTrue(procstats.length() > 0); in testProcstatsOutput()
85 if (" ".equals(values[values.length - 1])) { in commaSplit()
86 values[values.length - 1] = ""; in commaSplit()
109 assertEquals(2, parts.length); in checkProcStateOutput()
159 assertTrue("Length should be >= 5, found: " + parts.length, in checkPeriod()
160 parts.length >= 5); in checkPeriod()
163 for (int i = 4; i < parts.length; i++) { in checkPeriod()
179 assertTrue(parts.length >= 5); in checkPkgProc()
186 for (int i = statesStartIndex; i < parts.length; i++) { in checkPkgProc()
188 assertEquals(2, subparts.length); in checkPkgProc()
[all …]
DBatteryStatsDumpsysTest.java43 assertTrue(batterystats.length() > 0); in testBatterystatsOutput()
218 assertEquals(8, parts.length); in checkVersion()
226 assertEquals(6, parts.length); in checkUid()
232 assertEquals(10, parts.length); in checkApk()
245 assertTrue(parts.length >= 9); in checkProcess()
254 assertEquals(10, parts.length); in checkSensor()
264 assertEquals(6, parts.length); in checkVibrator()
270 assertEquals(6, parts.length); in checkForegroundActivity()
276 assertEquals(6, parts.length); in checkForegroundService()
282 assertEquals(11, parts.length); in checkStateTime()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/
DDualNonPaymentEmulatorActivity.java34 … CommandApdu[] commandSequences = new CommandApdu[TransportService2.APDU_COMMAND_SEQUENCE.length + in buildReaderIntent()
35 AccessService.APDU_COMMAND_SEQUENCE.length]; in buildReaderIntent()
37 TransportService2.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
39 TransportService2.APDU_COMMAND_SEQUENCE.length, in buildReaderIntent()
40 AccessService.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
42 String[] responseSequences = new String[TransportService2.APDU_RESPOND_SEQUENCE.length + in buildReaderIntent()
43 AccessService.APDU_RESPOND_SEQUENCE.length]; in buildReaderIntent()
45 TransportService2.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
47 TransportService2.APDU_RESPOND_SEQUENCE.length, in buildReaderIntent()
48 AccessService.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
DOnAndOffHostEmulatorActivity.java35 … CommandApdu[] commandSequences = new CommandApdu[OffHostService.APDU_COMMAND_SEQUENCE.length + in buildReaderIntent()
36 AccessService.APDU_COMMAND_SEQUENCE.length]; in buildReaderIntent()
38 OffHostService.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
40 OffHostService.APDU_COMMAND_SEQUENCE.length, in buildReaderIntent()
41 AccessService.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
43 String[] responseSequences = new String[OffHostService.APDU_RESPOND_SEQUENCE.length + in buildReaderIntent()
44 AccessService.APDU_RESPOND_SEQUENCE.length]; in buildReaderIntent()
46 OffHostService.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
48 OffHostService.APDU_RESPOND_SEQUENCE.length, in buildReaderIntent()
49 AccessService.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
/cts/tests/signature/api-check/src/java/android/signature/cts/api/
DBootClassPathClassesProvider.java45 return classname.substring(1, classname.length() - 1); in getAllClasses()
62 if (field_infos.length != 2 || field_infos[0].length != field_infos[1].length || in getAllMembers()
63 method_infos.length != 2 || method_infos[0].length != method_infos[1].length) { in getAllMembers()
68 DexMember[] members = new DexMember[field_infos[0].length + method_infos[0].length]; in getAllMembers()
69 for (int i = 0; i < field_infos[0].length; i++) { in getAllMembers()
72 for (int i = 0; i < method_infos[0].length; i++) { in getAllMembers()
73 members[i + field_infos[0].length] = in getAllMembers()
/cts/tests/tests/secure_element/omapi/src/android/omapi/cts/
DOmapiTest.java224 if (readers != null && readers.length > 0) { in testATR()
225 for (int i = 0; i < readers.length; i++) { in testATR()
330 assertGreaterOrEqual(selectResponse.length, 2); in testSelectableAid()
331 assertEquals(selectResponse[selectResponse.length - 1] & 0xFF, 0x00); in testSelectableAid()
332 assertEquals(selectResponse[selectResponse.length - 2] & 0xFF, 0x90); in testSelectableAid()
394 assertGreaterOrEqual(selectResponse.length, 2); in testSecurityExceptionInTransmit()
395 assertEquals(selectResponse[selectResponse.length - 1] & 0xFF, 0x00); in testSecurityExceptionInTransmit()
396 assertEquals(selectResponse[selectResponse.length - 2] & 0xFF, 0x90); in testSecurityExceptionInTransmit()
423 assertGreaterOrEqual(selectResponse.length, 2); in internalTransmitApdu()
449 assertEquals(response.length, 2); in testTransmitApdu()
[all …]
/cts/tests/tests/security/jni/
Dandroid_security_cts_CharDeviceTest.cpp36 int length = page_size * page_size; in android_security_cts_CharDeviceTest_doExynosWriteTest() local
43 mmap(NULL, length, PROT_READ|PROT_WRITE, MAP_SHARED, fd, PHYS_OFFSET); in android_security_cts_CharDeviceTest_doExynosWriteTest()
56 for (i = 0; i < length; i++) { in android_security_cts_CharDeviceTest_doExynosWriteTest()
62 munmap(addr, length); in android_security_cts_CharDeviceTest_doExynosWriteTest()
74 int length = page_size * page_size; in android_security_cts_CharDeviceTest_doExynosReadTest() local
81 mmap(NULL, length, PROT_READ, MAP_SHARED, fd, PHYS_OFFSET); in android_security_cts_CharDeviceTest_doExynosReadTest()
94 for (i = 0; i < (length - strlen(MAGIC_STRING)); i++) { in android_security_cts_CharDeviceTest_doExynosReadTest()
102 munmap(addr, length); in android_security_cts_CharDeviceTest_doExynosReadTest()
/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/
DAbstractMeanVerification.java36 mSums = new float[event.values.length]; in addSensorEventInternal()
38 Assert.assertEquals(mSums.length, event.values.length); in addSensorEventInternal()
39 for (int i = 0; i < mSums.length; i++) { in addSensorEventInternal()
60 float[] means = new float[mSums.length]; in getMeans()
61 for (int i = 0; i < mSums.length; i++) { in getMeans()
/cts/tests/tests/content/src/android/content/res/cts/
DArrayTest.java42 assertEquals(res.length, expected.length); in checkStringArray()
43 for (int i = 0; i < expected.length; i++) { in checkStringArray()
50 assertEquals(res.length, expected.length); in checkTextArray()
51 for (int i = 0; i < expected.length; i++) { in checkTextArray()
58 assertEquals(res.length, expected.length); in checkIntArray()
59 for (int i = 0; i < expected.length; i++) { in checkIntArray()
/cts/tests/tests/graphics/src/android/graphics/cts/
DPaintTest.java84 float[] widths = new float[text.length()]; in testBreakText()
85 assertEquals(text.length(), p.getTextWidths(text, widths)); in testBreakText()
88 for (int i = 0; i < text.length(); i++) { in testBreakText()
92 for (int i = 0; i < text.length(); i++) { in testBreakText()
136 float[] emojiWidths = new float[emoji.length()]; in testBreakText()
137 assertEquals(emoji.length(), p.getTextWidths(emoji, emojiWidths)); in testBreakText()
180 for (int i = 0; i < measured.length; i++) { in verifyBreakText()
886 float[] widths = new float[text.length()];
975 p.getTextBounds(text1, 0, text1.length(), bounds1); in testGetTextBounds()
977 p.getTextBounds(textChars1, 0, textChars1.length, bounds2); in testGetTextBounds()
[all …]

12345678910>>...43