|
|
|
|
80
|
try {
|
80
|
try {
|
81
|
String[] proj = {MediaStore.Images.Media.DATA};
|
81
|
String[] proj = {MediaStore.Images.Media.DATA};
|
82
|
cursor = context.getCurrentActivity().getContentResolver().query(selectedVideoUri, proj, null, null, null);
|
82
|
cursor = context.getCurrentActivity().getContentResolver().query(selectedVideoUri, proj, null, null, null);
|
83
|
- if (cursor == null) sourceFile = selectedVideoUri.getPath();
|
|
|
84
|
- int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
|
|
85
|
- cursor.moveToFirst();
|
|
|
86
|
- sourceFile = cursor.getString(column_index);
|
|
|
|
|
83
|
+ if (cursor == null) {
|
|
|
84
|
+ sourceFile = selectedVideoUri.getPath();
|
|
|
85
|
+ } else {
|
|
|
86
|
+ int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
|
|
87
|
+ cursor.moveToFirst();
|
|
|
88
|
+ sourceFile = cursor.getString(column_index);
|
|
|
89
|
+ }
|
87
|
} catch (Exception e) {
|
90
|
} catch (Exception e) {
|
88
|
sourceFile = FileUtils.getFilePathFromURI(context.getCurrentActivity(), selectedVideoUri);
|
91
|
sourceFile = FileUtils.getFilePathFromURI(context.getCurrentActivity(), selectedVideoUri);
|
89
|
} finally {
|
92
|
} finally {
|
|
|
|
|
287
|
try {
|
290
|
try {
|
288
|
String[] proj = {MediaStore.Images.Media.DATA};
|
291
|
String[] proj = {MediaStore.Images.Media.DATA};
|
289
|
cursor = context.getCurrentActivity().getContentResolver().query(selectedVideoUri, proj, null, null, null);
|
292
|
cursor = context.getCurrentActivity().getContentResolver().query(selectedVideoUri, proj, null, null, null);
|
290
|
- if (cursor == null) filepath = selectedVideoUri.getPath();
|
|
|
291
|
- int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
|
|
292
|
- cursor.moveToFirst();
|
|
|
293
|
- filepath = cursor.getString(column_index);
|
|
|
|
|
293
|
+ if (cursor == null) {
|
|
|
294
|
+ filepath = selectedVideoUri.getPath();
|
|
|
295
|
+ } else {
|
|
|
296
|
+ int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
|
|
297
|
+ cursor.moveToFirst();
|
|
|
298
|
+ filepath = cursor.getString(column_index);
|
|
|
299
|
+ }
|
294
|
} catch (Exception e) {
|
300
|
} catch (Exception e) {
|
295
|
filepath = FileUtils.getFilePathFromURI(context.getCurrentActivity(), selectedVideoUri);
|
301
|
filepath = FileUtils.getFilePathFromURI(context.getCurrentActivity(), selectedVideoUri);
|
296
|
} finally {
|
302
|
} finally {
|