From 4db1fecba887defbf7228edd7e4f2ab85d0d34bb Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Tue, 6 Oct 2015 12:57:01 -0700 Subject: [PATCH] You can't easily abstract out this variable because this can crash Cordova due to the plugin design. --- .../src/org/apache/cordova/CordovaPlugin.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaPlugin.java b/framework/src/org/apache/cordova/CordovaPlugin.java index 9f211ff9..4627ebbe 100644 --- a/framework/src/org/apache/cordova/CordovaPlugin.java +++ b/framework/src/org/apache/cordova/CordovaPlugin.java @@ -42,7 +42,6 @@ public class CordovaPlugin { public CordovaInterface cordova; protected CordovaPreferences preferences; private String serviceName; - protected String [] permissions; /** * Call this after constructing to initialize the plugin. @@ -372,7 +371,6 @@ public class CordovaPlugin { */ public void requestPermissions(int requestCode) { - cordova.requestPermissions(this, requestCode, permissions); } /* @@ -383,18 +381,6 @@ public class CordovaPlugin { */ public boolean hasPermisssion() { - if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M) - { - return true; - } - for(String p : permissions) - { - if(PackageManager.PERMISSION_DENIED == cordova.getActivity().checkSelfPermission(p)) - { - return false; - } - } - return true; }