/cts/hostsidetests/securitybulletin/test-apps/BUG-237291548/src/android/security/cts/BUG_237291548/ |
D | DeviceTest.java | 42 Set<String> mimeTypes = mPm.getMimeGroup(MIME_GROUP); in testExceedGroupLimit() local 43 assertEquals(mimeTypes.size(), 0); in testExceedGroupLimit() 45 mimeTypes.add("MIME" + i); in testExceedGroupLimit() 46 mPm.setMimeGroup(MIME_GROUP, mimeTypes); in testExceedGroupLimit() 48 mimeTypes = mPm.getMimeGroup(MIME_GROUP); in testExceedGroupLimit() 49 assertEquals(500, mimeTypes.size()); in testExceedGroupLimit() 50 mimeTypes.add("ONETOMANYMIME"); in testExceedGroupLimit() 51 mPm.setMimeGroup(MIME_GROUP, mimeTypes); in testExceedGroupLimit() 56 Set<String> mimeTypes = new HashSet<>(); in testExceedMimeLengthLimit() local 57 mimeTypes.add(new String(new char[64]).replace("\0", "MIME")); in testExceedMimeLengthLimit() [all …]
|
/cts/hostsidetests/packagemanager/dynamicmime/test/src/android/dynamicmime/testapp/assertions/ |
D | MimeGroupAssertions.java | 30 public abstract void assertMimeGroupInternal(String mimeGroup, Set<String> mimeTypes); in assertMimeGroupInternal() argument 32 public final void assertMimeGroup(String mimeGroup, String... mimeTypes) { in assertMimeGroup() argument 33 assertMimeGroupInternal(mimeGroup, new ArraySet<>(mimeTypes)); in assertMimeGroup() 44 public final void assertMatchedByMimeGroup(String mimeGroup, String... mimeTypes) { in assertMatchedByMimeGroup() argument 45 for (String mimeType: mimeTypes) { in assertMatchedByMimeGroup() 50 public final void assertNotMatchedByMimeGroup(String mimeGroup, String... mimeTypes) { in assertNotMatchedByMimeGroup() argument 51 for (String mimeType: mimeTypes) { in assertNotMatchedByMimeGroup() 82 public void assertMimeGroupInternal(String mimeGroup, Set<String> mimeTypes) { in noOp() 121 public void assertMimeGroupInternal(String mimeGroup, Set<String> mimeTypes) { 122 other.assertMimeGroupInternal(mimeGroup, mimeTypes); [all …]
|
D | AssertionsByIntentResolution.java | 63 public void assertMimeGroupInternal(String mimeGroup, Set<String> mimeTypes) { in assertMimeGroupInternal() argument 64 if (mimeTypes == null) { in assertMimeGroupInternal() 71 mimeTypes, getMimeGroup(mimeGroup, mimeTypes)); in assertMimeGroupInternal() 74 for (String mimeType: mimeTypes) { in assertMimeGroupInternal() 91 private Set<String> getMimeGroup(String mimeGroup, Set<String> mimeTypes) { in getMimeGroup() argument 92 IntentFilter filter = resolve(mContext, intentGroup(mimeGroup, mimeTypes)) in getMimeGroup() 105 private Intent intentGroup(String mimeGroup, Set<String> mimeTypes) { in intentGroup() argument 108 if (mimeTypes != null && !mimeTypes.isEmpty()) { in intentGroup() 109 intent.setType(mimeTypes.iterator().next()); in intentGroup()
|
D | AppAssertionsByGroupData.java | 35 String[] mimeTypes = mAppMimeGroups.get(mimeGroup); in getMimeGroup() local 36 return mimeTypes != null ? new ArraySet<>(mimeTypes) : null; in getMimeGroup()
|
D | AssertionsByGroupData.java | 40 public void assertMimeGroupInternal(String mimeGroup, Set<String> mimeTypes) { in assertMimeGroupInternal() argument 41 Assert.assertEquals(getMimeGroup(mimeGroup), mimeTypes); in assertMimeGroupInternal() local
|
/cts/hostsidetests/packagemanager/dynamicmime/test/src/android/dynamicmime/testapp/commands/ |
D | MimeGroupCommands.java | 35 void setMimeGroup(String mimeGroup, Set<String> mimeTypes); in setMimeGroup() argument 39 default void addMimeTypeToGroup(String mimeGroup, String... mimeTypes) { in addMimeTypeToGroup() argument 40 ArraySet<String> typesToAdd = new ArraySet<>(mimeTypes); in addMimeTypeToGroup() 48 default void removeMimeTypeFromGroup(String mimeGroup, String... mimeTypes) { in removeMimeTypeFromGroup() argument 49 ArraySet<String> typesToRemove = new ArraySet<>(mimeTypes); in removeMimeTypeFromGroup() 57 default void setMimeGroup(String mimeGroup, String... mimeTypes) { in setMimeGroup() argument 58 setMimeGroup(mimeGroup, new ArraySet<>(mimeTypes)); in setMimeGroup() 97 public void setMimeGroup(String mimeGroup, Set<String> mimeTypes) { in noOp()
|
D | TestAppCommands.java | 34 public void setMimeGroup(String mimeGroup, Set<String> mimeTypes) { in setMimeGroup() argument 35 mPM.setMimeGroup(mimeGroup, mimeTypes); in setMimeGroup()
|
D | AppCommands.java | 35 public void setMimeGroup(String mimeGroup, Set<String> mimeTypes) { in setMimeGroup() argument 36 mAppMimeGroups.set(mimeGroup, mimeTypes.toArray(new String[0])); in setMimeGroup()
|
/cts/hostsidetests/packagemanager/dynamicmime/app/src/android/dynamicmime/app/ |
D | AppMimeGroupsReceiver.java | 47 String[] mimeTypes = intent.getStringArrayExtra(EXTRA_MIMES); in onReceive() local 52 handleRequest(context, mimeGroup, mimeTypes, requestCode, response); in onReceive() 59 private void handleRequest(Context context, String mimeGroup, String[] mimeTypes, in handleRequest() argument 63 context.getPackageManager().setMimeGroup(mimeGroup, new ArraySet<>(mimeTypes)); in handleRequest() 74 Set<String> mimeTypes = context.getPackageManager().getMimeGroup(mimeGroup); in getMimeGroup() local 75 return mimeTypes != null ? mimeTypes.toArray(new String[0]) : null; in getMimeGroup()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ViewReceiveContentTest.java | 91 String[] mimeTypes = new String[] {"image/*", "video/mp4"}; in testOnReceiveContent_mimeTypes() local 92 view.setOnReceiveContentListener(mimeTypes, mReceiver); in testOnReceiveContent_mimeTypes() 93 assertThat(view.getReceiveContentMimeTypes()).isEqualTo(mimeTypes); in testOnReceiveContent_mimeTypes() 104 view.setOnReceiveContentListener(mimeTypes, null); in testOnReceiveContent_mimeTypes() 105 assertThat(view.getReceiveContentMimeTypes()).isEqualTo(mimeTypes); in testOnReceiveContent_mimeTypes() 127 String[] mimeTypes = new String[] {"image/*", "video/mp4"}; in testPerformReceiveContent() local 135 view.setOnReceiveContentListener(mimeTypes, mReceiver); in testPerformReceiveContent() 151 String[] mimeTypes = new String[] {"image/*", "video/mp4"}; in testOnReceiveContent() local 158 view.setOnReceiveContentListener(mimeTypes, mReceiver); in testOnReceiveContent() 178 String[] mimeTypes = new String[] {"text/*", "image/*", "video/mp4"}; in testOnDragEvent_withOnReceiveContentListener() local [all …]
|
/cts/hostsidetests/packagemanager/dynamicmime/test/src/android/dynamicmime/testapp/util/ |
D | AppMimeGroups.java | 55 public void set(String mimeGroup, String[] mimeTypes) { in set() argument 56 sendRequestAndAwait(mimeGroup, REQUEST_SET, mimeTypes); in set() 68 private Intent sendRequestAndAwait(String mimeGroup, int request, String[] mimeTypes) { in sendRequestAndAwait() argument 73 mContext.sendBroadcast(getRequestIntent(mimeGroup, mimeTypes, request)); in sendRequestAndAwait() 84 private Intent getRequestIntent(String mimeGroup, String[] mimeTypes, int request) { in getRequestIntent() argument 91 intent.putExtra(EXTRA_MIMES, mimeTypes); in getRequestIntent()
|
D | MimeGroupOperations.java | 50 public final void assertMimeGroupInternal(String mimeGroup, Set<String> mimeTypes) { in assertMimeGroupInternal() argument 51 mAssertions.assertMimeGroupInternal(mimeGroup, mimeTypes); in assertMimeGroupInternal() 55 public void setMimeGroup(String mimeGroup, Set<String> mimeTypes) { in setMimeGroup() argument 56 mCommands.setMimeGroup(mimeGroup, mimeTypes); in setMimeGroup()
|
/cts/tests/tests/content/HelloWorldApp/src_mime_group/com/example/helloworld/ |
D | MimeGroupReceiver.java | 45 final ArrayList<String> mimeTypes = intent.getStringArrayListExtra(EXTRA_MIME_TYPES); in onReceive() local 47 context.getPackageManager().setMimeGroup(mimeGroup, new ArraySet<>(mimeTypes)); in onReceive()
|
/cts/tests/tests/mimemap/src/android/content/type/cts/ |
D | MimeMapTest.java | 182 for (String before : mimeMap.mimeTypes()) { in bug154667531_consistent() 254 for (String mimeType : stockAndroidMimeMap.mimeTypes()) { in containsAllStockAndroidMappings_mimeToExt() 290 for (String mimeType : mimeMap.mimeTypes()) { in agreesWithPublicApi()
|
/cts/tests/tests/content/src/android/content/cts/ |
D | ClipDataTest.java | 133 String[] mimeTypes = { in testToString_complexItem() local 139 ClipData clip = new ClipData("secret-label", mimeTypes, item); in testToString_complexItem()
|
D | ClipboardManagerTest.java | 434 String... mimeTypes) { in assertClipDescription() argument 436 assertEquals(mimeTypes.length, description.getMimeTypeCount()); in assertClipDescription() 439 assertEquals(mimeTypes[i], description.getMimeType(i)); in assertClipDescription()
|
D | IntentFilterTest.java | 1684 Match(String[] actions, String[] categories, String[] mimeTypes, String[] schemes, in Match() argument 1694 if (mimeTypes != null) { in Match() 1695 for (int i = 0; i < mimeTypes.length; i++) { in Match() 1697 addDataType(mimeTypes[i]); in Match() 1715 Match(String[] actions, String[] categories, String[] mimeTypes, String[] schemes, in Match() argument 1717 this(actions, categories, mimeTypes, schemes, authorities, ports); in Match() 1725 Match(String[] actions, String[] categories, String[] mimeTypes, String[] schemes, in Match() argument 1728 this(actions, categories, mimeTypes, schemes, authorities, ports, paths, pathTypes); in Match() 1754 Match addMimeTypes(String[] mimeTypes) { in addMimeTypes() argument 1755 for (int i = 0; i < mimeTypes.length; i++) { in addMimeTypes() [all …]
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PackageManagerShellCommandMultiUserTest.kt | 1094 val mimeTypes = arrayListOf("text/*") in testUpdateMimeGroup_changed_onlyInstalledUserReceivedBroadcast() constant 1100 intent.putStringArrayListExtra(EXTRA_MIME_TYPES, mimeTypes) in testUpdateMimeGroup_changed_onlyInstalledUserReceivedBroadcast() 1298 val mimeTypes = contextPrimaryUser.packageManager.getMimeGroup(MIME_GROUP) in testUpdateMimeGroup_noChanged_noBroadcastReceived() constant 1301 contextPrimaryUser.packageManager.setMimeGroup(MIME_GROUP, mimeTypes) in testUpdateMimeGroup_noChanged_noBroadcastReceived() 1311 contextSecondaryUser.packageManager.setMimeGroup(MIME_GROUP, mimeTypes) in testUpdateMimeGroup_noChanged_noBroadcastReceived()
|
D | PackageManagerTest.java | 4031 private void setUpdateMimeGroupAndAssertBroadcasts(Set<String> mimeTypes, in setUpdateMimeGroupAndAssertBroadcasts() argument 4042 mPackageManager.setMimeGroup(MIME_GROUP, mimeTypes); in setUpdateMimeGroupAndAssertBroadcasts() 4050 assertThat(mPackageManager.getMimeGroup(MIME_GROUP)).isEqualTo(mimeTypes); in setUpdateMimeGroupAndAssertBroadcasts() 4063 Set<String> mimeTypes = Collections.singleton("text/*"); in testUpdateMimeGroup_changed() local 4065 setUpdateMimeGroupAndAssertBroadcasts(mimeTypes, /* isBroadcastReceived= */ true); in testUpdateMimeGroup_changed() 4066 assertThat(mPackageManager.getMimeGroup(MIME_GROUP)).isEqualTo(mimeTypes); in testUpdateMimeGroup_changed() 4073 final Set<String> mimeTypes = Collections.singleton("image/*"); in testUpdateMimeGroup_noChanged_noBroadcastReceived() local 4075 setUpdateMimeGroupAndAssertBroadcasts(mimeTypes, /* isBroadcastReceived= */ true); in testUpdateMimeGroup_noChanged_noBroadcastReceived() 4076 assertThat(mPackageManager.getMimeGroup(MIME_GROUP)).isEqualTo(mimeTypes); in testUpdateMimeGroup_noChanged_noBroadcastReceived() 4077 setUpdateMimeGroupAndAssertBroadcasts(mimeTypes, /* isBroadcastReceived= */ false); in testUpdateMimeGroup_noChanged_noBroadcastReceived()
|
/cts/tests/PhotoPicker/src/android/photopicker/cts/ |
D | PhotoPickerTest.java | 580 final String[] mimeTypes = new String[]{"video/mj2", "image/dng"}; in testExtraMimeTypeFilter() local 581 intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes); in testExtraMimeTypeFilter() 602 assertContainsMimeType(uri, mimeTypes); in testExtraMimeTypeFilter()
|
/cts/tests/tests/mediaparser/src/android/media/mediaparser/cts/ |
D | MediaParserTest.java | 790 public void supportMimeTypes(String... mimeTypes) { in supportMimeTypes() argument 791 for (String mimeType : mimeTypes) { in supportMimeTypes()
|
/cts/hostsidetests/scopedstorage/legacy/src/android/scopedstorage/cts/legacy/ |
D | LegacyStorageTest.java | 813 final String[] mimeTypes = {"image/*", "", null, "foo/bar"}; in testInsertWithUnsupportedMimeType() local 814 for (int i = 0; i < mimeTypes.length; i++) { in testInsertWithUnsupportedMimeType() 816 assertFileInsertWithMimeType(imageFileDisplayName + "_" + i, mimeTypes[i]); in testInsertWithUnsupportedMimeType()
|
/cts/tests/tests/media/decoder/src/android/media/decoder/cts/ |
D | DecoderTestXheAac.java | 113 final String[] mimeTypes = mediaCodecInfo.getSupportedTypes(); in initAacDecoderNames() local 114 for (String mimeType : mimeTypes) { in initAacDecoderNames()
|