cordova-dev mailing list archives

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

    https://github.com/apache/cordova-plugin-media-capture/pull/59#discussion_r57764840
  
    --- 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 --
    
    Oh, wow, I think I glanced over that! I agree that we should remove it. I'll update the
PR


---
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