From 27b07f1e449bb4fd054a78beb953aa87e520bea5 Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Sun, 6 Feb 2022 10:46:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E5=85=B3=E9=97=AD=E6=97=B6=E5=87=8F=E5=B0=91?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BA=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=9A=E7=9F=AD=E4=BF=A1=E8=BD=AC=E5=8F=91=E6=80=BB=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E5=8E=BB=E6=8E=89=E2=80=9C=E5=8F=91=E9=80=81=E7=9F=AD?= =?UTF-8?q?=E4=BF=A1=E2=80=9D=E6=9D=83=E9=99=90=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../idormy/sms/forwarder/MainActivity.java | 26 +++++++++++-------- .../idormy/sms/forwarder/SettingActivity.java | 2 +- app/src/main/res/layout/activity_setting.xml | 20 +++++++++++--- app/src/main/res/values-en/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java b/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java index f30709a9..1e5a54c9 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java +++ b/app/src/main/java/com/idormy/sms/forwarder/MainActivity.java @@ -148,7 +148,7 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I // 接收短信 .permission(Permission.RECEIVE_SMS) // 发送短信 - .permission(Permission.SEND_SMS) + //.permission(Permission.SEND_SMS) // 读取短信 .permission(Permission.READ_SMS) // 读取电话状态 @@ -171,22 +171,26 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I @Override public void onGranted(List permissions, boolean all) { - if (all) { - ToastUtils.show(R.string.toast_granted_all); - } else { - ToastUtils.show(R.string.toast_granted_part); + if (MyApplication.showHelpTip) { + if (all) { + ToastUtils.show(R.string.toast_granted_all); + } else { + ToastUtils.show(R.string.toast_granted_part); + } } SettingUtil.switchEnableSms(true); } @Override public void onDenied(List permissions, boolean never) { - if (never) { - ToastUtils.show(R.string.toast_denied_never); - // 如果是被永久拒绝就跳转到应用权限系统设置页面 - XXPermissions.startPermissionActivity(MainActivity.this, permissions); - } else { - ToastUtils.show(R.string.toast_denied); + if (MyApplication.showHelpTip) { + if (never) { + ToastUtils.show(R.string.toast_denied_never); + // 如果是被永久拒绝就跳转到应用权限系统设置页面 + XXPermissions.startPermissionActivity(MainActivity.this, permissions); + } else { + ToastUtils.show(R.string.toast_denied); + } } SettingUtil.switchEnableSms(false); } diff --git a/app/src/main/java/com/idormy/sms/forwarder/SettingActivity.java b/app/src/main/java/com/idormy/sms/forwarder/SettingActivity.java index e2cb9249..a7255414 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/SettingActivity.java +++ b/app/src/main/java/com/idormy/sms/forwarder/SettingActivity.java @@ -145,7 +145,7 @@ public class SettingActivity extends AppCompatActivity { // 接收短信 .permission(Permission.RECEIVE_SMS) // 发送短信 - .permission(Permission.SEND_SMS) + //.permission(Permission.SEND_SMS) // 读取短信 .permission(Permission.READ_SMS) .request(new OnPermissionCallback() { diff --git a/app/src/main/res/layout/activity_setting.xml b/app/src/main/res/layout/activity_setting.xml index 338c36b4..ba7bbe08 100644 --- a/app/src/main/res/layout/activity_setting.xml +++ b/app/src/main/res/layout/activity_setting.xml @@ -1030,12 +1030,26 @@ android:orientation="horizontal" android:padding="15dp"> - + android:orientation="vertical"> + + + + + Check for updates Auto startup Show tips + Suggest old bird close prompt, the page is more refreshing, reduce pop-up prompt Repo URL Repo Mirror QQ Group diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ecaaed9f..22a69fae 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -26,6 +26,7 @@ 检查新版本 开机启动 帮助提示 + 建议老鸟关闭提示,页面更清爽,减少弹窗提示 开源仓库 同步镜像 互帮互助QQ群