Home
last modified time | relevance | path

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

12

/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.java203 ClipData clip = ClipData.newPlainText("test", "y"); in testDefaultReceiver_onReceive_text() local
204 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, 0); in testDefaultReceiver_onReceive_text()
217 ClipData clip = ClipData.newPlainText("test", ssb); in testDefaultReceiver_onReceive_styledText() local
219 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, 0); in testDefaultReceiver_onReceive_styledText()
231 ClipData clip = ClipData.newPlainText("test", "y"); in testDefaultReceiver_onReceive_text_convertToPlainText() local
232 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, FLAG_CONVERT_TO_PLAIN_TEXT); in testDefaultReceiver_onReceive_text_convertToPlainText()
245 ClipData clip = ClipData.newPlainText("test", ssb); in testDefaultReceiver_onReceive_styledText_convertToPlainText() local
247 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, FLAG_CONVERT_TO_PLAIN_TEXT); in testDefaultReceiver_onReceive_styledText_convertToPlainText()
259 ClipData clip = ClipData.newHtmlText("test", "*y*", "<b>y</b>"); in testDefaultReceiver_onReceive_html() local
260 onReceive(mDefaultReceiver, clip, SOURCE_CLIPBOARD, 0); in testDefaultReceiver_onReceive_html()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DClipDataTest.java62 final ClipData.Item clip = new ClipData.Item.Builder() in testBuilder() local
69 assertEquals(clip.getHtmlText(), htmlText); in testBuilder()
70 assertEquals(clip.getIntentSender(), sender); in testBuilder()
71 assertEquals(clip.getText(), text); in testBuilder()
72 assertEquals(clip.getUri(), uri); in testBuilder()
73 assertEquals(clip.getIntent(), intent); in testBuilder()
79 ClipData clip = ClipData.newPlainText(null, "secret-text"); in testToString_text() local
80 String clipStr = clip.toString(); in testToString_text()
87 ClipData clip = ClipData.newHtmlText(null, "secret-text", "secret-html"); in testToString_html() local
88 String clipStr = clip.toString(); in testToString_html()
[all …]
DClipboardManagerListenerActivity.java46 public synchronized void setPrimaryClip(ClipData clip) { in setPrimaryClip() argument
47 mClipboardManager.setPrimaryClip(clip); in setPrimaryClip()
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/
DCopyPasteTest.java51 ClipData clip = ClipData.newPlainText(""/*label*/, INITIAL_TEXT); in testCopyInitialText() local
52 mClipboard.setPrimaryClip(clip); in testCopyInitialText()
57 ClipData clip = ClipData.newPlainText(""/*label*/, NEW_TEXT); in testCopyNewText() local
58 mClipboard.setPrimaryClip(clip); in testCopyNewText()
73 ClipData clip = mClipboard.getPrimaryClip(); in getTextFromClipboard() local
74 if (clip == null) { in getTextFromClipboard()
77 ClipData.Item item = clip.getItemAt(0); in getTextFromClipboard()
/cts/tests/tests/view/receivecontent/src/android/view/cts/receivecontent/
DContentInfoTest.java67 ClipData clip = ClipData.newPlainText("", "Hello"); in testPartition_multipleItems() local
68 clip.addItem(new ClipData.Item("Hi", "<b>Salut</b>")); in testPartition_multipleItems()
69 clip.addItem(new ClipData.Item(sampleUri)); in testPartition_multipleItems()
71 new ContentInfo.Builder(clip, SOURCE_CLIPBOARD) in testPartition_multipleItems()
107 ClipData clip = ClipData.newPlainText("", "Hello"); in testPartition_singleItem() local
109 new ContentInfo.Builder(clip, SOURCE_CLIPBOARD) in testPartition_singleItem()
127 ClipData clip = ClipData.newPlainText("", "Hello"); in testBuilder_copy() local
129 new ContentInfo.Builder(clip, SOURCE_CLIPBOARD) in testBuilder_copy()
176 ClipData clip = ClipData.newPlainText("", "Hello"); in testReleasePermissions() local
177 ContentInfo payload = new ContentInfo.Builder(clip, SOURCE_CLIPBOARD).build(); in testReleasePermissions()
[all …]
/cts/tests/tests/mediacujtest/smalltest/
DREADME.md13 The original clip is taken from http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Fo…
15 The clip is downloaded from above link and resampled according to the test requirements using ffmpe…
21 The original clip is taken from http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Fo…
23 The clip is downloaded from above link and resampled according to the test requirements using ffmpe…
29 The original clip is taken from http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Fo…
31 The clip is downloaded from above link and resampled according to the test requirements using ffmpe…
36 The original clip is taken from http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Fo…
38 The clip is downloaded from above link and resampled according to the test requirements using ffmpe…
/cts/tests/pdf/module/src/android/graphics/pdf/cts/module/
DCommonRendererTest.java145 Rect clip = new Rect(20, 20, A4_WIDTH_PTS - 20, A4_HEIGHT_PTS - 20); in render45degreeRotationTranslationAndScaleAndClip() local
147 assertUsingRenderAndCompare(A4_WIDTH_PTS, A4_HEIGHT_PTS, clip, transform); in render45degreeRotationTranslationAndScaleAndClip()
157 Rect clip = new Rect(20, 20, A4_WIDTH_PTS - 50, A4_HEIGHT_PTS - 50); in renderWithClip() local
159 assertUsingRenderAndCompare(A4_WIDTH_PTS, A4_HEIGHT_PTS, clip, null); in renderWithClip()
164 Rect clip = new Rect(A4_WIDTH_PTS / 2, A4_HEIGHT_PTS / 2, A4_WIDTH_PTS / 2, in renderWithAllClipped() local
167 assertUsingRenderAndCompare(A4_WIDTH_PTS, A4_HEIGHT_PTS, clip, null); in renderWithAllClipped()
173 Rect clip = new Rect(0, 0, A4_WIDTH_PTS + 20, A4_HEIGHT_PTS + 20); in renderWithBadLowerCornerOfClip() local
175 assertException(clip, null, RenderParams.RENDER_MODE_FOR_DISPLAY); in renderWithBadLowerCornerOfClip()
181 Rect clip = new Rect(-20, -20, A4_WIDTH_PTS, A4_HEIGHT_PTS); in renderWithBadUpperCornerOfClip() local
183 assertException(clip, null, RenderParams.RENDER_MODE_FOR_DISPLAY); in renderWithBadUpperCornerOfClip()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DViewReceiveContentTest.java190 ClipData clip = new ClipData( in testOnDragEvent_withOnReceiveContentListener() local
193 when(dragEvent.getClipData()).thenReturn(clip); in testOnDragEvent_withOnReceiveContentListener()
195 verify(mReceiver).onReceiveContent(same(view), contentEq(clip, SOURCE_DRAG_AND_DROP, 0)); in testOnDragEvent_withOnReceiveContentListener()
210 ClipData clip = new ClipData( in testOnDragEvent_withOnReceiveContentListener_noneOfTheContentAccepted() local
213 when(dragEvent.getClipData()).thenReturn(clip); in testOnDragEvent_withOnReceiveContentListener_noneOfTheContentAccepted()
215 verify(mReceiver).onReceiveContent(same(view), contentEq(clip, SOURCE_DRAG_AND_DROP, 0)); in testOnDragEvent_withOnReceiveContentListener_noneOfTheContentAccepted()
230 ClipData clip = new ClipData( in testOnDragEvent_withOnReceiveContentListener_someOfTheContentAccepted() local
233 when(dragEvent.getClipData()).thenReturn(clip); in testOnDragEvent_withOnReceiveContentListener_someOfTheContentAccepted()
235 verify(mReceiver).onReceiveContent(same(view), contentEq(clip, SOURCE_DRAG_AND_DROP, 0)); in testOnDragEvent_withOnReceiveContentListener_someOfTheContentAccepted()
239 ClipData clip = new ClipData( in sampleUriPayload() local
[all …]
/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/autofillservice/src/android/autofillservice/cts/inline/
DInlineAugmentedContentTest.java204 ClipData clip = ClipData.newPlainText(suggestion, suggestion);
205 return suggestion(targetFieldId, clip);
210 ClipData clip = new ClipData(suggestionTitle,
212 return suggestion(targetFieldId, clip);
256 ClipData clip = payload.getClip();
257 for (int i = 0; i < clip.getItemCount(); i++) {
261 ClipData.Item item = clip.getItemAt(i);
/cts/tests/tests/virtualdevice/app/src/android/virtualdevice/streamedtestapp/
DClipboardTestActivity.java67 ClipData clip = intent.getParcelableExtra(EXTRA_CLIP_DATA, ClipData.class); in processAction() local
68 clipboardManager.setPrimaryClip(clip); in processAction()
/cts/tests/tests/app/test-apps/TestComponentCallerApp/src/android/app/cts/testcomponentcaller/
DTestInitialCallerActivity.java161 ClipData clip = intent.getClipData(); in getClipDataUri() local
162 if (clip == null || clip.getItemCount() == 0) { in getClipDataUri()
/cts/hostsidetests/mediapc/videoencodingquality/app/
DREADME.md2 …t CtsVideoEncodingQualityHostTestCases. The host side test sends an input clip and encoding config…
/cts/hostsidetests/videoencodingminimum/app/
DREADME.md2 …test CtsVideoQualityFloorHostTestCases. The host side test sends an input clip and encoding config…
/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/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/tests/JobScheduler/src/android/jobscheduler/
DMockJobService.java101 ClipData clip = params.getClipData(); in onStartJob() local
102 if (clip != null) { in onStartJob()
103 permCheckRead = checkUriPermission(clip.getItemAt(0).getUri(), Process.myPid(), in onStartJob()
105 permCheckWrite = checkUriPermission(clip.getItemAt(0).getUri(), Process.myPid(), in onStartJob()

12