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