/cts/hostsidetests/packagemanager/dynamicmime/test/src/android/dynamicmime/testapp/assertions/ |
D | MimeGroupAssertions.java | 26 public abstract void assertMatchedByMimeGroup(String mimeGroup, String mimeType); in assertMatchedByMimeGroup() argument 28 public abstract void assertNotMatchedByMimeGroup(String mimeGroup, String mimeType); in assertNotMatchedByMimeGroup() argument 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() 36 public final void assertMimeGroupIsEmpty(String mimeGroup) { in assertMimeGroupIsEmpty() argument 37 assertMimeGroupInternal(mimeGroup, Collections.emptySet()); in assertMimeGroupIsEmpty() 40 public final void assertMimeGroupUndefined(String mimeGroup) { in assertMimeGroupUndefined() argument 41 assertMimeGroupInternal(mimeGroup, null); in assertMimeGroupUndefined() 44 public final void assertMatchedByMimeGroup(String mimeGroup, String... mimeTypes) { in assertMatchedByMimeGroup() argument [all …]
|
D | AssertionsByIntentResolution.java | 51 public void assertMatchedByMimeGroup(String mimeGroup, String mimeType) { in assertMatchedByMimeGroup() argument 53 .assertMatched(mPackageName, activity(mimeGroup)); in assertMatchedByMimeGroup() 57 public void assertNotMatchedByMimeGroup(String mimeGroup, String mimeType) { in assertNotMatchedByMimeGroup() argument 59 .assertNotMatched(mPackageName, activity(mimeGroup)); in assertNotMatchedByMimeGroup() 63 public void assertMimeGroupInternal(String mimeGroup, Set<String> mimeTypes) { in assertMimeGroupInternal() argument 70 assertEquals("Mismatch for " + mimeGroup + " MIME types", in assertMimeGroupInternal() 71 mimeTypes, getMimeGroup(mimeGroup, mimeTypes)); in assertMimeGroupInternal() 75 assertMatchedByMimeGroup(mimeGroup, mimeType); 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() [all …]
|
D | AssertionsByGroupData.java | 30 public void assertMatchedByMimeGroup(String mimeGroup, String mimeType) { in assertMatchedByMimeGroup() argument 35 public void assertNotMatchedByMimeGroup(String mimeGroup, String mimeType) { in assertNotMatchedByMimeGroup() argument 40 public void assertMimeGroupInternal(String mimeGroup, Set<String> mimeTypes) { in assertMimeGroupInternal() argument 41 Assert.assertEquals(getMimeGroup(mimeGroup), mimeTypes); in assertMimeGroupInternal() 44 protected abstract Set<String> getMimeGroup(String mimeGroup); in getMimeGroup() argument
|
D | TestAppAssertionsByGroupData.java | 31 protected Set<String> getMimeGroup(String mimeGroup) { in getMimeGroup() argument 33 return mContext.getPackageManager().getMimeGroup(mimeGroup); in getMimeGroup()
|
D | AppAssertionsByGroupData.java | 33 protected Set<String> getMimeGroup(String mimeGroup) { in getMimeGroup() argument 35 String[] mimeTypes = mAppMimeGroups.get(mimeGroup); in getMimeGroup()
|
/cts/hostsidetests/packagemanager/dynamicmime/test/src/android/dynamicmime/testapp/commands/ |
D | MimeGroupCommands.java | 35 void setMimeGroup(String mimeGroup, Set<String> mimeTypes); in setMimeGroup() argument 37 Set<String> getMimeGroupInternal(String mimeGroup); in getMimeGroupInternal() argument 39 default void addMimeTypeToGroup(String mimeGroup, String... mimeTypes) { in addMimeTypeToGroup() argument 42 Set<String> newMimeTypes = new ArraySet<>(getMimeGroupInternal(mimeGroup)); in addMimeTypeToGroup() 45 setMimeGroup(mimeGroup, newMimeTypes); in addMimeTypeToGroup() 48 default void removeMimeTypeFromGroup(String mimeGroup, String... mimeTypes) { in removeMimeTypeFromGroup() argument 51 Set<String> newMimeTypes = new ArraySet<>(getMimeGroupInternal(mimeGroup)); in removeMimeTypeFromGroup() 54 setMimeGroup(mimeGroup, newMimeTypes); in removeMimeTypeFromGroup() 57 default void setMimeGroup(String mimeGroup, String... mimeTypes) { in setMimeGroup() argument 58 setMimeGroup(mimeGroup, new ArraySet<>(mimeTypes)); in setMimeGroup() [all …]
|
D | TestAppCommands.java | 34 public void setMimeGroup(String mimeGroup, Set<String> mimeTypes) { in setMimeGroup() argument 35 mPM.setMimeGroup(mimeGroup, mimeTypes); in setMimeGroup() 40 public Set<String> getMimeGroupInternal(String mimeGroup) { in getMimeGroupInternal() argument 41 return mPM.getMimeGroup(mimeGroup); in getMimeGroupInternal()
|
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() 41 public Set<String> getMimeGroupInternal(String mimeGroup) { in getMimeGroupInternal() argument 42 return new ArraySet<>(mAppMimeGroups.get(mimeGroup)); in getMimeGroupInternal()
|
/cts/hostsidetests/packagemanager/dynamicmime/test/src/android/dynamicmime/testapp/util/ |
D | MimeGroupOperations.java | 40 public final void assertMatchedByMimeGroup(String mimeGroup, String mimeType) { in assertMatchedByMimeGroup() argument 41 mAssertions.assertMatchedByMimeGroup(mimeGroup, mimeType); in assertMatchedByMimeGroup() 45 public final void assertNotMatchedByMimeGroup(String mimeGroup, String mimeType) { in assertNotMatchedByMimeGroup() argument 46 mAssertions.assertNotMatchedByMimeGroup(mimeGroup, mimeType); in assertNotMatchedByMimeGroup() 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() 61 public Set<String> getMimeGroupInternal(String mimeGroup) { in getMimeGroupInternal() argument 62 return mCommands.getMimeGroupInternal(mimeGroup); in getMimeGroupInternal()
|
D | AppMimeGroups.java | 55 public void set(String mimeGroup, String[] mimeTypes) { in set() argument 56 sendRequestAndAwait(mimeGroup, REQUEST_SET, mimeTypes); in set() 59 public String[] get(String mimeGroup) { in get() argument 60 return sendRequestAndAwait(mimeGroup, REQUEST_GET) in get() 64 private Intent sendRequestAndAwait(String mimeGroup, int requestSet) { in sendRequestAndAwait() argument 65 return sendRequestAndAwait(mimeGroup, requestSet, null); in sendRequestAndAwait() 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 90 intent.putExtra(EXTRA_GROUP, mimeGroup); in getRequestIntent()
|
/cts/hostsidetests/packagemanager/dynamicmime/app/src/android/dynamicmime/app/ |
D | AppMimeGroupsReceiver.java | 46 String mimeGroup = intent.getStringExtra(EXTRA_GROUP); 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() 66 response.putExtra(EXTRA_RESPONSE, getMimeGroup(context, mimeGroup)); in handleRequest() 73 private String[] getMimeGroup(Context context, String mimeGroup) { in getMimeGroup() argument 74 Set<String> mimeTypes = context.getPackageManager().getMimeGroup(mimeGroup); in getMimeGroup()
|