Home
last modified time | relevance | path

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

12345678910>>...36

/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/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 …]
DHtmlTest.java71 assertEquals(expectLen, spans.length); in verifySingleTagOnWhileString()
92 assertEquals(spansLen, spans.length); in verifyBadHtml()
111 ForegroundColorSpan[] colors = s.getSpans(0, s.length(), type); in testColor()
115 colors = s.getSpans(0, s.length(), type); in testColor()
119 colors = s.getSpans(0, s.length(), type); in testColor()
120 assertEquals(0, colors.length); in testColor()
124 colors = s.getSpans(0, s.length(), type); in testColor()
128 colors = s.getSpans(0, s.length(), type); in testColor()
132 colors = s.getSpans(0, s.length(), type); in testColor()
136 colors = s.getSpans(0, s.length(), type); in testColor()
[all …]
DSpannableStringTest.java98 spannable.setSpan(underlineSpan, -1, text.length() + 1, in testSetSpan()
137 subSequence = spannable.subSequence(0, text.length()); in testSubSequence()
141 spannable.subSequence(-1, text.length() + 1); in testSubSequence()
162 first.setSpan(underlineSpan, 0, first.length(), Spanned.SPAN_PRIORITY); in testSubsequence_copiesSpans()
165 Object[] secondSpans = second.getSpans(0, second.length(), Object.class); in testSubsequence_copiesSpans()
167 assertEquals(2, secondSpans.length); in testSubsequence_copiesSpans()
171 {underlineSpan, 0, second.length(), Spanned.SPAN_PRIORITY}, in testSubsequence_copiesSpans()
174 for (int i = 0; i < secondSpans.length; i++) { in testSubsequence_copiesSpans()
188 first.setSpan(new UnderlineSpan(), 0, first.length(), Spanned.SPAN_PRIORITY); in testCopyConstructor_copiesAllSpans()
189 Object[] firstSpans = first.getSpans(0, first.length(), Object.class); in testCopyConstructor_copiesAllSpans()
[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/common/util/src/com/android/compatibility/common/util/
DStat.java55 for (int i = 1; i < data.length; i++) { in getStat()
64 average /= data.length; in getStat()
66 for (int i = 0; i < data.length; i++) { in getStat()
70 double variance = sumOfSquares / (data.length - 1); in getStat()
72 return new StatResult(average, min, max, stddev, data.length); in getStat()
81 double[] dataCopied = Arrays.copyOf(data, data.length); in getStatWithOutlierRejection()
83 int medianIndex = dataCopied.length / 2; in getStatWithOutlierRejection()
85 if (dataCopied.length % 2 == 1) { in getStatWithOutlierRejection()
93 double[] validData = new double[data.length]; in getStatWithOutlierRejection()
95 for (int i = 0; i < data.length; i++) { in getStatWithOutlierRejection()
[all …]
/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/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/hostsidetests/dumpsys/src/android/dumpsys/cts/
DProcessStatsDumpsysTest.java59 assertTrue(procstats.length() > 0); in testProcstatsOutput()
82 if (" ".equals(values[values.length - 1])) { in commaSplit()
83 values[values.length - 1] = ""; in commaSplit()
106 assertEquals(2, parts.length); in checkProcStateOutput()
156 assertTrue("Length should be >= 5, found: " + parts.length, in checkPeriod()
157 parts.length >= 5); in checkPeriod()
160 for (int i = 4; i < parts.length; i++) { in checkPeriod()
176 assertTrue(parts.length >= 5); in checkPkgProc()
183 for (int i = statesStartIndex; i < parts.length; i++) { in checkPkgProc()
185 assertEquals(2, subparts.length); in checkPkgProc()
[all …]
DBatteryStatsDumpsysTest.java43 assertTrue(batterystats.length() > 0); in testBatterystatsOutput()
210 assertEquals(8, parts.length); in checkVersion()
218 assertEquals(6, parts.length); in checkUid()
224 assertEquals(10, parts.length); in checkApk()
237 assertTrue(parts.length >= 9); in checkProcess()
246 assertEquals(10, parts.length); in checkSensor()
256 assertEquals(6, parts.length); in checkVibrator()
262 assertEquals(6, parts.length); in checkForeground()
268 assertEquals(10, parts.length); in checkStateTime()
278 assertEquals(29, parts.length); in checkWakelock()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DPaintTest.java86 float[] widths = new float[text.length()]; in testBreakText()
87 assertEquals(text.length(), p.getTextWidths(text, widths)); in testBreakText()
90 for (int i = 0; i < text.length(); i++) { in testBreakText()
94 for (int i = 0; i < text.length(); i++) { in testBreakText()
138 float[] emojiWidths = new float[emoji.length()]; in testBreakText()
139 assertEquals(emoji.length(), p.getTextWidths(emoji, emojiWidths)); in testBreakText()
182 for (int i = 0; i < measured.length; i++) { in verifyBreakText()
888 float[] widths = new float[text.length()];
977 p.getTextBounds(text1, 0, text1.length(), bounds1); in testGetTextBounds()
979 p.getTextBounds(textChars1, 0, textChars1.length, bounds2); in testGetTextBounds()
[all …]
/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()
/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()
DDualNonPaymentPrefixEmulatorActivity.java44 …andApdu[] commandSequences = new CommandApdu[PrefixTransportService1.APDU_COMMAND_SEQUENCE.length + in buildReaderIntent()
45 PrefixAccessService.APDU_COMMAND_SEQUENCE.length]; in buildReaderIntent()
47 PrefixTransportService1.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
49 PrefixTransportService1.APDU_COMMAND_SEQUENCE.length, in buildReaderIntent()
50 PrefixAccessService.APDU_COMMAND_SEQUENCE.length); in buildReaderIntent()
52 … String[] responseSequences = new String[PrefixTransportService1.APDU_RESPOND_SEQUENCE.length + in buildReaderIntent()
53 PrefixAccessService.APDU_RESPOND_SEQUENCE.length]; in buildReaderIntent()
55 PrefixTransportService1.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
57 PrefixTransportService1.APDU_RESPOND_SEQUENCE.length, in buildReaderIntent()
58 PrefixAccessService.APDU_RESPOND_SEQUENCE.length); in buildReaderIntent()
/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/tests/tests/text/src/android/text/util/cts/
DLinkifyTest.java71 for (int i = 0, size = matchingRegion.length(); i < size; i++) {
110 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinksToSpannable()
111 assertEquals(4, spans.length); in testAddLinksToSpannable()
118 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinksToSpannable()
119 assertEquals(1, spans.length); in testAddLinksToSpannable()
138 URLSpan[] spans = ((Spannable) tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinksToTextView()
139 assertEquals(1, spans.length); in testAddLinksToTextView()
145 spans = ((Spannable) tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinksToTextView()
146 assertEquals(1, spans.length); in testAddLinksToTextView()
166 URLSpan[] spans = ((Spannable) tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinksToTextViewWithScheme()
[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/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()

12345678910>>...36