Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Android): Use plugin's getPermissionStates() to support overriding #3939

Merged
merged 3 commits into from
Dec 13, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,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 @@ -493,7 +493,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