From a40c6f494fe10e6077e9562da03766b574d062f3 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 8 Mar 2019 12:58:00 -0800 Subject: [PATCH] don't show sms-failed toast when permission is banned --- .../main/java/org/eehouse/android/xw4/BoardDelegate.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java index 5a5fb8006..d9228811d 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java @@ -1372,7 +1372,11 @@ public class BoardDelegate extends DelegateBase case SMS_SEND_FAILED: case SMS_SEND_FAILED_NORADIO: case SMS_SEND_FAILED_NOPERMISSION: - DbgUtils.showf( m_activity, R.string.sms_send_failed ); + // Don't bother warning if they're banned. Too frequent + if ( Perms23.havePermissions( m_activity, Perm.SEND_SMS, + Perm.RECEIVE_SMS ) ) { + DbgUtils.showf( m_activity, R.string.sms_send_failed ); + } break; default: