Skip to content

Commit

Permalink
V1.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pppscn committed Jul 15, 2021
1 parent ec9dd07 commit eeff0c0
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 32 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
+ [v1.7.1](app/release/SmsForwarder_release_20210321_1.7.1.apk) 新增转发记录的转发状态(成功/失败&应答信息)
+ [v1.7.2](app/release/SmsForwarder_release_20210325_1.7.2.apk) 新增V1版证书签名,避免部分低版本系统(Android 6.x)无证书错误 & 发送方邮箱允许自定义发件人昵称
+ [v1.7.3](app/release/SmsForwarder_release_20210331_1.7.3.apk) 修复“设置匹配模式”默认选择BUG & 转发到webhook时返回http状态200即为成功 & 转发到其他手机短信支持长短信合并
+ [v1.7.4](app/release/SmsForwarder_release_20210715_1.7.4.apk) 修复转发企业微信群机器人碰到"被截断问题 & 转发到webhook时忽略ssl证书校验(提高自建服务端兼容性) & 转发telegram时将 # 替换为 井,避免被当作标签 & 隐私保护,发送方设置中敏感信息(密码/token/secret等)用星号显示 & 更新友盟基础组件库 & 解决“设置页面关闭卡槽信息,同时使用默认模板时,发送消息卡槽信息仍显示”

--------

Expand Down
Binary file not shown.
8 changes: 4 additions & 4 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"kind": "Directory"
},
"applicationId": "com.idormy.sms.forwarder",
"variantName": "processReleaseResources",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"versionCode": 24,
"versionName": "1.7.3",
"outputFile": "SmsForwarder_release_20210331_1.7.3.apk"
"versionCode": 25,
"versionName": "1.7.4",
"outputFile": "SmsForwarder_release_20210715_1.7.4.apk"
}
]
}
19 changes: 0 additions & 19 deletions app/release/output.json

This file was deleted.

4 changes: 3 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.idormy.sms.forwarder">

<uses-permission
android:name="android.permission.BATTERY_STATS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- 授予应用程序访问系统开机事件的权限 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

public class SmsForwarderBroadcastReceiver extends BroadcastReceiver {
private String TAG = "SmsForwarderBroadcastReceiver";
private int intLevel;
private int intScale;

@Override
public void onReceive(Context context, Intent intent) {
Expand Down Expand Up @@ -89,6 +91,13 @@ public void onReceive(Context context, Intent intent) {
Log.e(TAG, "解析短信失败:" + throwable.getMessage());
}

} else if (intent.ACTION_BATTERY_CHANGED.equals(receiveAction)) {
//获得当前电量
intLevel = intent.getIntExtra("level", 0);
//获得手机总电量
intScale = intent.getIntExtra("scale", 100);
int percent = intLevel * 100 / intScale;
Log.d(TAG, "当前电量:" + percent + "%");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public class LogVo {
private int forwardStatus;
private String forwardResponse;

public LogVo() {
}

public LogVo(Long id, String from, String content, String simInfo, String time, String rule, int senderImageId, int forwardStatus, String forwardResponse) {
this.id = id;
this.from = from;
Expand All @@ -25,10 +28,6 @@ public LogVo(Long id, String from, String content, String simInfo, String time,
this.forwardResponse = forwardResponse;
}

public LogVo() {

}

public Long getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,12 @@ public static void CheckPermission(PackageManager pm, Context that) {
boolean permission_send_sms = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.SEND_SMS", that.getPackageName()));
boolean permission_read_phone_state = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.READ_PHONE_STATE", that.getPackageName()));
boolean permission_read_phone_numbers = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.READ_PHONE_NUMBERS", that.getPackageName()));
boolean permission_battery_stats = (PackageManager.PERMISSION_GRANTED == pm.checkPermission("android.permission.BATTERY_STATS", that.getPackageName()));

if (!(permission_internet && permission_receive_boot && permission_foreground_service &&
permission_read_external_storage && permission_write_external_storage &&
permission_receive_sms && permission_read_sms && permission_send_sms &&
permission_read_phone_state && permission_read_phone_numbers)) {
permission_read_phone_state && permission_read_phone_numbers && permission_battery_stats)) {
ActivityCompat.requestPermissions((Activity) that, new String[]{
Manifest.permission.INTERNET,
Manifest.permission.RECEIVE_BOOT_COMPLETED,
Expand All @@ -556,6 +557,7 @@ public static void CheckPermission(PackageManager pm, Context that) {
Manifest.permission.READ_PHONE_STATE,
Manifest.permission.READ_PHONE_NUMBERS,
Manifest.permission.FOREGROUND_SERVICE,
Manifest.permission.BATTERY_STATS,
}, 0x01);
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/version.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ext {
appVersionCode = 24
appVersionName = "1.7.3"
appVersionCode = 25
appVersionName = "1.7.4"
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.chenenyu:img-optimizer:1.2.0' //图片压缩
}
Expand Down

0 comments on commit eeff0c0

Please sign in to comment.