From 73318e73be096a060cef13bca8ded963e6eae3ed Mon Sep 17 00:00:00 2001 From: Carl Poole Date: Tue, 24 Nov 2020 13:48:28 -0600 Subject: [PATCH] dont release calls that are manually saved, eg listeners/watchers --- android/capacitor/src/main/java/com/getcapacitor/Bridge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java index 03fc4ffbf0..bf2cb7f7ad 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Bridge.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Bridge.java @@ -768,7 +768,7 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in // handle permission requests by other methods on the plugin plugin.getInstance().onRequestPermissionsResult(savedPermissionCall, requestCode, permissions, grantResults); - if (!savedPermissionCall.isReleased()) { + if (!savedPermissionCall.isReleased() && !savedPermissionCall.isSaved()) { savedPermissionCall.release(this); } }