cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [6/6] cordova-plugin-geolocation git commit: Tweaking the geolocation plugin to contain all the permissions code. Sadly, we have to do this.
Date Wed, 28 Oct 2015 19:00:49 GMT
Tweaking the geolocation plugin to contain all the permissions code.  Sadly, we have to do
this.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/3f0c0636
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/3f0c0636
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/3f0c0636

Branch: refs/heads/master
Commit: 3f0c06368a02c0921e44562a60da7d3833f9926c
Parents: cc7e3cb
Author: Joe Bowser <bowserj@apache.org>
Authored: Tue Oct 6 13:29:03 2015 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Wed Oct 28 12:00:27 2015 -0700

----------------------------------------------------------------------
 src/android/Geolocation.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/3f0c0636/src/android/Geolocation.java
----------------------------------------------------------------------
diff --git a/src/android/Geolocation.java b/src/android/Geolocation.java
index 3db8a56..79c6d2c 100644
--- a/src/android/Geolocation.java
+++ b/src/android/Geolocation.java
@@ -89,9 +89,19 @@ public class Geolocation extends CordovaPlugin {
                 return false;
             }
         }
-
         return true;
     }
 
+    /*
+     * We override this so that we can access the permissions variable, which no longer exists
in
+     * the parent class, since we can't initialize it reliably in the constructor!
+     */
+
+    public void requestPermissions(int requestCode)
+    {
+        cordova.requestPermissions(this, requestCode, permissions);
+    }
+
+
 
 }


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


Mime
View raw message