From 8d9db5534bb72b8ce5a2781a2f43436c1bdc81bc Mon Sep 17 00:00:00 2001 From: jinliu9508 Date: Fri, 10 May 2024 15:16:48 -0400 Subject: [PATCH] add an OnCancelListener to alert dialog prompt --- .../permissions/AlertDialogPrepromptForAndroidSettings.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/permissions/AlertDialogPrepromptForAndroidSettings.kt b/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/permissions/AlertDialogPrepromptForAndroidSettings.kt index 9e0d3af08b..6f96a20441 100644 --- a/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/permissions/AlertDialogPrepromptForAndroidSettings.kt +++ b/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/permissions/AlertDialogPrepromptForAndroidSettings.kt @@ -62,6 +62,9 @@ object AlertDialogPrepromptForAndroidSettings { .setNegativeButton(android.R.string.no) { dialog, which -> callback.onDecline() } + .setOnCancelListener { + callback.onDecline() + } .show() } }