cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From infil00p <...@git.apache.org>
Subject [GitHub] cordova-plugin-media-capture pull request: Removing global state a...
Date Tue, 29 Mar 2016 17:28:42 GMT
Github user infil00p commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-media-capture/pull/59#discussion_r57764130
  
    --- Diff: src/android/Capture.java ---
    @@ -250,13 +304,17 @@ private static void createWritableFile(File file) throws IOException
{
          * Sets up an intent to capture video.  Result handled by onActivityResult()
          */
         private void captureVideo(int duration, int quality) {
    -        Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
    +        if(cameraPermissionInManifest && !PermissionHelper.hasPermission(this,
Manifest.permission.CAMERA)) {
    +            PermissionHelper.requestPermission(this, CAPTURE_VIDEO_SEC, Manifest.permission.CAMERA);
    +        } else {
    +            Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
     
    -        if(Build.VERSION.SDK_INT > 7){
    -            intent.putExtra("android.intent.extra.durationLimit", duration);
    -            intent.putExtra("android.intent.extra.videoQuality", quality);
    +            if(Build.VERSION.SDK_INT > 7){
    --- End diff --
    
    You could have gotten away with deleting this.  SDK level 7? Wow, the Cordova codebase
is OLD!!!!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message