Skip to content

Commit

Permalink
Merge pull request #41 from tianma8023/dev
Browse files Browse the repository at this point in the history
new version 2.3.1
  • Loading branch information
tianma8023 authored May 25, 2022
2 parents b852ffd + 607ff25 commit 4fce8d2
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 102 deletions.
8 changes: 6 additions & 2 deletions LOG-CN.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 5 additions & 1 deletion LOG-EN.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 8 additions & 2 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
# 应用截图
<img src="/art/cn/01.png" width="180"/><img src="/art/cn/02.png" width="180"/><img src="/art/cn/03.png" width="180"/>

可以在 [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框架;
Expand All @@ -27,6 +32,8 @@
- 收到验证码短信后将验证码复制到系统剪贴板
- 收到验证码时显示Toast
- 收到验证码时显示通知
- 将验证码短信标记为已读(实验性)
- 验证码提取成功后,删除验证码短信(实验性)
- 拦截验证码短信
- 自定义验证码短信关键字(正则表达式)
- 自定义验证码匹配规则,并支持规则导入导出
Expand All @@ -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)
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ An Xposed module which can recognize, parse SMS code and copy it to clipboard wh
# Screenshots
<img src="/art/en/01.png" width="180"/><img src="/art/en/02.png" width="180"/><img src="/art/en/03.png" width="180"/>

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.
Expand All @@ -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.
Expand All @@ -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)
Expand Down
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object> androidInjector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/drawable/ic_add.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#FFFFFF"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:fillColor="#FFFFFFFF"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector>
42 changes: 21 additions & 21 deletions app/src/main/res/layout/fragment_rule_edit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,25 @@
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/rule_code_regex_input_layout"
android:id="@+id/rule_keyword_input_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@id/rule_keyword_input_layout"
android:layout_below="@id/rule_company_input_layout"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_toStartOf="@+id/rule_code_regex_quick_choose"
android:background="@android:color/transparent"
app:boxBackgroundColor="@android:color/transparent"
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">
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">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/rule_code_regex_edit_text"
android:id="@+id/rule_keyword_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/rule_code_regex_hint"
android:imeOptions="actionDone"
android:hint="@string/rule_keyword_hint"
android:imeOptions="actionNext"
android:maxLines="1"
android:paddingStart="0dp"
android:paddingEnd="0dp"
Expand All @@ -65,25 +64,26 @@
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/rule_keyword_input_layout"
android:id="@+id/rule_code_regex_input_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@id/rule_company_input_layout"
android:layout_below="@id/rule_keyword_input_layout"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_toStartOf="@+id/rule_code_regex_quick_choose"
android:background="@android:color/transparent"
app:boxBackgroundColor="@android:color/transparent"
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">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/rule_keyword_edit_text"
android:id="@+id/rule_code_regex_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/rule_keyword_hint"
android:imeOptions="actionNext"
android:hint="@string/rule_code_regex_hint"
android:imeOptions="actionDone"
android:maxLines="1"
android:paddingStart="0dp"
android:paddingEnd="0dp"
Expand Down
Loading

0 comments on commit 4fce8d2

Please sign in to comment.