You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by infil00p <gi...@git.apache.org> on 2015/09/25 00:06:26 UTC

[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

GitHub user infil00p opened a pull request:

    https://github.com/apache/cordova-android/pull/220

    Current Cordova-Android 5.0 changes.

    These are the changes to Cordova-Android that make it a 5.0 change.  This is a very minor major release, since we're literally just adding the ability for plugins to handle permissions, and adding a special hook for Geolocation so that browser geolocation can work.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/infil00p/cordova-android smores

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-android/pull/220.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #220
    
----
commit d3044f3524866a0056f0c2632b5fdb68eafdf0f3
Author: Joe Bowser <bo...@apache.org>
Date:   2015-07-14T21:31:07Z

    Commiting code to handle permissions, and the special case of the Geolocation Plugin

commit e62696e72e36a62304f39ecf3a8fae5148a36072
Author: Joe Bowser <bo...@apache.org>
Date:   2015-07-14T21:58:55Z

    Finally got it kinda working, Geolocation is not going to work in browser anymore

commit e766eaed2826110cca3afd561c2efe9a7f91d804
Author: Joe Bowser <bo...@apache.org>
Date:   2015-08-20T20:47:57Z

    Bump up to API level 23

commit d42c53b0c7fb04f372fa711dd0481c33be5bf0fe
Author: Joe Bowser <bo...@apache.org>
Date:   2015-08-28T23:50:16Z

    Refactoring based on feedback from Andrew

commit e00cae122c246c7e8aa468460ff25ea7671d8ceb
Author: Joe Bowser <bo...@apache.org>
Date:   2015-08-31T22:32:53Z

    Got the PoC working with the Contacts plugin, going to work through all the plugins

commit 10c913268555f5f7745e3d70419ee0efaf1afd96
Author: Joe Bowser <bo...@apache.org>
Date:   2015-09-18T20:52:12Z

    Working on getting the Geolocation Plugin to work by default with the default WebView.  Crosswalk will need to make similar modifications.

commit 9825a0f2f54a401fd240d6571ffc7f0a71254899
Author: Joe Bowser <bo...@apache.org>
Date:   2015-09-24T21:55:30Z

    Manually updating version to 5.0.0-dev for engine tags

----


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40473522
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    --- End diff --
    
    Shouldn't this API call be guarded by a check for Android version M?


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by DILEEP-YADAV <gi...@git.apache.org>.
Github user DILEEP-YADAV commented on the pull request:

    https://github.com/apache/cordova-android/pull/220#issuecomment-143840327
  
    http://www.plugbunch.com/


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40474831
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    --- End diff --
    
    Is it because geloc plugin overrides this method?


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40386760
  
    --- Diff: framework/src/org/apache/cordova/CordovaInterface.java ---
    @@ -69,4 +69,7 @@ Licensed to the Apache Software Foundation (ASF) under one
          * Returns a shared thread pool that can be used for background tasks.
          */
         public ExecutorService getThreadPool();
    +
    +    public void requestPermission(CordovaPlugin plugin, int requestCode, String permission);
    --- End diff --
    
    JavaDoc would be great here - since this is public API. Eventually we should figure out how to publish the public API docs online. 


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40386599
  
    --- Diff: framework/project.properties ---
    @@ -10,7 +10,7 @@
     # Indicates whether an apk should be generated for each density.
     split.density=false
     # Project target.
    -target=android-22
    +target=android-23
    --- End diff --
    
    This will break http://ci.cordova.io. @alsorokin Can you please update the Windows slave to install android 23. @dblotsky Can you do the same for the iOS slave.


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p closed the pull request at:

    https://github.com/apache/cordova-android/pull/220


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40473658
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    +            {
    +                return false;
    +            }
    +        }
    +
    +        return true;
    +    }
    +
    +    /**
    +     * Called by the system when the user grants permissions
    +     *
    +     * @param requestCode
    --- End diff --
    
    Another public method in a base class - would be great to fill the Javadoc comments. 


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40473698
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    --- End diff --
    
    Perhaps it should, although I haven't ran into any issues with this so far.


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40478236
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    --- End diff --
    
    No, we still need the base class methods and helpers defined so that if we need to, we can pull up any plugin and access these methods without having to do some reflection to make sure that they still exist.


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by alsorokin <gi...@git.apache.org>.
Github user alsorokin commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40504597
  
    --- Diff: framework/project.properties ---
    @@ -10,7 +10,7 @@
     # Indicates whether an apk should be generated for each density.
     split.density=false
     # Project target.
    -target=android-22
    +target=android-23
    --- End diff --
    
    done for windows slave


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40387288
  
    --- Diff: framework/src/org/apache/cordova/CordovaInterfaceImpl.java ---
    @@ -161,4 +164,35 @@ public ActivityResultHolder(int requestCode, int resultCode, Intent intent) {
                 this.intent = intent;
             }
         }
    +
    +    /**
    +     * Called by the system when the user grants permissions
    +     *
    +     * @param requestCode
    +     * @param permissions
    +     * @param grantResults
    +     */
    +    public void onRequestPermissionResult(int requestCode, String[] permissions,
    +                                          int[] grantResults) throws JSONException {
    +        if(permissionResultCallback != null)
    +        {
    +            permissionResultCallback.onRequestPermissionResult(requestCode, permissions, grantResults);
    +            permissionResultCallback = null;
    +        }
    +    }
    +
    +    public void requestPermission(CordovaPlugin plugin, int requestCode, String permission) {
    +        permissionResultCallback = plugin;
    +        String[] permissions = new String [1];
    +        permissions[0] = permission;
    +        getActivity().requestPermissions(permissions, requestCode);
    +    }
    +
    +    public void requestPermissions(CordovaPlugin plugin, int requestCode)
    +    {
    +        permissionResultCallback = plugin;
    +        String[] permissions = plugin.getPermissionRequest();
    --- End diff --
    
    This is actually in response to Andrew's feedback that we do this.  Most of the plugins don't actually have a set list of permissions, and most only have one permission.  This becomes far more clear when you read the plugins that have permissions.


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40475782
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    --- End diff --
    
    +1 I do find this confusing. I don't also understand why geolocation plugin has to be different. I understand some of this has to be because of Chrome webview handling here: https://github.com/apache/cordova-android/pull/220/files#diff-eb00315f6b4fb38aba0833096a86bb8aR190
    
    The plublic 


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40477877
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    --- End diff --
    
    I understand the need for multiple permissions with 1 callbackContext. An array of permisisons would lead to a simpler design:
    
    ``public void requestPermissions(CordovaPlugin plugin, int requestCode, string[] permissions);```
    
    However, this code will need to be changed to either have private knowledge of what permissions the geoloc plugin needs or ask it somehow:
    https://github.com/apache/cordova-android/pull/220/files#diff-eb00315f6b4fb38aba0833096a86bb8aR190
    
    I think then we should be able to remove the `CordovaPlugin` base class methods and helpers for permissions.
    



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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40386990
  
    --- Diff: framework/src/org/apache/cordova/CordovaInterfaceImpl.java ---
    @@ -161,4 +164,35 @@ public ActivityResultHolder(int requestCode, int resultCode, Intent intent) {
                 this.intent = intent;
             }
         }
    +
    +    /**
    +     * Called by the system when the user grants permissions
    +     *
    +     * @param requestCode
    +     * @param permissions
    +     * @param grantResults
    +     */
    +    public void onRequestPermissionResult(int requestCode, String[] permissions,
    +                                          int[] grantResults) throws JSONException {
    +        if(permissionResultCallback != null)
    +        {
    +            permissionResultCallback.onRequestPermissionResult(requestCode, permissions, grantResults);
    +            permissionResultCallback = null;
    +        }
    +    }
    +
    +    public void requestPermission(CordovaPlugin plugin, int requestCode, String permission) {
    +        permissionResultCallback = plugin;
    +        String[] permissions = new String [1];
    +        permissions[0] = permission;
    +        getActivity().requestPermissions(permissions, requestCode);
    +    }
    +
    +    public void requestPermissions(CordovaPlugin plugin, int requestCode)
    +    {
    +        permissionResultCallback = plugin;
    +        String[] permissions = plugin.getPermissionRequest();
    --- End diff --
    
    It's kinda odd to have the permission array not being passed along instead we invoking a callback on plugin to get the permissions. Passing the permissions array would be a simpler design.


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40476918
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    --- End diff --
    
    The geolocation plugin ONLY handles the permissions, and since we require both the coarse location and the fine location to be requested, we send them both to the activity.  There isn't this sort of behaviour in any other plugin that we currently maintain.  However, it's possible that other plugins will want to send a bunch of permission as a batch, so we facilitate that here, which is why it's public.
    
    That said, we don't do this for the media plugin.  I chose the one permission at a time approach because it's easier to control a plugin's callbackContext that way.


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the pull request:

    https://github.com/apache/cordova-android/pull/220#issuecomment-144519379
  
    Going to close and issue a new pull request based on the prior pull request.


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


[GitHub] cordova-android pull request: Current Cordova-Android 5.0 changes.

Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/220#discussion_r40475167
  
    --- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
    @@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
          */
         public void onConfigurationChanged(Configuration newConfig) {
         }
    +
    +    /**
    +     * Called by the Plugin Manager when we need to actually request permissions
    +     *
    +     * @return              Returns the permission that was stored in the plugin
    +     */
    +
    +    public String[] getPermissionRequest() {
    +        return permissions;
    +    }
    +
    +    public boolean hasPermisssion() {
    +        for(String p : permissions)
    +        {
    +            if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p))
    --- End diff --
    
    That's probably the case.  I'm almost tempted to remove the code from this method entirely, since this really exists only for a Geolocation plugin.  The geolocation plugin is a special case, and no other plugins work this way.


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