@@ -28,9 +28,7 @@ Licensed to the Apache Software Foundation (ASF) under one
28
28
import java .lang .reflect .InvocationTargetException ;
29
29
import java .lang .reflect .Method ;
30
30
import java .text .SimpleDateFormat ;
31
- import java .util .ArrayList ;
32
31
import java .util .Arrays ;
33
- import java .util .List ;
34
32
import java .util .Date ;
35
33
36
34
import org .apache .cordova .CallbackContext ;
@@ -48,20 +46,15 @@ Licensed to the Apache Software Foundation (ASF) under one
48
46
import android .Manifest ;
49
47
import android .app .Activity ;
50
48
import android .content .ActivityNotFoundException ;
51
- import android .content .ContentResolver ;
52
- import android .content .ContentValues ;
53
49
import android .content .Intent ;
54
50
import android .content .pm .PackageManager ;
55
51
import android .content .pm .PackageManager .NameNotFoundException ;
56
- import android .database .Cursor ;
57
52
import android .graphics .BitmapFactory ;
58
- import android .icu .util .Output ;
59
53
import android .media .MediaPlayer ;
60
54
import android .net .Uri ;
61
55
import android .os .Build ;
62
56
import android .os .Bundle ;
63
57
import android .os .Environment ;
64
- import android .provider .MediaStore ;
65
58
import android .system .Os ;
66
59
import android .system .OsConstants ;
67
60
@@ -329,11 +322,8 @@ private void captureVideo(Request req) {
329
322
intent .putExtra (android .provider .MediaStore .EXTRA_OUTPUT , videoUri );
330
323
intent .addFlags (Intent .FLAG_GRANT_WRITE_URI_PERMISSION );
331
324
LOG .d (LOG_TAG , "Recording a video and saving to: " + this .videoAbsolutePath );
332
-
333
- if (Build .VERSION .SDK_INT > 7 ){
334
- intent .putExtra ("android.intent.extra.durationLimit" , req .duration );
335
- intent .putExtra ("android.intent.extra.videoQuality" , req .quality );
336
- }
325
+ intent .putExtra ("android.intent.extra.durationLimit" , req .duration );
326
+ intent .putExtra ("android.intent.extra.videoQuality" , req .quality );
337
327
this .cordova .startActivityForResult ((CordovaPlugin ) this , intent , req .requestCode );
338
328
}
339
329
@@ -557,18 +547,6 @@ private JSONObject createErrorObject(int code, String message) {
557
547
return obj ;
558
548
}
559
549
560
- /**
561
- * Determine if we are storing the images in internal or external storage
562
- * @return Uri
563
- */
564
- private Uri whichContentStore () {
565
- if (Environment .getExternalStorageState ().equals (Environment .MEDIA_MOUNTED )) {
566
- return android .provider .MediaStore .Images .Media .EXTERNAL_CONTENT_URI ;
567
- } else {
568
- return android .provider .MediaStore .Images .Media .INTERNAL_CONTENT_URI ;
569
- }
570
- }
571
-
572
550
private void executeRequest (Request req ) {
573
551
switch (req .action ) {
574
552
case CAPTURE_AUDIO :
0 commit comments