Skip to content

Commit

Permalink
fix(Android): Use plugin's getPermissionStates() to support overriding (
Browse files Browse the repository at this point in the history
  • Loading branch information
carlpoole authored Dec 13, 2020
1 parent 29e9e2c commit 855a607
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in
if (validatePermissions(plugin.getInstance(), savedPermissionCall, permissions, grantResults)) {
// handle request permissions call
if (savedPermissionCall.getMethodName().equals("requestPermissions")) {
savedPermissionCall.resolve(getPermissionStates(plugin.getInstance()));
savedPermissionCall.resolve(plugin.getInstance().getPermissionStates());
} else {
// handle permission requests by other methods on the plugin
plugin.getInstance().onRequestPermissionsResult(savedPermissionCall, requestCode, permissions, grantResults);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ public void removeAllListeners(PluginCall call) {
*/
@PluginMethod
public void checkPermissions(PluginCall pluginCall) {
JSObject permissionsResult = bridge.getPermissionStates(this);
JSObject permissionsResult = getPermissionStates();

if (permissionsResult.length() == 0) {
// if no permissions are defined on the plugin, resolve undefined
Expand Down

0 comments on commit 855a607

Please sign in to comment.