Home
last modified time | relevance | path

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

12345678910>>...26

/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/renderscript/src/android/renderscript/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 …]
DAtomicTest.java114 for (int i=0; i < mSrcData.length; i++) { in testAdd()
128 for (int i=0; i < mSrcData.length; i++) { in testUAdd()
142 for (int i=0; i < mSrcData.length; i++) { in testSub()
156 for (int i=0; i < mSrcData.length; i++) { in testUSub()
170 for (int i=0; i < mSrcData.length; i++) { in testXor()
184 for (int i=0; i < mSrcData.length; i++) { in testUXor()
264 for (int j = 0; j < mSrcData.length; j++) { in testAnd()
267 mSrcData[r.nextInt(mSrcData.length)] = ~0x40000000; in testAnd()
268 mSrcData[r.nextInt(mSrcData.length)] = ~0x10000000; in testAnd()
269 mSrcData[r.nextInt(mSrcData.length)] = ~0x02000000; in testAnd()
[all …]
/cts/tests/tests/text/src/android/text/method/cts/
DDigitsKeyListenerTest.java53 assertNull(digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
54 dest, 0, dest.length())); in testFilter1()
58 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
59 dest, 0, dest.length())).toString()); in testFilter1()
63 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
64 dest, 0, dest.length())).toString()); in testFilter1()
68 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
69 dest, 0, dest.length())).toString()); in testFilter1()
74 spannableSource.setSpan(what, 0, spannableSource.length(), Spanned.SPAN_POINT_POINT); in testFilter1()
76 0, spannableSource.length(), dest, 0, dest.length()); in testFilter1()
[all …]
DNumberKeyListenerTest.java47 assertEquals("", mMockNumberKeyListener.filter(source, 0, source.length(), in testFilter()
48 dest, 0, dest.length()).toString()); in testFilter()
52 assertNull(mMockNumberKeyListener.filter(source, 0, source.length(), dest, 0, in testFilter()
53 dest.length())); in testFilter()
57 assertNull(mMockNumberKeyListener.filter(source, 0, source.length(), dest, 0, in testFilter()
58 dest.length())); in testFilter()
62 assertEquals("12345", mMockNumberKeyListener.filter(source, 0, source.length(), in testFilter()
63 dest, 0, dest.length()).toString()); in testFilter()
67 spannableSource.setSpan(what, 0, spannableSource.length(), Spanned.SPAN_POINT_POINT); in testFilter()
69 0, spannableSource.length(), dest, 0, dest.length()); in testFilter()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DLoginFilterTest.java45 assertNull(loginFilter.filter(source1, 0, source1.length(), dest1, 0, dest1.length())); in testFilter()
51 assertNull(loginFilter.filter(source1, 0, source1.length(), dest2, 5, 6)); in testFilter()
57 assertNull(loginFilter.filter(source2, 0, source2.length(), in testFilter()
58 dest1, 0, dest1.length())); in testFilter()
64 assertNull(loginFilter.filter(spannedSource, 0, spannedSource.length(), in testFilter()
65 dest1, 0, dest1.length())); in testFilter()
71 result = loginFilter.filter(source2, 0, source2.length(), dest1, 0, dest1.length()); in testFilter()
79 result = loginFilter.filter(spannedSource, 0, spannedSource.length(), in testFilter()
80 dest1, 0, dest1.length()); in testFilter()
87 loginFilter.filter(null, 0, source1.length(), dest1, 0, dest1.length()); in testFilter()
[all …]
DTextUtilsTest.java151 string1.setSpan(urlSpan, 0, string1.length() - 1, Spanned.SPAN_INCLUSIVE_INCLUSIVE); in testConcat()
153 string2.setSpan(bgColorSpan, 0, string2.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testConcat()
158 Object spans[] = strResult.getSpans(0, strResult.length(), Object.class); in testConcat()
159 assertEquals(2, spans.length); in testConcat()
165 assertEquals(string1.length() - 1, strResult.getSpanEnd(urlSpan)); in testConcat()
166 assertEquals(string1.length() + comma.length(), strResult.getSpanStart(bgColorSpan)); in testConcat()
167 assertEquals(strResult.length() - 1, strResult.getSpanEnd(bgColorSpan)); in testConcat()
187 int midPos = source1.length() / 2; in testCopySpansFrom()
193 source1.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); in testCopySpansFrom()
197 TextUtils.copySpansFrom(source1, 0, source1.length(), Object.class, dest1, 0); in testCopySpansFrom()
[all …]
DAlteredCharSequenceTest.java32 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testCharAt()
48 mAlteredCharSequence.charAt(mAlteredCharSequence.length() + 1); in testCharAt()
62 mAlteredCharSequence = AlteredCharSequence.make(SOURCE_STR, sub, 0, sub.length); in testGetChars()
93 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testLength()
94 assertEquals(source.length(), mAlteredCharSequence.length()); in testLength()
103 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testMake()
109 mAlteredCharSequence = AlteredCharSequence.make(spanned, sub, 0, sub.length); in testMake()
111 assertEquals(0, mAlteredCharSequence.length()); in testMake()
121 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testSubSequence()
136 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testToString()
[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/hostsidetests/dumpsys/src/android/dumpsys/cts/
DDumpsysHostTest.java60 assertTrue(procstats.length() > 0); in testProcstatsOutput()
83 assertEquals(2, parts.length); in testProcstatsOutput()
130 assertEquals(5, parts.length); in checkPeriod()
141 assertTrue(parts.length >= 4); in checkPkgProc()
147 assertTrue(parts.length >= 5); in checkPkgProc()
155 for (int i = statesStartIndex; i < parts.length; i++) { in checkPkgProc()
157 assertEquals(2, subparts.length); in checkPkgProc()
164 assertEquals(hasProcess ? 3 : 2, tag.length()); in checkTag()
188 assertTrue(parts.length >= 4); in checkPkgPss()
194 assertTrue(parts.length >= 5); in checkPkgPss()
[all …]
/cts/tests/tests/text/src/android/text/util/cts/
DLinkifyTest.java59 for (int i = 0, size = matchingRegion.length(); i < size; i++) {
90 URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1()
91 assertEquals(4, spans.length); in testAddLinks1()
98 spans = spannable.getSpans(0, spannable.length(), URLSpan.class); in testAddLinks1()
99 assertEquals(1, spans.length); in testAddLinks1()
118 URLSpan[] spans = ((Spannable)tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinks2()
119 assertEquals(1, spans.length); in testAddLinks2()
125 spans = ((Spannable)tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinks2()
126 assertEquals(1, spans.length); in testAddLinks2()
145 URLSpan[] spans = ((Spannable) tv.getText()).getSpans(0, text.length(), URLSpan.class); in testAddLinks3()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAccountManagementTest.java67 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter()
71 assertEquals(1, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter()
77 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter()
88 assertEquals(1, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_addAccount()
90 assertEquals(0, mAccountManager.getAccountsByType(ACCOUNT_TYPE_1).length); in testAccountManagementDisabled_addAccount()
99 assertEquals(0, mAccountManager.getAccountsByType(ACCOUNT_TYPE_1).length); in testAccountManagementDisabled_addAccount()
104 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_addAccount()
121 assertEquals(1, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_removeAccount()
123 assertEquals(0, mAccountManager.getAccountsByType(ACCOUNT_TYPE_1).length); in testAccountManagementDisabled_removeAccount()
128 assertEquals(2, mAccountManager.getAccountsByType(ACCOUNT_TYPE_1).length); in testAccountManagementDisabled_removeAccount()
[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/tests/tests/graphics/src/android/graphics/cts/
DPaintTest.java72 float[] widths = new float[text.length()]; in testBreakText()
73 assertEquals(text.length(), p.getTextWidths(text, widths)); in testBreakText()
76 for (int i = 0; i < text.length(); i++) { in testBreakText()
81 for (int i = 0; i < text.length(); i++) { in testBreakText()
125 float[] emojiWidths = new float[emoji.length()]; in testBreakText()
126 assertEquals(emoji.length(), p.getTextWidths(emoji, emojiWidths)); in testBreakText()
169 for (int i = 0; i < measured.length; i++) { in assertBreakText()
907 float[] widths = new float[text.length()];
908 for (int i = 0; i < widths.length; i++) {
913 for (int i = 0; i < widths.length; i++) {
[all …]
/cts/common/util/src/com/android/compatibility/common/util/
DStat.java52 for (int i = 1; i < data.length; i++) { in getStat()
62 average /= data.length; in getStat()
63 eX2 /= data.length; in getStat()
66 return new StatResult(average, min, max, stddev, data.length); in getStat()
75 double[] dataCopied = Arrays.copyOf(data, data.length); in getStatWithOutlierRejection()
77 int medianIndex = dataCopied.length / 2; in getStatWithOutlierRejection()
79 if (dataCopied.length % 2 == 1) { in getStatWithOutlierRejection()
92 for (int i = 0; i < data.length; i++) { in getStatWithOutlierRejection()
125 for (int i = 1; i < data.length; i++) { in getAverage()
128 return sum / data.length; in getAverage()
[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()
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/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/libs/commonutil/src/com/android/cts/util/
DStat.java53 for (int i = 1; i < data.length; i++) { in getStat()
63 average /= data.length; in getStat()
64 eX2 /= data.length; in getStat()
67 return new StatResult(average, min, max, stddev, data.length); in getStat()
76 double[] dataCopied = Arrays.copyOf(data, data.length); in getStatWithOutlierRejection()
78 int medianIndex = dataCopied.length / 2; in getStatWithOutlierRejection()
80 if (dataCopied.length % 2 == 1) { in getStatWithOutlierRejection()
93 for (int i = 0; i < data.length; i++) { in getStatWithOutlierRejection()
126 for (int i = 1; i < data.length; i++) { in getAverage()
129 return sum / data.length; in getAverage()
[all …]
/cts/tests/tests/hardware/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/apps/CtsVerifier/src/com/android/cts/verifier/audio/wavelib/
DVectorAverage.java28 int size = data.length; in setData()
29 if (mData == null || mData.length != size) { in setData()
46 if (mData != null && mData.length <= data.length) { in getData()
47 nCount = mData.length; in getData()
71 return mData.length; in getSize()
93 int nCount = data.length; in toString()
108 int lineCount = lines.length; in initFromString()
118 if (separated.length > 1 && separated[0].equalsIgnoreCase(SERIALIZED_VERSION)) { in initFromString()
130 if (separated.length > 1 && separated[0].equalsIgnoreCase(SERIALIZED_COUNT)) { in initFromString()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/
DItsUtils.java54 assert(a.length() % 5 == 0); in getJsonWeightedRectsFromArray()
55 MeteringRectangle[] ma = new MeteringRectangle[a.length() / 5]; in getJsonWeightedRectsFromArray()
56 for (int i = 0; i < a.length(); i += 5) { in getJsonWeightedRectsFromArray()
135 allSizes = new Size[normalSizes.length + slowSizes.length]; in getOutputSizes()
137 normalSizes.length); in getOutputSizes()
138 System.arraycopy(slowSizes, 0, allSizes, normalSizes.length, in getOutputSizes()
139 slowSizes.length); in getOutputSizes()
149 if (sizes == null || sizes.length == 0) { in getMaxSize()
154 for (int i = 1; i < sizes.length; i++) { in getMaxSize()
191 for (int i = 0; i < planes.length; i++) { in getDataFromImage()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DMultiAutoCompleteTextView_CommaTokenizerTest.java51 mCommaTokenizer.findTokenStart(TEST_TEXT, TEST_TEXT.length())); in testFindTokenStart()
61 mCommaTokenizer.findTokenStart(TEST_TEXT, TEST_TEXT.length() + 1); in testFindTokenStart()
68 mCommaTokenizer.findTokenStart(null, TEST_TEXT.length()); in testFindTokenStart()
82 assertEquals(TEST_TEXT.length(), in testFindTokenEnd()
84 assertEquals(TEST_TEXT.length(), in testFindTokenEnd()
85 mCommaTokenizer.findTokenEnd(TEST_TEXT, TEST_TEXT.length())); in testFindTokenEnd()
86 assertEquals(TEST_TEXT.length(), in testFindTokenEnd()
87 mCommaTokenizer.findTokenEnd(TEST_TEXT, TEST_TEXT.length() + 1)); in testFindTokenEnd()
126 spannableString.setSpan(what, 0, spannableString.length(), in testTerminateToken()
132 assertEquals(spannableString.length(), actual.getSpanEnd(what)); in testTerminateToken()

12345678910>>...26