File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -358,13 +358,13 @@ public long getLastModified() {
358
358
359
359
private InputStream getInputStream (Context context , Uri uri ) throws Exception {
360
360
if (Build .VERSION .SDK_INT >= 19 ) {
361
+ if (DocumentsContract .isDocumentUri (context , uri )) {
362
+ return context .getContentResolver ().openInputStream (DocumentFile .fromSingleUri (context , uri ).getUri ());
363
+ }
361
364
if (isExternalStorageDocument (uri )) {
362
365
File file = getFile (context , uri );
363
366
return new FileInputStream (file );
364
367
}
365
- if (DocumentsContract .isDocumentUri (context , uri )) {
366
- return context .getContentResolver ().openInputStream (DocumentFile .fromSingleUri (context , uri ).getUri ());
367
- }
368
368
}
369
369
return context .getContentResolver ().openInputStream (uri );
370
370
}
You can’t perform that action at this time.
0 commit comments