Home
last modified time | relevance | path

Searched refs:clip (Results 1 – 23 of 23) sorted by relevance

/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/
DUriGrantsTest.java63 ClipData clip = new ClipData("foo", new String[] { "foo/bar" }, in makeMultiClipData() local
65 clip.addItem(new ClipData.Item(grantClip2Uri)); in makeMultiClipData()
69 clip.addItem(new ClipData.Item(new Intent(Intent.ACTION_VIEW, grantClip3Uri))); in makeMultiClipData()
73 clip.addItem(new ClipData.Item(intent)); in makeMultiClipData()
77 clip.addItem(new ClipData.Item(intent)); in makeMultiClipData()
78 return clip; in makeMultiClipData()
89 final ClipData clip = makeSingleClipData(target); in testGrantPersistableUriPermission() local
92 assertReadingClipNotAllowed(clip, "reading should have failed"); in testGrantPersistableUriPermission()
93 assertWritingClipNotAllowed(clip, "writing should have failed"); in testGrantPersistableUriPermission()
107 grantClipUriPermissionViaActivity(clip, Intent.FLAG_GRANT_READ_URI_PERMISSION in testGrantPersistableUriPermission()
[all …]
DUriGrantsClipboardTest.java54 final ClipData clip = makeSingleClipData(target); in testClipboardWithPermission() local
57 assertReadingClipNotAllowed(clip); in testClipboardWithPermission()
58 assertWritingClipNotAllowed(clip); in testClipboardWithPermission()
66 setPrimaryClip(clip); in testClipboardWithPermission()
73 assertClipDataEquals(clip, clipFromClipboard); in testClipboardWithPermission()
88 final ClipData clip = makeSingleClipData(target); in testClipboardWithoutPermission() local
91 assertReadingClipNotAllowed(clip); in testClipboardWithoutPermission()
92 assertWritingClipNotAllowed(clip); in testClipboardWithoutPermission()
96 setPrimaryClip(clip); in testClipboardWithoutPermission()
97 fail("Unexpected ability to put protected data " + clip + " on clipboard!"); in testClipboardWithoutPermission()
DUtils.java55 static void grantClipUriPermissionViaActivity(ClipData clip, int mode) { in grantClipUriPermissionViaActivity() argument
56 grantClipUriPermission(clip, mode, ACTION_START_ACTIVITY); in grantClipUriPermissionViaActivity()
59 static void grantClipUriPermissionViaActivities(ClipData clip, int mode) { in grantClipUriPermissionViaActivities() argument
60 grantClipUriPermission(clip, mode, ACTION_START_ACTIVITIES); in grantClipUriPermissionViaActivities()
63 static void grantClipUriPermissionViaService(ClipData clip, int mode) { in grantClipUriPermissionViaService() argument
64 grantClipUriPermission(clip, mode, ACTION_START_SERVICE); in grantClipUriPermissionViaService()
67 private static void grantClipUriPermission(ClipData clip, int mode, String action) { in grantClipUriPermission() argument
69 if (clip.getItemCount() == 1) { in grantClipUriPermission()
70 grantIntent.setData(clip.getItemAt(0).getUri()); in grantClipUriPermission()
72 grantIntent.setClipData(clip); in grantClipUriPermission()
[all …]
DAsserts.java43 static void assertAccess(ClipData clip, int mode) { in assertAccess() argument
44 for (int i = 0; i < clip.getItemCount(); i++) { in assertAccess()
45 ClipData.Item item = clip.getItemAt(i); in assertAccess()
93 static void assertReadingClipNotAllowed(ClipData clip) { in assertReadingClipNotAllowed() argument
94 assertReadingClipNotAllowed(clip, null); in assertReadingClipNotAllowed()
97 static void assertReadingClipNotAllowed(ClipData clip, String msg) { in assertReadingClipNotAllowed() argument
98 for (int i=0; i<clip.getItemCount(); i++) { in assertReadingClipNotAllowed()
99 ClipData.Item item = clip.getItemAt(i); in assertReadingClipNotAllowed()
197 static void assertWritingClipNotAllowed(ClipData clip) { in assertWritingClipNotAllowed() argument
198 assertWritingClipNotAllowed(clip, null); in assertWritingClipNotAllowed()
[all …]
DUriGrantsResultTest.java157 private Intent buildIntent(ClipData clip, int mode) { in buildIntent() argument
161 intent.putExtra(Intent.EXTRA_TEXT, clip); in buildIntent()
/cts/tests/tests/widget/src/android/widget/cts/
DTextViewReceiveContentTest.java194 ClipData clip = ClipData.newPlainText("test", "y"); in testDefaultReceiver_onReceive_text() local
195 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, 0); in testDefaultReceiver_onReceive_text()
208 ClipData clip = ClipData.newPlainText("test", ssb); in testDefaultReceiver_onReceive_styledText() local
210 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, 0); in testDefaultReceiver_onReceive_styledText()
222 ClipData clip = ClipData.newPlainText("test", "y"); in testDefaultReceiver_onReceive_text_convertToPlainText() local
223 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, FLAG_CONVERT_TO_PLAIN_TEXT); in testDefaultReceiver_onReceive_text_convertToPlainText()
236 ClipData clip = ClipData.newPlainText("test", ssb); in testDefaultReceiver_onReceive_styledText_convertToPlainText() local
238 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, FLAG_CONVERT_TO_PLAIN_TEXT); in testDefaultReceiver_onReceive_styledText_convertToPlainText()
250 ClipData clip = ClipData.newHtmlText("test", "*y*", "<b>y</b>"); in testDefaultReceiver_onReceive_html() local
251 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, 0); in testDefaultReceiver_onReceive_html()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DClipDataTest.java43 ClipData clip = ClipData.newPlainText(null, "secret-text"); in testToString_text() local
44 String clipStr = clip.toString(); in testToString_text()
51 ClipData clip = ClipData.newHtmlText(null, "secret-text", "secret-html"); in testToString_html() local
52 String clipStr = clip.toString(); in testToString_html()
59 ClipData clip = ClipData.newRawUri(null, Uri.parse("content://secret")); in testToString_uri() local
60 String clipStr = clip.toString(); in testToString_uri()
73 ClipData clip = new ClipData(description, new ClipData.Item("secret-text")); in testToString_metadata() local
74 String clipStr = clip.toString(); in testToString_metadata()
81 ClipData clip = ClipData.newPlainText(null, "secret-one"); in testToString_multipleItems() local
82 clip.addItem(new ClipData.Item("secret-two")); in testToString_multipleItems()
[all …]
DClipboardManagerListenerActivity.java46 public synchronized void setPrimaryClip(ClipData clip) { in setPrimaryClip() argument
47 mClipboardManager.setPrimaryClip(clip); in setPrimaryClip()
/cts/tests/tests/view/receivecontent/src/android/view/cts/receivecontent/
DContentInfoTest.java60 ClipData clip = ClipData.newPlainText("", "Hello"); in testPartition_multipleItems() local
61 clip.addItem(new ClipData.Item("Hi", "<b>Salut</b>")); in testPartition_multipleItems()
62 clip.addItem(new ClipData.Item(sampleUri)); in testPartition_multipleItems()
63 ContentInfo payload = new ContentInfo.Builder(clip, SOURCE_CLIPBOARD) in testPartition_multipleItems()
99 ClipData clip = ClipData.newPlainText("", "Hello"); in testPartition_singleItem() local
100 ContentInfo payload = new ContentInfo.Builder(clip, SOURCE_CLIPBOARD) in testPartition_singleItem()
118 ClipData clip = ClipData.newPlainText("", "Hello"); in testBuilder_copy() local
119 ContentInfo original = new ContentInfo.Builder(clip, SOURCE_CLIPBOARD) in testBuilder_copy()
164 ClipData clip = ClipData.newPlainText("", "Hello"); in testReleasePermissions() local
165 ContentInfo payload = new ContentInfo.Builder(clip, SOURCE_CLIPBOARD).build(); in testReleasePermissions()
[all …]
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/
DCopyPasteTest.java57 ClipData clip = ClipData.newPlainText(""/*label*/, INITIAL_TEXT); in testCanReadAcrossProfiles() local
58 mClipboard.setPrimaryClip(clip); in testCanReadAcrossProfiles()
67 ClipData clip = ClipData.newPlainText(""/*label*/, INITIAL_TEXT); in testCannotReadAcrossProfiles() local
68 mClipboard.setPrimaryClip(clip); in testCannotReadAcrossProfiles()
85 ClipData clip = mClipboard.getPrimaryClip(); in getTextFromClipboard() local
86 if (clip == null) { in getTextFromClipboard()
89 ClipData.Item item = clip.getItemAt(0); in getTextFromClipboard()
/cts/tests/tests/view/src/android/view/cts/
DViewReceiveContentTest.java179 ClipData clip = new ClipData( in testOnDragEvent_withOnReceiveContentListener() local
182 when(dragEvent.getClipData()).thenReturn(clip); in testOnDragEvent_withOnReceiveContentListener()
184 verify(mReceiver).onReceiveContent(same(view), contentEq(clip, SOURCE_DRAG_AND_DROP, 0)); in testOnDragEvent_withOnReceiveContentListener()
199 ClipData clip = new ClipData( in testOnDragEvent_withOnReceiveContentListener_noneOfTheContentAccepted() local
202 when(dragEvent.getClipData()).thenReturn(clip); in testOnDragEvent_withOnReceiveContentListener_noneOfTheContentAccepted()
204 verify(mReceiver).onReceiveContent(same(view), contentEq(clip, SOURCE_DRAG_AND_DROP, 0)); in testOnDragEvent_withOnReceiveContentListener_noneOfTheContentAccepted()
219 ClipData clip = new ClipData( in testOnDragEvent_withOnReceiveContentListener_someOfTheContentAccepted() local
222 when(dragEvent.getClipData()).thenReturn(clip); in testOnDragEvent_withOnReceiveContentListener_someOfTheContentAccepted()
224 verify(mReceiver).onReceiveContent(same(view), contentEq(clip, SOURCE_DRAG_AND_DROP, 0)); in testOnDragEvent_withOnReceiveContentListener_someOfTheContentAccepted()
228 ClipData clip = new ClipData( in sampleUriPayload() local
[all …]
/cts/tests/pdf/src/android/graphics/pdf/cts/
DPdfRendererTest.java301 Rect clip = new Rect(20, 20, A4_WIDTH_PTS - 20, A4_HEIGHT_PTS - 20); in render45degreeRotationTranslationAndScaleAndClip() local
303 renderAndCompare(A4_WIDTH_PTS, A4_HEIGHT_PTS, A4_PORTRAIT, clip, transform, in render45degreeRotationTranslationAndScaleAndClip()
315 Rect clip = new Rect(20, 20, A4_WIDTH_PTS - 50, A4_HEIGHT_PTS - 50); in renderWithClip() local
316 renderAndCompare(A4_WIDTH_PTS, A4_HEIGHT_PTS, A4_PORTRAIT, clip, null, in renderWithClip()
322 Rect clip = new Rect(A4_WIDTH_PTS / 2, A4_HEIGHT_PTS / 2, A4_WIDTH_PTS / 2, in renderWithAllClipped() local
324 renderAndCompare(A4_WIDTH_PTS, A4_HEIGHT_PTS, A4_PORTRAIT, clip, null, in renderWithAllClipped()
330 Rect clip = new Rect(0, 0, A4_WIDTH_PTS + 20, A4_HEIGHT_PTS + 20); in renderWithBadLowerCornerOfClip() local
332 () -> renderWithTransform(A4_WIDTH_PTS, A4_HEIGHT_PTS, A4_PORTRAIT, clip, null, in renderWithBadLowerCornerOfClip()
338 Rect clip = new Rect(-20, -20, A4_WIDTH_PTS, A4_HEIGHT_PTS); in renderWithBadUpperCornerOfClip() local
340 () -> renderWithTransform(A4_WIDTH_PTS, A4_HEIGHT_PTS, A4_PORTRAIT, clip, null, in renderWithBadUpperCornerOfClip()
/cts/tests/autofillservice/src/android/autofillservice/cts/inline/
DInlineAugmentedContentTest.java192 ClipData clip = ClipData.newPlainText(suggestion, suggestion);
193 return suggestion(targetFieldId, clip);
198 ClipData clip = new ClipData(suggestionTitle,
200 return suggestion(targetFieldId, clip);
244 ClipData clip = payload.getClip();
245 for (int i = 0; i < clip.getItemCount(); i++) {
249 ClipData.Item item = clip.getItemAt(i);
/cts/hostsidetests/videoencodingminimum/src/android/videoqualityfloor/cts/
DCtsVideoQualityFloorHostTest.java157 for (String clip : testClips) { in testEncoding()
158 LogUtil.CLog.d("downloading " + clip); in testEncoding()
159 downloadFile(clip, destination); in testEncoding()
177 for (String clip : testClips) { in testEncoding()
178 clipArgs= clipArgs + " " + clip; in testEncoding()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
DIntrinsicColorMatrix.java38 boolean clip) { in subtest() argument
59 if (clip) { in subtest()
68 if (clip) { in subtest()
82 boolean clip) { in test() argument
134 dtin, i, dtout, j, clip); in test()
DIntrinsicHistogram.java62 private void testNorm(int inVSize, int outVSize, int w, int h, boolean clip) { in testNorm() argument
76 if (clip) { in testNorm()
185 private void testDot(int inVSize, int w, int h, boolean clip) { in testDot() argument
204 if (clip) { in testDot()
/cts/tests/tests/transition/src/android/transition/cts/
DChangeBoundsTest.java242 redAndGreen.red.clip != null in waitForClipIsMiddle()
243 && redAndGreen.green.clip != null in waitForClipIsMiddle()
244 && redAndGreen.red.clip.width() > middleSize in waitForClipIsMiddle()
245 && redAndGreen.red.clip.height() > middleSize in waitForClipIsMiddle()
246 && redAndGreen.green.clip.width() > middleSize in waitForClipIsMiddle()
247 && redAndGreen.green.clip.height() > middleSize in waitForClipIsMiddle()
282 return start.red.clip.width() < smallSize + errorPx in isRestartingClip()
283 && start.green.clip.width() < smallSize + errorPx; in isRestartingClip()
287 return start.red.clip.width() > largeSize - errorPx in isRestartingClip()
288 && start.green.clip.width() > largeSize - errorPx; in isRestartingClip()
[all …]
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/
DMockJobService.java82 ClipData clip = params.getClipData(); in onStartJob() local
83 if (clip != null) { in onStartJob()
84 permCheckRead = checkUriPermission(clip.getItemAt(0).getUri(), Process.myPid(), in onStartJob()
86 permCheckWrite = checkUriPermission(clip.getItemAt(0).getUri(), Process.myPid(), in onStartJob()
/cts/tests/JobScheduler/src/android/jobscheduler/
DMockJobService.java82 ClipData clip = params.getClipData(); in onStartJob() local
83 if (clip != null) { in onStartJob()
84 permCheckRead = checkUriPermission(clip.getItemAt(0).getUri(), Process.myPid(), in onStartJob()
86 permCheckWrite = checkUriPermission(clip.getItemAt(0).getUri(), Process.myPid(), in onStartJob()
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/
DIntentReceiverActivity.java86 ClipData clip = ClipData.newPlainText("", text); in onCreate() local
89 clipboard.setPrimaryClip(clip); in onCreate()
/cts/tests/tests/graphics/src/android/graphics/cts/
DRegionTest.java1357 Region clip = new Region(0, 0, 10, 10); in testGetBoundaryPath1() local
1360 assertTrue(mRegion.setPath(path, clip)); in testGetBoundaryPath1()
1390 Region clip = new Region(); in testSetPath() local
1392 assertFalse(mRegion.setPath(path, clip)); in testSetPath()
1396 clip = new Region(0, 0, 10, 10); in testSetPath()
1397 assertFalse(mRegion.setPath(path, clip)); in testSetPath()
1400 clip = new Region(); in testSetPath()
1403 assertFalse(mRegion.setPath(path, clip)); in testSetPath()
1406 clip = new Region(); in testSetPath()
1408 clip = new Region(0, 0, 10, 10); in testSetPath()
[all …]
/cts/apps/CameraITS/utils/
Dimage_processing_utils.py228 flt = numpy.dot(flt.reshape(w * h, 3), ccm_yuv_to_rgb.T).clip(0, 255)
435 img = (((img.reshape(h, w, 3) - black_levels) * scale) * gains).clip(0.0, 1.0)
438 img.reshape(w * h, 3), ccm.T).reshape(h, w, 3).clip(0.0, 1.0)
/cts/tests/autofillservice/src/android/autofillservice/cts/unittests/
DDatasetTest.java239 ClipData clip = ClipData.newIntent("", new Intent()); in testBuilder_setContentWithIntentIsNotAllowed() local
240 assertThrows(IllegalArgumentException.class, () -> builder.setContent(mId, clip)); in testBuilder_setContentWithIntentIsNotAllowed()