Skip to content

Commit d928131

Browse files
committed
Stop using DeniedDontAskAgain
1 parent 0a130ed commit d928131

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

com.unity.mobile.notifications/Runtime/Android/NotificationPermission.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public enum PermissionStatus
2323
Denied = 2,
2424

2525
/// <summary>
26-
/// User denied permission and expressed intent to not be prompted again.
26+
/// No longer used. User denied permission and expressed intent to not be prompted again.
2727
/// </summary>
2828
DeniedDontAskAgain = 3,
2929

@@ -53,14 +53,14 @@ public class PermissionRequest
5353
/// Create a new request.
5454
/// Will show user a dialog asking for permission if that is required to post notifications and user hasn't permanently denied it already.
5555
/// </summary>
56-
/// <see cref="PermissionStatus.DeniedDontAskAgain"/>
5756
public PermissionRequest()
5857
{
5958
Status = AndroidNotificationCenter.UserPermissionToPost;
6059
switch (Status)
6160
{
6261
case PermissionStatus.NotRequested:
6362
case PermissionStatus.Denied:
63+
case PermissionStatus.DeniedDontAskAgain: // this one is no longer used, but might be found in settings
6464
Status = PermissionStatus.RequestPending;
6565
RequestPermission();
6666
break;
@@ -72,7 +72,6 @@ void RequestPermission()
7272
var callbacks = new PermissionCallbacks();
7373
callbacks.PermissionGranted += (unused) => PermissionResponse(PermissionStatus.Allowed);
7474
callbacks.PermissionDenied += (unused) => PermissionResponse(PermissionStatus.Denied);
75-
callbacks.PermissionDeniedAndDontAskAgain += (unused) => PermissionResponse(PermissionStatus.DeniedDontAskAgain);
7675
Permission.RequestUserPermission(AndroidNotificationCenter.PERMISSION_POST_NOTIFICATIONS, callbacks);
7776
}
7877

0 commit comments

Comments
 (0)