Home
last modified time | relevance | path

Searched refs:source (Results 1 – 25 of 2296) sorted by relevance

12345678910>>...92

/cts/tests/tests/text/src/android/text/method/cts/
DDigitsKeyListenerTest.java83 String source = "123456"; in testFilter1() local
88 assertNull(digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
92 source = "a1b2c3d"; in testFilter1()
93 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
97 source = "-a1.b2c3d"; in testFilter1()
98 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
102 source = "+a1.b2c3d"; in testFilter1()
103 assertEquals("123", (digitsKeyListener.filter(source, 0, source.length(), in testFilter1()
108 Spannable spannableSource = new SpannableString(source); in testFilter1()
141 String source = "-123456"; in testFilter2() local
[all …]
DNumberKeyListenerTest.java56 String source = "Android test"; in testFilter() local
58 assertEquals("", mMockNumberKeyListener.filter(source, 0, source.length(), in testFilter()
61 source = "12345"; in testFilter()
63 assertNull(mMockNumberKeyListener.filter(source, 0, source.length(), dest, 0, in testFilter()
66 source = ""; in testFilter()
68 assertNull(mMockNumberKeyListener.filter(source, 0, source.length(), dest, 0, in testFilter()
71 source = "12345 Android"; in testFilter()
73 assertEquals("12345", mMockNumberKeyListener.filter(source, 0, source.length(), in testFilter()
/cts/tests/tests/graphics/src/android/graphics/cts/
DColorSpaceTest.java409 float[] source = { 0.75f, 0.5f, 0.25f }; in testRGBtoXYZ() local
412 float[] r1 = cs.toXyz(source[0], source[1], source[2]); in testRGBtoXYZ()
415 assertArrayNotEquals(source, r1, 1e-5f); in testRGBtoXYZ()
418 float[] r3 = { source[0], source[1], source[2] }; in testRGBtoXYZ()
428 float[] source = { 0.3012f, 0.2679f, 0.0840f }; in testXYZtoRGB() local
431 float[] r1 = cs.fromXyz(source[0], source[1], source[2]); in testXYZtoRGB()
434 assertArrayNotEquals(source, r1, 1e-5f); in testXYZtoRGB()
437 float[] r3 = { source[0], source[1], source[2] }; in testXYZtoRGB()
474 float[] source = { 1.0f, 0.5f, 0.0f }; in testConnector() local
477 float[] r1 = connector.transform(source[0], source[1], source[2]); in testConnector()
[all …]
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DSynchronousPixelCopy.java41 public int request(Surface source, Bitmap dest) { in request() argument
43 PixelCopy.request(source, dest, this, sHandler); in request()
48 public int request(Surface source, Rect srcRect, Bitmap dest) { in request() argument
50 PixelCopy.request(source, srcRect, dest, this, sHandler); in request()
55 public int request(SurfaceView source, Bitmap dest) { in request() argument
57 PixelCopy.request(source, dest, this, sHandler); in request()
62 public int request(SurfaceView source, Rect srcRect, Bitmap dest) { in request() argument
64 PixelCopy.request(source, srcRect, dest, this, sHandler); in request()
69 public int request(Window source, Bitmap dest) { in request() argument
71 PixelCopy.request(source, dest, this, sHandler); in request()
[all …]
DFileCopyHelper.java63 InputStream source = mContext.getResources().openRawResource(resId); in copy() local
65 copyFile(source, target); in copy()
71 InputStream source = mContext.getResources().openRawResource(resId); in copyToExternalStorage() local
73 copyFile(source, target); in copyToExternalStorage()
76 private void copyFile(InputStream source, OutputStream target) throws IOException { in copyFile() argument
79 for (int len = source.read(buffer); len > 0; len = source.read(buffer)) { in copyFile()
83 if (source != null) { in copyFile()
84 source.close(); in copyFile()
DIBinderParcelable.java25 public IBinderParcelable(IBinder source) { in IBinderParcelable() argument
26 binder = source; in IBinderParcelable()
40 public IBinderParcelable createFromParcel(Parcel source) {
41 return new IBinderParcelable(source);
49 private IBinderParcelable(Parcel source) { in IBinderParcelable() argument
50 binder = source.readStrongBinder(); in IBinderParcelable()
/cts/tests/tests/view/src/android/view/cts/
DAbsSavedStateTest.java64 Parcel source = Parcel.obtain(); in testConstructor() local
65 source.writeParcelable(superState, 0); in testConstructor()
66 source.setDataPosition(0); in testConstructor()
67 s = new AbsSavedStateImpl(source, AbsSavedStateImpl.class.getClassLoader()); in testConstructor()
70 source = Parcel.obtain(); in testConstructor()
71 s = new AbsSavedStateImpl(source); in testConstructor()
74 source = Parcel.obtain(); in testConstructor()
75 source.writeParcelable(superState, 0); in testConstructor()
76 source.setDataPosition(0); in testConstructor()
77 s = new AbsSavedStateImpl(source, AbsSavedStateImpl.class.getClassLoader()); in testConstructor()
[all …]
DView_BaseSavedStateTest.java63 Parcel source = Parcel.obtain(); in testConstructors() local
64 source.writeParcelable(superState, 0); in testConstructors()
65 source.setDataPosition(0); in testConstructors()
66 s = new BaseSavedState(source); in testConstructors()
70 source = Parcel.obtain(); in testConstructors()
71 source.writeParcelable(superState, 0); in testConstructors()
72 source.setDataPosition(0); in testConstructors()
73 s = new BaseSavedState(source, loader); in testConstructors()
/cts/tests/leanbackjank/src/android/leanbackjank/cts/
DCtsJankTestBase.java36 private void printIntValueWithKey(String source, Bundle metrics, String key, in printIntValueWithKey() argument
41 … mLog.addValue(source, formatKeyForTestMetrics(key), metrics.getInt(key), resultType, resultUnit); in printIntValueWithKey()
44 private void printDoubleValueWithKey(String source, Bundle metrics, String key, in printDoubleValueWithKey() argument
49 mLog.addValue(source, formatKeyForTestMetrics(key), metrics.getDouble(key), resultType, in printDoubleValueWithKey()
59 String source = String.format("%s#%s", getClass().getCanonicalName(), getName()); in afterTest() local
60 printDoubleValueWithKey(source, metrics, WindowContentFrameStatsMonitor.KEY_AVG_FPS, in afterTest()
62 printDoubleValueWithKey(source, metrics, in afterTest()
65 printIntValueWithKey(source, metrics, WindowContentFrameStatsMonitor.KEY_MAX_NUM_JANKY, in afterTest()
71 printDoubleValueWithKey(source, metrics, GfxMonitor.KEY_AVG_NUM_JANKY, in afterTest()
73 printDoubleValueWithKey(source, metrics, GfxMonitor.KEY_AVG_FRAME_TIME_90TH_PERCENTILE, in afterTest()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DHtmlTest.java55 final String source = "<b>hello</b>"; in testSingleTagOnWhileString() local
57 Spanned spanned = Html.fromHtml(source); in testSingleTagOnWhileString()
59 spanned = Html.fromHtml(source, null, null); in testSingleTagOnWhileString()
78 final String source = "Hello <b>b<i>bi</b>i</i>"; in testBadHtml() local
80 Spanned spanned = Html.fromHtml(source); in testBadHtml()
82 spanned = Html.fromHtml(source, null, null); in testBadHtml()
97 final String source = "&copy; &gt; &lt"; in testSymbols() local
100 String spanned = Html.fromHtml(source).toString(); in testSymbols()
102 spanned = Html.fromHtml(source, null, null).toString(); in testSymbols()
394 String source = String.format("Hello <%s>struck</%s> world", tag, tag); in testMarkupFromHtml() local
[all …]
DAlteredCharSequenceTest.java100 CharSequence source = SOURCE_STR; in testLength() local
102 source = source + "a"; in testLength()
103 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testLength()
104 assertEquals(source.length(), mAlteredCharSequence.length()); in testLength()
112 CharSequence source = SOURCE_STR; in testMake() local
113 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testMake()
115 assertEquals(source.toString(), mAlteredCharSequence.toString()); in testMake()
130 CharSequence source = SOURCE_STR; in testSubSequence() local
131 mAlteredCharSequence = AlteredCharSequence.make(source, sub, 0, sub.length); in testSubSequence()
145 CharSequence source = SOURCE_STR; in testToString() local
[all …]
DStaticLayoutLineBreakingTest.java107 private static StaticLayout getStaticLayout(CharSequence source, int width) { in getStaticLayout() argument
108 return new StaticLayout(source, mTextPaint, width, ALIGN, SPACE_MULTI, SPACE_ADD, false); in getStaticLayout()
111 private static int[] getBreaks(CharSequence source) { in getBreaks() argument
112 return getBreaks(source, WIDTH); in getBreaks()
115 private static int[] getBreaks(CharSequence source, int width) { in getBreaks() argument
116 StaticLayout staticLayout = getStaticLayout(source, width); in getBreaks()
125 private static void debugLayout(CharSequence source, StaticLayout staticLayout) { in debugLayout() argument
128 Log.i("SLLBTest", "\"" + source.toString() + "\": " + in debugLayout()
134 lineEnd + "]\t" + source.subSequence(lineStart, lineEnd)); in debugLayout()
139 private static void layout(CharSequence source, int[] breaks) { in layout() argument
[all …]
DInputFilter_LengthFilterTest.java36 CharSequence source; in testFilter() local
46 source = "abc"; in testFilter()
50 dest.insert(1, source); in testFilter()
54 dest.replace(5, 8, source); in testFilter()
DEditable_FactoryTest.java38 CharSequence source = "abc"; in testNewEditable() local
40 Editable expected = new SpannableStringBuilder(source); in testNewEditable()
43 Editable actual = mFactory.newEditable(source); in testNewEditable()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DAudioRecordHelper.java29 private final int source; field in AudioRecordHelper
39 for (int source : SOURCE) { in AudioRecordHelper()
42 AudioRecord testAudioRecord = new AudioRecord(source, rate, CHANNEL, ENCODING, in AudioRecordHelper()
47 tmpSource = source; in AudioRecordHelper()
57 source = tmpSource; in AudioRecordHelper()
59 + source + " (VOICE_RECOGNITION = 6 , MIC = 1)"); in AudioRecordHelper()
76 audioRecord = new AudioRecord(source, sampleRate, CHANNEL, ENCODING, bufferSize); in start()
128 return source; in getAudioSource()
/cts/hostsidetests/appsecurity/test-apps/EphemeralTestApp/util/src/com/android/cts/util/
DTestResult.java102 public TestResult createFromParcel(Parcel source) {
103 return new TestResult(source);
110 private TestResult(Parcel source) { in TestResult() argument
111 mPackageName = source.readString(); in TestResult()
112 mComponentName = source.readString(); in TestResult()
113 mMethodName = source.readString(); in TestResult()
114 mStatus = source.readString(); in TestResult()
115 mException = source.readString(); in TestResult()
116 mInstantAppPackageInfoExposed = source.readBoolean(); in TestResult()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DBitmapDrawableTest.java130 InputStream source = mContext.getResources().openRawResource(R.raw.testimage); in testAccessGravity() local
131 BitmapDrawable bitmapDrawable = new BitmapDrawable(source); in testAccessGravity()
147 Bitmap source = BitmapFactory.decodeResource(mContext.getResources(), R.raw.testimage); in testAccessMipMap() local
148 BitmapDrawable bitmapDrawable = new BitmapDrawable(source); in testAccessMipMap()
151 assertTrue(source.hasMipMap()); in testAccessMipMap()
154 assertFalse(source.hasMipMap()); in testAccessMipMap()
159 InputStream source = mContext.getResources().openRawResource(R.raw.testimage); in testSetAntiAlias() local
160 BitmapDrawable bitmapDrawable = new BitmapDrawable(source); in testSetAntiAlias()
173 InputStream source = mContext.getResources().openRawResource(R.raw.testimage); in testSetFilterBitmap() local
174 BitmapDrawable bitmapDrawable = new BitmapDrawable(source); in testSetFilterBitmap()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/
Dsetelementat.rs34 int source = 10;
37 rsSetElementAt(array, &source, i);
43 int source = 10;
47 rsSetElementAt(array, &source, xtemp, y);
/cts/tests/tests/rscpp/librscpptest/
Dsetelementat.rs33 int source = 10;
36 rsSetElementAt(array, &source, i);
42 int source = 10;
46 rsSetElementAt(array, &source, xtemp, y);
/cts/tests/tests/media/src/android/media/cts/
DMediaMuxerTest.java60 int source = R.raw.video_176x144_3gp_h263_300kbps_25fps_aac_stereo_128kbps_11025hz; in testVideoAudio() local
63 cloneAndVerify(source, outputFile, 2, 90, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4); in testVideoAudio()
67 int source = R.raw.video_176x144_h264_408kbps_30fps_352x288_h264_122kbps_30fps; in testDualVideoTrack() local
70 cloneAndVerify(source, outputFile, 2, 90, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4); in testDualVideoTrack()
74 int source = R.raw.audio_aac_mono_70kbs_44100hz_aac_mono_70kbs_44100hz; in testDualAudioTrack() local
77 cloneAndVerify(source, outputFile, 2, 90, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4); in testDualAudioTrack()
81 int source = R.raw.video_h264_30fps_video_h264_30fps_aac_44100hz_aac_44100hz; in testDualVideoAndAudioTrack() local
84 cloneAndVerify(source, outputFile, 4, 90, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4); in testDualVideoAndAudioTrack()
91 int source = in testVideoAudioMedatadata() local
95 cloneAndVerify(source, outputFile, 3, 90, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4); in testVideoAudioMedatadata()
[all …]
/cts/tools/dex-tools/test/dex/reader/util/
DJavaSourceToDexUtil.java43 public dex.structure.DexFile getFrom(JavaSource source) throws IOException{ in getFrom() argument
44 return getAllFrom(Collections.singleton(source)); in getFrom()
47 public dex.structure.DexFile getFrom(JavaSource... source) throws IOException{ in getFrom() argument
48 return getAllFrom(new HashSet<JavaSource>(Arrays.asList(source))); in getFrom()
86 public Set<MemoryByteCode> compileToByteCode(Set<JavaSource> source) { in compileToByteCode() argument
94 .asList(new String[] {"-classpath", "."}), null, source); in compileToByteCode()
/cts/tests/jank/src/android/jank/cts/
DCtsJankTestBase.java36 String source = String.format("%s#%s", getClass().getCanonicalName(), getName()); in afterTest() local
37 mLog.addValue(source, "frame_fps", in afterTest()
40 mLog.addValue(source, "frame_max_frame_duration", in afterTest()
43 mLog.addValue(source, "frame_max_jank", in afterTest()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hce/
DCommandApdu.java31 public CommandApdu createFromParcel(Parcel source) {
32 String apdu = source.readString();
33 boolean reachable = source.readInt() != 0 ? true : false;
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/return_object/d/
DTestStubs.d15 .source TestStubs.java
18 .source TestStubs.java
29 .source TestStubs.java
39 .source TestStubs.java
50 .source TestStubs.java
/cts/common/util/src/com/android/compatibility/common/util/
DReportLog.java64 Metric(String source, String message, double value, ResultType type, ResultUnit unit) { in Metric() argument
65 this(source, message, new double[] { value }, type, unit); in Metric()
79 Metric(String source, String message, double[] values, ResultType type, ResultUnit unit) { in Metric() argument
80 int sourceLength = source.length(); in Metric()
83 mSource = source.substring(sourceLength - MAX_SOURCE_LENGTH); in Metric()
85 mSource = source; in Metric()
143 String source = parser.getAttributeValue(null, SOURCE_ATTR); in parse() local
161 return new Metric(source, message, values, type, unit); in parse()
184 public void addValues(String source, String message, double[] values, ResultType type, in addValues() argument
199 public void addValue(String source, String message, double value, ResultType type, in addValue() argument

12345678910>>...92