From b08f03ec37db32b070af8fa8a0034a17058ea5c9 Mon Sep 17 00:00:00 2001 From: tianma8023 <1808931265@qq.com> Date: Wed, 25 May 2022 11:55:58 +0800 Subject: [PATCH 1/6] [revoke][feature] Remove the experimental feature: 1. mark SmsCode message as read if succeed 2. delete SmsCode message if succeed --- .../xsmscode/xp/hook/code/CodeWorker.java | 5 ++-- app/src/main/res/xml/settings.xml | 28 +++++++++---------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/tianma/xsmscode/xp/hook/code/CodeWorker.java b/app/src/main/java/com/tianma/xsmscode/xp/hook/code/CodeWorker.java index 835f276..c1dce7f 100644 --- a/app/src/main/java/com/tianma/xsmscode/xp/hook/code/CodeWorker.java +++ b/app/src/main/java/com/tianma/xsmscode/xp/hook/code/CodeWorker.java @@ -17,6 +17,7 @@ import com.tianma.xsmscode.xp.hook.code.action.impl.CopyToClipboardAction; import com.tianma.xsmscode.xp.hook.code.action.impl.KillMeAction; import com.tianma.xsmscode.xp.hook.code.action.impl.NotifyAction; +import com.tianma.xsmscode.xp.hook.code.action.impl.OperateSmsAction; import com.tianma.xsmscode.xp.hook.code.action.impl.RecordSmsAction; import com.tianma.xsmscode.xp.hook.code.action.impl.SmsParseAction; import com.tianma.xsmscode.xp.hook.code.action.impl.ToastAction; @@ -109,8 +110,8 @@ public ParseResult parse() { mScheduledExecutor.schedule(recordSmsAction, 0, TimeUnit.MILLISECONDS); // 操作验证码短信(标记为已读 或者 删除) Action - // OperateSmsAction operateSmsAction = new OperateSmsAction(mPluginContext, mPhoneContext, smsMsg, xsp); - // mScheduledExecutor.schedule(operateSmsAction, 3000, TimeUnit.MILLISECONDS); + OperateSmsAction operateSmsAction = new OperateSmsAction(mPluginContext, mPhoneContext, smsMsg, xsp); + mScheduledExecutor.schedule(operateSmsAction, 3000, TimeUnit.MILLISECONDS); // 自杀 Action KillMeAction action = new KillMeAction(mPluginContext, mPhoneContext, smsMsg, xsp); diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index 4ece813..5c75ca3 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -163,20 +163,20 @@ android:key="@string/pref_experimental" android:title="@string/pref_experimental_title"> - - - - - - - - - - - - - - + + + Date: Wed, 25 May 2022 15:50:54 +0800 Subject: [PATCH 2/6] [ui] change FAB button icon tint color from black to white --- app/src/main/res/drawable/ic_add.xml | 3 +-- app/src/main/res/layout/fragment_rule_list.xml | 12 +++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/main/res/drawable/ic_add.xml b/app/src/main/res/drawable/ic_add.xml index 6c274b6..b9b8eca 100644 --- a/app/src/main/res/drawable/ic_add.xml +++ b/app/src/main/res/drawable/ic_add.xml @@ -1,10 +1,9 @@ diff --git a/app/src/main/res/layout/fragment_rule_list.xml b/app/src/main/res/layout/fragment_rule_list.xml index 9c69de2..c3cb5ba 100644 --- a/app/src/main/res/layout/fragment_rule_list.xml +++ b/app/src/main/res/layout/fragment_rule_list.xml @@ -1,13 +1,13 @@ - + android:layout_height="match_parent" /> + android:textSize="16sp" /> + android:contentDescription="@string/create_rule" + android:src="@drawable/ic_add" + app:tint="@android:color/white" /> \ No newline at end of file From 8ae828c4dc40552b05fadb64553db0c7ec22c71a Mon Sep 17 00:00:00 2001 From: tianma8023 <1808931265@qq.com> Date: Wed, 25 May 2022 16:03:53 +0800 Subject: [PATCH 3/6] [App] Upgrade some library to the latest. --- app/build.gradle | 14 +++---- .../main/res/layout/fragment_rule_edit.xml | 42 +++++++++---------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ea5743f..ba4a658 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -137,19 +137,19 @@ ext { okHttpVersion = "4.4.0" // OkHttp retrofitVersion = "2.9.0" // retrofit - jsoupVersion = "1.12.1" // jsoup + jsoupVersion = "1.15.1" // jsoup cyaneaVersion = "1.0.2" // cyanea } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "androidx.appcompat:appcompat:1.3.1" - implementation "com.google.android.material:material:1.3.0" // material design support + implementation "androidx.appcompat:appcompat:1.4.1" + implementation "com.google.android.material:material:1.6.0" // material design support implementation "androidx.recyclerview:recyclerview:1.2.1" // recycler view - implementation "androidx.browser:browser:1.3.0" // custom tabs - implementation "androidx.preference:preference:1.1.1" // preference support - implementation "androidx.constraintlayout:constraintlayout:2.0.4" // constraint layout + implementation "androidx.browser:browser:1.4.0" // custom tabs + implementation "androidx.preference:preference:1.2.0" // preference support + implementation "androidx.constraintlayout:constraintlayout:2.1.3" // constraint layout implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" // swipe refresh layout // ButterKnife @@ -164,7 +164,7 @@ dependencies { implementation "com.afollestad.material-dialogs:core:$materialDialogVersion" // Android Shell - implementation "com.jaredrummler:android-shell:$andriodShellVersion" + // implementation "com.jaredrummler:android-shell:$andriodShellVersion" // EventBus implementation "org.greenrobot:eventbus:$eventBusVersion" diff --git a/app/src/main/res/layout/fragment_rule_edit.xml b/app/src/main/res/layout/fragment_rule_edit.xml index d127495..ec2fa7a 100644 --- a/app/src/main/res/layout/fragment_rule_edit.xml +++ b/app/src/main/res/layout/fragment_rule_edit.xml @@ -37,26 +37,25 @@ + app:layout_constraintBottom_toTopOf="@+id/rule_code_regex_input_layout" + app:layout_constraintEnd_toEndOf="@+id/rule_company_input_layout" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="@+id/rule_company_input_layout" + app:layout_constraintTop_toBottomOf="@+id/rule_company_input_layout"> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/rule_code_regex_quick_choose" + app:layout_constraintStart_toStartOf="@+id/rule_keyword_input_layout" + app:layout_constraintTop_toBottomOf="@+id/rule_keyword_input_layout"> Date: Wed, 25 May 2022 16:20:22 +0800 Subject: [PATCH 4/6] [fix] AppBlockActivity toolbar home icon has no callback --- .../xsmscode/ui/app/base/BaseActivity.java | 19 ++++++++++++++----- .../ui/app/base/BaseDaggerActivity.java | 8 +++++--- .../tianma/xsmscode/ui/home/HomeActivity.java | 6 ++---- .../ui/record/CodeRecordActivity.java | 18 +++--------------- .../xsmscode/ui/rule/CodeRulesActivity.java | 13 ------------- 5 files changed, 24 insertions(+), 40 deletions(-) diff --git a/app/src/main/java/com/tianma/xsmscode/ui/app/base/BaseActivity.java b/app/src/main/java/com/tianma/xsmscode/ui/app/base/BaseActivity.java index 7ba6395..cc517da 100644 --- a/app/src/main/java/com/tianma/xsmscode/ui/app/base/BaseActivity.java +++ b/app/src/main/java/com/tianma/xsmscode/ui/app/base/BaseActivity.java @@ -1,14 +1,23 @@ package com.tianma.xsmscode.ui.app.base; -import android.os.Bundle; +import android.view.MenuItem; -import com.jaredrummler.cyanea.app.CyaneaAppCompatActivity; +import androidx.annotation.NonNull; -import androidx.annotation.Nullable; +import com.jaredrummler.cyanea.app.CyaneaAppCompatActivity; +/** + * base activity + */ public abstract class BaseActivity extends CyaneaAppCompatActivity { + @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); + public boolean onOptionsItemSelected(@NonNull MenuItem item) { + if (item.getItemId() == android.R.id.home) { + onBackPressed(); + return true; + } + return super.onOptionsItemSelected(item); } + } diff --git a/app/src/main/java/com/tianma/xsmscode/ui/app/base/BaseDaggerActivity.java b/app/src/main/java/com/tianma/xsmscode/ui/app/base/BaseDaggerActivity.java index 8b3976c..253ed4f 100644 --- a/app/src/main/java/com/tianma/xsmscode/ui/app/base/BaseDaggerActivity.java +++ b/app/src/main/java/com/tianma/xsmscode/ui/app/base/BaseDaggerActivity.java @@ -2,17 +2,19 @@ import android.os.Bundle; -import com.jaredrummler.cyanea.app.CyaneaAppCompatActivity; +import androidx.annotation.Nullable; import javax.inject.Inject; -import androidx.annotation.Nullable; import dagger.android.AndroidInjection; import dagger.android.AndroidInjector; import dagger.android.DispatchingAndroidInjector; import dagger.android.HasAndroidInjector; -public abstract class BaseDaggerActivity extends CyaneaAppCompatActivity implements HasAndroidInjector { +/** + * Base Dagger Activity + */ +public abstract class BaseDaggerActivity extends BaseActivity implements HasAndroidInjector { @Inject DispatchingAndroidInjector androidInjector; diff --git a/app/src/main/java/com/tianma/xsmscode/ui/home/HomeActivity.java b/app/src/main/java/com/tianma/xsmscode/ui/home/HomeActivity.java index 2167c20..be3d8d1 100644 --- a/app/src/main/java/com/tianma/xsmscode/ui/home/HomeActivity.java +++ b/app/src/main/java/com/tianma/xsmscode/ui/home/HomeActivity.java @@ -9,6 +9,7 @@ import android.view.Menu; import android.view.MenuItem; +import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBar; import androidx.appcompat.widget.Toolbar; import androidx.fragment.app.Fragment; @@ -111,11 +112,8 @@ public void onBackPressed() { } @Override - public boolean onOptionsItemSelected(MenuItem item) { + public boolean onOptionsItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { - case android.R.id.home: - onBackPressed(); - return true; case R.id.action_home_faq: onFAQSelected(); return true; diff --git a/app/src/main/java/com/tianma/xsmscode/ui/record/CodeRecordActivity.java b/app/src/main/java/com/tianma/xsmscode/ui/record/CodeRecordActivity.java index 1ba2078..c18bcb9 100644 --- a/app/src/main/java/com/tianma/xsmscode/ui/record/CodeRecordActivity.java +++ b/app/src/main/java/com/tianma/xsmscode/ui/record/CodeRecordActivity.java @@ -3,14 +3,14 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.view.MenuItem; + +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import com.github.tianma8023.xposed.smscode.R; import com.tianma.xsmscode.common.fragment.backpress.BackPressEventDispatchHelper; import com.tianma.xsmscode.ui.app.base.BaseActivity; -import androidx.appcompat.app.ActionBar; -import androidx.appcompat.widget.Toolbar; import butterknife.BindView; import butterknife.ButterKnife; @@ -50,18 +50,6 @@ private void setupToolbar() { } } - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - onBackPressed(); - break; - default: - return super.onOptionsItemSelected(item); - } - return true; - } - @Override public void onBackPressed() { if (!BackPressEventDispatchHelper.dispatchBackPressedEvent(this)) { diff --git a/app/src/main/java/com/tianma/xsmscode/ui/rule/CodeRulesActivity.java b/app/src/main/java/com/tianma/xsmscode/ui/rule/CodeRulesActivity.java index 2137b14..fc02b6a 100644 --- a/app/src/main/java/com/tianma/xsmscode/ui/rule/CodeRulesActivity.java +++ b/app/src/main/java/com/tianma/xsmscode/ui/rule/CodeRulesActivity.java @@ -4,7 +4,6 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.view.MenuItem; import androidx.annotation.Nullable; import androidx.appcompat.app.ActionBar; @@ -126,16 +125,4 @@ public void onBackPressed() { refreshActionBar(getString(R.string.rule_list)); } } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - onBackPressed(); - break; - default: - return super.onOptionsItemSelected(item); - } - return true; - } } From 1ec8295e0c99fcd08c1906cc57633efa07824923 Mon Sep 17 00:00:00 2001 From: tianma8023 <1808931265@qq.com> Date: Wed, 25 May 2022 16:33:35 +0800 Subject: [PATCH 5/6] [Version] Bump a new version 2.3.1(49) --- LOG-CN.md | 8 ++++++-- LOG-EN.md | 6 +++++- app/build.gradle | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/LOG-CN.md b/LOG-CN.md index 92f572b..a6073ec 100644 --- a/LOG-CN.md +++ b/LOG-CN.md @@ -1,10 +1,14 @@ # 更新日志 -- 22.05.23 v2.3.0 需要重启 +- 22.05.25 v2.3.1 需要重启 + 1. 变化: 恢复 标记验证码已读 和 删除验证码短信 功能 + 2. 变化: 验证码历史记录支持复制短信文本 @fxdqe + 3. 其他: 修复部分小bug +- 22.05.23 v2.3.0 1. 新增: 自定义自动输入延迟 2. 修复: 部分机型上模块配置失效问题 3. 移除: 标记验证码已读 和 删除验证码短信 功能 - 22.05.19 v2.2.7 - 1. 新增:隐私政策说明 + 1. 新增: 隐私政策说明 2. 其他: 修复部分小bug - 22.02.23 v2.2.6 1. 变化:适配 Android 12 diff --git a/LOG-EN.md b/LOG-EN.md index 45742fd..e094a75 100644 --- a/LOG-EN.md +++ b/LOG-EN.md @@ -1,11 +1,15 @@ # Update Logs +- 22.05.25 v2.3.1 Reboot required + 1. Change: Restore feature of "mark SMS as read" and "delete SMS code message" + 2. Change: SMS Code record support copy SMS message content to clipboard @fxdqe + 3. Others: fix some little bugs - 22.05.23 v2.3.0 Reboot required 1. New: custom auto input SMS code delay 2. Fix: fix the issue of module configuration invalidation 3. Remove: remove "mark SMS as read" and "delete SMS code message" - 22.05.19 v2.2.7 1. New: Add privacy policy statement - 2. Others: fix some little bugs + 2. Others: fix some little bug - 22.02.23 v2.2.6 1. Change:Adapt to Android 12 - 21.02.04 v2.2.5 diff --git a/app/build.gradle b/app/build.gradle index ba4a658..a1c9d92 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,8 +14,8 @@ def static releaseTime() { return new Date().format("yyMMdd", TimeZone.default) } -def VERSION_NAME = "2.3.0" -def VERSION_CODE = 48 +def VERSION_NAME = "2.3.1" +def VERSION_CODE = 49 android { compileSdkVersion 31 From 607ff25b5b6a5f3cced6fb68356c3df63069674e Mon Sep 17 00:00:00 2001 From: tianma8023 <1808931265@qq.com> Date: Wed, 25 May 2022 16:45:45 +0800 Subject: [PATCH 6/6] [Others] Update README --- README-CN.md | 10 ++++++++-- README.md | 13 +++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README-CN.md b/README-CN.md index eadef2f..7ad2140 100644 --- a/README-CN.md +++ b/README-CN.md @@ -8,7 +8,12 @@ # 应用截图 -可以在 [Xposed仓库](http://repo.xposed.info/module/com.github.tianma8023.xposed.smscode) 或者 [酷安](https://www.coolapk.com/apk/com.github.tianma8023.xposed.smscode) 下载此模块。 +# 下载 +下载地址: +- [酷安](https://www.coolapk.com/apk/com.github.tianma8023.xposed.smscode) +- [GitHub Releases](https://github.com/tianma8023/XposedSmsCode/releases) +- [LSPosed仓库](https://github.com/Xposed-Modules-Repo/com.github.tianma8023.xposed.smscode/releases/) +- [Xposed仓库](http://repo.xposed.info/module/com.github.tianma8023.xposed.smscode) # 使用 1. Root你的设备,安装Xposed框架; @@ -27,6 +32,8 @@ - 收到验证码短信后将验证码复制到系统剪贴板 - 收到验证码时显示Toast - 收到验证码时显示通知 +- 将验证码短信标记为已读(实验性) +- 验证码提取成功后,删除验证码短信(实验性) - 拦截验证码短信 - 自定义验证码短信关键字(正则表达式) - 自定义验证码匹配规则,并支持规则导入导出 @@ -41,7 +48,6 @@ - [NekoSMS](https://github.com/apsun/NekoSMS) - [ButterKnife](https://github.com/JakeWharton/butterknife) - [Material Dialogs](https://github.com/afollestad/material-dialogs) -- [Android Shell](https://github.com/jaredrummler/AndroidShell) - [EventBus](https://github.com/greenrobot/EventBus) - [GreenDao](https://github.com/greenrobot/greenDAO) - [GreenDaoUpgradeHelper](https://github.com/yuweiguocn/GreenDaoUpgradeHelper) diff --git a/README.md b/README.md index 9ff6457..f118405 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,11 @@ An Xposed module which can recognize, parse SMS code and copy it to clipboard wh # Screenshots -You can download this module on [Xposed Repository](http://repo.xposed.info/module/com.github.tianma8023.xposed.smscode) or [Coolapk](https://www.coolapk.com/apk/com.github.tianma8023.xposed.smscode). +# Download +- [GitHub Releases](https://github.com/tianma8023/XposedSmsCode/releases) +- [LSPosed Repository](https://github.com/Xposed-Modules-Repo/com.github.tianma8023.xposed.smscode/releases/) +- [Coolapk](https://www.coolapk.com/apk/com.github.tianma8023.xposed.smscode) +- [Xposed Repository](http://repo.xposed.info/module/com.github.tianma8023.xposed.smscode) # Usage 1. Root your device and install Xposed Framework. @@ -25,8 +29,10 @@ Welcome any feedbacks. # Features - Copy verification code to clipboard when a new message arrives. -- Show toast when a SMS verification code is copied. -- Show notification when code SMS parsed. +- Show toast when the verification code is copied. +- Show notification when verification SMS parsed. +- Mark verification SMS as read(experimental). +- Delete verification SMS when it's extracted successfully(experimental). - Block verification SMS if it's extracted successfully. - Custom keywords about verification code message (regular expressions allowed). - Support the SMS code match rules customization, importation and exportation. @@ -41,7 +47,6 @@ Welcome any feedbacks. - [NekoSMS](https://github.com/apsun/NekoSMS) - [ButterKnife](https://github.com/JakeWharton/butterknife) - [Material Dialogs](https://github.com/afollestad/material-dialogs) -- [Android Shell](https://github.com/jaredrummler/AndroidShell) - [EventBus](https://github.com/greenrobot/EventBus) - [GreenDao](https://github.com/greenrobot/greenDAO) - [GreenDaoUpgradeHelper](https://github.com/yuweiguocn/GreenDaoUpgradeHelper)