lets also react to vnd.android.cursor.dir/ intent

This commit is contained in:
tibbi 2016-06-27 12:47:57 +02:00
parent 719af8c8ba
commit 75e4f6c8ab
2 changed files with 6 additions and 2 deletions

View File

@ -40,6 +40,8 @@
<data android:mimeType="image/*"/> <data android:mimeType="image/*"/>
<data android:mimeType="video/*"/> <data android:mimeType="video/*"/>
<data android:mimeType="vnd.android.cursor.dir/image"/>
<data android:mimeType="vnd.android.cursor.dir/video"/>
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>

View File

@ -373,11 +373,13 @@ public class MainActivity extends AppCompatActivity
} }
private boolean isGetImageContentIntent(Intent intent) { private boolean isGetImageContentIntent(Intent intent) {
return isGetContentIntent(intent) && intent.getType().startsWith("image/"); return isGetContentIntent(intent) &&
(intent.getType().startsWith("image/") || intent.getType().equals(MediaStore.Images.Media.CONTENT_TYPE));
} }
private boolean isGetVideoContentIntent(Intent intent) { private boolean isGetVideoContentIntent(Intent intent) {
return isGetContentIntent(intent) && intent.getType().startsWith("video/"); return isGetContentIntent(intent) &&
(intent.getType().startsWith("video/") || intent.getType().equals(MediaStore.Video.Media.CONTENT_TYPE));
} }
private boolean isSetWallpaperIntent(Intent intent) { private boolean isSetWallpaperIntent(Intent intent) {