summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
author Andrey Epin <ayepin@google.com> 2023-05-05 12:06:26 -0700
committer Andrey Epin <ayepin@google.com> 2023-05-05 12:13:01 -0700
commit7e34b05b23683d154f8743fd1b4e64c3c165d46b (patch)
treeb412985fc7e38aacbb053dd823d286ef18a11cd4 /java/src
parentd572ef6c2ba73880edecd66c86835e78763d9400 (diff)
Add test content provider to mock uri mime types
Add a content provider that returns getType and getStreamTypes based on the URI query parameters. That allows us not to rely on the debug hook to override URI mime types, mock files with previes, and makes our integration tests more integral. Bug: 280237072 Test: tests themselves Change-Id: I70835439e8b8b41f4dc633f218d662c2bc42c3ae
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/intentresolver/ChooserActivity.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/java/src/com/android/intentresolver/ChooserActivity.java b/java/src/com/android/intentresolver/ChooserActivity.java
index 7f55f78f..ecfaf0e2 100644
--- a/java/src/com/android/intentresolver/ChooserActivity.java
+++ b/java/src/com/android/intentresolver/ChooserActivity.java
@@ -713,8 +713,7 @@ public class ChooserActivity extends ResolverActivity implements
return resolver.query(uri, null, null, null, null);
}
- @VisibleForTesting
- protected boolean isImageType(@Nullable String mimeType) {
+ private boolean isImageType(@Nullable String mimeType) {
return mimeType != null && mimeType.startsWith("image/");
}