From 6f4d858ea879d97109c0c7da2d664d04806adc2a Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Tue, 29 Mar 2022 14:34:44 +0200 Subject: [PATCH] fix(android): make removeAllListeners return a promise (#5527) --- android/capacitor/src/main/java/com/getcapacitor/Plugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/capacitor/src/main/java/com/getcapacitor/Plugin.java b/android/capacitor/src/main/java/com/getcapacitor/Plugin.java index 7dff82f1df..5dccc054d7 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/Plugin.java +++ b/android/capacitor/src/main/java/com/getcapacitor/Plugin.java @@ -745,9 +745,10 @@ public void removeListener(PluginCall call) { * @param call */ @SuppressWarnings("unused") - @PluginMethod(returnType = PluginMethod.RETURN_NONE) + @PluginMethod(returnType = PluginMethod.RETURN_PROMISE) public void removeAllListeners(PluginCall call) { eventListeners.clear(); + call.resolve(); } /**