新增:隐私政策对话框(合规化,同意后才能使用软件)

优化:build.gradle 依赖升级
优化:增加 Android 12.x 支持(待验证)
修复:友盟统计失效
This commit is contained in:
pppscn 2022-01-09 14:47:03 +08:00
parent edb39867c1
commit 263a9fb6c3
21 changed files with 386 additions and 69 deletions

View File

@ -15,7 +15,7 @@ if (versionPropsFile.exists()) {
android {
buildToolsVersion '30.0.3'
compileSdkVersion 30
compileSdkVersion 31
compileOptions {
sourceCompatibility 11
targetCompatibility 11
@ -23,7 +23,7 @@ android {
defaultConfig {
applicationId "com.idormy.sms.forwarder"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 31
versionCode versionProps['versionCode'].toInteger()
versionName versionProps['versionName']
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
@ -127,24 +127,26 @@ void cmdExecute(String cmd) {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.5.2'
testImplementation 'junit:junit:4.+'
implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.8.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
//okhttp
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation 'com.squareup.okio:okio:2.10.0'
//noinspection GradleDependency
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
implementation 'com.squareup.okio:okio:3.0.0'
//fastjson
implementation "com.alibaba:fastjson:1.2.78"
implementation "com.alibaba:fastjson:1.2.79"
//SDK
implementation 'com.umeng.umsdk:common:9.4.4'//
implementation 'com.umeng.umsdk:asms:1.4.1'//
//implementation 'com.umeng.umsdk:apm:1.4.2' // SDKcrash数据请一定集成
implementation 'com.umeng.umsdk:common:9.4.4'// ()
implementation 'com.umeng.umsdk:asms:1.5.0'// asms包依赖必选
//implementation 'com.umeng.umsdk:abtest:1.0.0'//使U-App中ABTest能力
implementation 'com.umeng.umsdk:apm:1.5.2'// U-APM产品包依赖()
//XUpdate
implementation 'com.github.xuexiangjys:XUpdate:2.1.1'
@ -156,11 +158,11 @@ dependencies {
//Lombok
//noinspection AnnotationProcessorOnCompilePath
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
//RxJava
implementation 'io.reactivex.rxjava3:rxjava:3.1.1'
implementation 'io.reactivex.rxjava3:rxjava:3.1.3'
//AndroidAsync
implementation 'com.koushikdutta.async:androidasync:3.1.0'

View File

@ -21,6 +21,10 @@
#-renamesourcefileattribute SourceFile
-keep class com.idormy.sms.forwarder.model.**{*;}
-keep public class com.idormy.sms.forwarder.R$*{
public static final int *;
}
-keep class com.umeng.** {*;}
-keepclassmembers class * {
public <init> (org.json.JSONObject);

View File

@ -52,7 +52,12 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
android:usesCleartextTraffic="true"
tools:targetApi="m">
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
<meta-data
android:name="UPDATE_APP_KEY"
@ -66,6 +71,7 @@
<activity
android:name=".MainActivity"
android:exported="true"
tools:ignore="IntentFilterExportedReceiver">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -74,6 +80,7 @@
</activity>
<activity
android:name=".AboutActivity"
android:exported="true"
android:label="@string/about"
tools:ignore="IntentFilterExportedReceiver">
<intent-filter>
@ -89,22 +96,28 @@
</activity>
<activity
android:name=".SettingActivity"
android:exported="true"
android:label="@string/setting" />
<activity
android:name=".CloneActivity"
android:exported="true"
android:label="@string/clone" />
<activity
android:name=".RuleActivity"
android:exported="true"
android:label="@string/rule_setting" />
<activity
android:name=".SenderActivity"
android:exported="true"
android:label="@string/sender_setting" />
<activity
android:name=".AppListActivity"
android:exported="true"
android:label="@string/app_list" />
<receiver
android:name=".receiver.RebootBroadcastReceiver"
android:exported="true"
tools:ignore="IntentFilterExportedReceiver">
<intent-filter android:priority="2147483647">
<action android:name="android.intent.action.BOOT_COMPLETED" />
@ -114,6 +127,7 @@
</receiver>
<receiver
android:name=".receiver.SmsBroadcastReceiver"
android:exported="true"
android:permission="android.permission.BROADCAST_SMS"
tools:ignore="IntentFilterExportedReceiver">
<intent-filter android:priority="2147483647">
@ -123,6 +137,7 @@
</receiver>
<receiver
android:name=".receiver.PhoneStateReceiver"
android:exported="true"
tools:ignore="IntentFilterExportedReceiver">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
@ -139,7 +154,8 @@
android:name=".service.NotifyService"
android:enabled="true"
android:label="@string/app_name"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
android:exported="false">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>

View File

@ -1,6 +1,7 @@
package com.idormy.sms.forwarder;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
@ -8,6 +9,8 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@ -31,9 +34,11 @@ import com.idormy.sms.forwarder.utils.LogUtil;
import com.idormy.sms.forwarder.utils.NetUtil;
import com.idormy.sms.forwarder.utils.PhoneUtils;
import com.idormy.sms.forwarder.utils.SettingUtil;
import com.idormy.sms.forwarder.utils.SharedPreferencesHelper;
import com.idormy.sms.forwarder.utils.SmsUtil;
import com.idormy.sms.forwarder.utils.TimeUtil;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import java.lang.reflect.Method;
import java.util.ArrayList;
@ -49,6 +54,10 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
private Intent serviceIntent;
private String currentType = "sms";
View inflate;
Dialog dialog;
SharedPreferencesHelper sharedPreferencesHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -93,6 +102,14 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
super.onStart();
Log.d(TAG, "onStart");
/* sp中uminit为1已经同意隐私协议*/
sharedPreferencesHelper = new SharedPreferencesHelper(this, "umeng");
String isAllowed = String.valueOf(sharedPreferencesHelper.getSharedPreference("uminit", ""));
if (isAllowed.equals("") || isAllowed.equals("0")) {
dialog();
return;
}
//是否关闭页面提示
TextView help_tip = findViewById(R.id.help_tip);
help_tip.setVisibility(MyApplication.showHelpTip ? View.VISIBLE : View.GONE);
@ -163,6 +180,7 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onPageStart(TAG);
MobclickAgent.onResume(this);
//第一次打开未授权无法获取SIM信息尝试在此重新获取
@ -206,6 +224,7 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
@Override
protected void onPause() {
super.onPause();
MobclickAgent.onPageEnd(TAG);
MobclickAgent.onPause(this);
try {
if (serviceIntent != null) startService(serviceIntent);
@ -396,4 +415,49 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
return super.onMenuOpened(featureId, menu);
}
/*** 隐私协议授权弹窗*/
@SuppressLint({"ResourceType", "InflateParams"})
public void dialog() {
dialog = new Dialog(this, R.style.dialog);
inflate = LayoutInflater.from(MainActivity.this).inflate(R.layout.diaologlayout, null);
TextView succsebtn = (TextView) inflate.findViewById(R.id.succsebtn);
TextView canclebtn = (TextView) inflate.findViewById(R.id.caclebtn);
succsebtn.setOnClickListener(v -> {
/* uminit为1时代表已经同意隐私协议sp记录当前状态*/
sharedPreferencesHelper.put("uminit", "1");
UMConfigure.submitPolicyGrantResult(getApplicationContext(), true);
/* 友盟sdk正式初始化*/
UmInitConfig umInitConfig = new UmInitConfig();
umInitConfig.UMinit(getApplicationContext());
//关闭弹窗
dialog.dismiss();
//跳转到HomeActivity
final Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
//杀掉以前进程
android.os.Process.killProcess(android.os.Process.myPid());
finish();
});
canclebtn.setOnClickListener(v -> {
dialog.dismiss();
UMConfigure.submitPolicyGrantResult(getApplicationContext(), false);
//不同意隐私协议退出app
android.os.Process.killProcess(android.os.Process.myPid());
});
dialog.setContentView(inflate);
Window dialogWindow = dialog.getWindow();
dialogWindow.setGravity(Gravity.CENTER);
dialog.setCancelable(false);
dialog.show();
}
}

View File

@ -11,12 +11,11 @@ import android.util.Log;
import com.idormy.sms.forwarder.sender.SendHistory;
import com.idormy.sms.forwarder.service.BatteryService;
import com.idormy.sms.forwarder.service.FrontService;
import com.idormy.sms.forwarder.utils.CommonUtil;
import com.idormy.sms.forwarder.utils.Define;
import com.idormy.sms.forwarder.utils.PhoneUtils;
import com.idormy.sms.forwarder.utils.SettingUtil;
import com.idormy.sms.forwarder.utils.SharedPreferencesHelper;
import com.smailnet.emailkit.EmailKit;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import java.util.ArrayList;
@ -28,6 +27,7 @@ public class MyApplication extends Application {
public static List<PhoneUtils.SimInfo> SimInfoList = new ArrayList<>();
//是否关闭页面提示
public static boolean showHelpTip = true;
SharedPreferencesHelper sharedPreferencesHelper;
@Override
protected void attachBaseContext(Context base) {
@ -40,14 +40,6 @@ public class MyApplication extends Application {
super.onCreate();
try {
//初始化组件化基础库, 所有友盟业务SDK都必须调用此初始化接口
//建议在宿主App的Application.onCreate函数中调用基础组件库初始化函数
UMConfigure.init(this, "60254fc7425ec25f10f4293e", CommonUtil.getChannelName(this), UMConfigure.DEVICE_TYPE_PHONE, "");
// 选用LEGACY_AUTO页面采集模式
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.LEGACY_MANUAL);
//pro close log
UMConfigure.setLogEnabled(true);
//前台服务
Intent intent = new Intent(this, FrontService.class);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -77,6 +69,20 @@ public class MyApplication extends Application {
//电池状态监听
Intent batteryServiceIntent = new Intent(this, BatteryService.class);
startService(batteryServiceIntent);
//友盟统计
sharedPreferencesHelper = new SharedPreferencesHelper(this, "umeng");
//设置LOG开关默认为false
//UMConfigure.setLogEnabled(true);
//友盟预初始化
UMConfigure.preInit(getApplicationContext(), "60254fc7425ec25f10f4293e", "Umeng");
//判断是否同意隐私协议uminit为1时为已经同意直接初始化umsdk
if (sharedPreferencesHelper.getSharedPreference("uminit", "").equals("1")) {
//友盟正式初始化
UmInitConfig umInitConfig = new UmInitConfig();
umInitConfig.UMinit(getApplicationContext());
}
} catch (Exception e) {
Log.e(TAG, "onCreate:", e);
}

View File

@ -592,12 +592,14 @@ public class RuleActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onPageStart(TAG);
MobclickAgent.onResume(this);
}
@Override
protected void onPause() {
super.onPause();
MobclickAgent.onPageEnd(TAG);
MobclickAgent.onPause(this);
}

View File

@ -1476,12 +1476,14 @@ public class SenderActivity extends AppCompatActivity {
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onPageStart(TAG);
MobclickAgent.onResume(this);
}
@Override
protected void onPause() {
super.onPause();
MobclickAgent.onPageEnd(TAG);
MobclickAgent.onPause(this);
}

View File

@ -0,0 +1,59 @@
package com.idormy.sms.forwarder;
import android.content.Context;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
public class UmInitConfig {
private static final String TAG = "MyApplication";
public void UMinit(Context context) {
//初始化组件化基础库, 统计SDK/推送SDK/分享SDK都必须调用此初始化接口
UMConfigure.init(context, "60254fc7425ec25f10f4293e", "Umeng", UMConfigure.DEVICE_TYPE_PHONE, "");
//集成umeng-crash-vx.x.x.aar则需要关闭原有统计SDK异常捕获功能
MobclickAgent.setCatchUncaughtExceptions(false);
//统计SDK是否支持采集在子进程中打点的自定义事件默认不支持
UMConfigure.setProcessEvent(true);//支持多进程打点
// 页面数据采集模式
// setPageCollectionMode接口参数说明
// 1. MobclickAgent.PageMode.AUTO: 建议大多数用户使用本采集模式SDK在此模式下自动采集Activity
// 页面访问路径开发者不需要针对每一个Activity在onResume/onPause函数中进行手动埋点在此模式下
// 开发者如需针对FragmentCustomView等自定义页面进行页面统计直接调用MobclickAgent.onPageStart/
// MobclickAgent.onPageEnd手动埋点即可此采集模式简化埋点工作唯一缺点是在Android 4.0以下设备中
// 统计不到Activity页面数据和各类基础指标(提示目前Android 4.0以下设备市场占比已经极小)
// 2. MobclickAgent.PageMode.MANUAL对于要求在Android 4.0以下设备中也能正常采集数据的App,可以使用
// 本模式开发者需要在每一个Activity的onResume函数中手动调用MobclickAgent.onResume接口在Activity的
// onPause函数中手动调用MobclickAgent.onPause接口在此模式下开发者如需针对FragmentCustomView等
// 自定义页面进行页面统计直接调用MobclickAgent.onPageStart/MobclickAgent.onPageEnd手动埋点即可
// 如下两种LEGACY模式不建议首次集成友盟统计SDK的新用户选用
// 如果您是友盟统计SDK的老用户App需要从老版本统计SDK升级到8.0.0版本统计SDK
// 并且您的App之前MobclickAgent.onResume/onPause接口埋点分散在所有Activity
// 逐个删除修改工作量很大且易出错
// 若您的App符合以上特征可以选用如下两种LEGACY模式否则不建议继续使用LEGACY模式
// 简单来说升级SDK的老用户如果不需要手动统计页面路径选用LEGACY_AUTO模式
// 如果需要手动统计页面路径选用LEGACY_MANUAL模式
// 3. MobclickAgent.PageMode.LEGACY_AUTO: 本模式适合不需要对FragmentCustomView
// 等自定义页面进行页面访问统计的开发者SDK仅对App中所有Activity进行页面统计开发者需要在
// 每一个Activity的onResume函数中手动调用MobclickAgent.onResume接口在Activity的
// onPause函数中手动调用MobclickAgent.onPause接口此模式下MobclickAgent.onPageStart
// ,MobclickAgent.onPageEnd这两个接口无效
// 4. MobclickAgent.PageMode.LEGACY_MANUAL: 本模式适合需要对FragmentCustomView
// 等自定义页面进行手动页面统计的开发者开发者如需针对FragmentCustomView等
// 自定义页面进行页面统计直接调用MobclickAgent.onPageStart/MobclickAgent.onPageEnd
// 手动埋点即可开发者还需要在每一个Activity的onResume函数中手动调用MobclickAgent.onResume接口
// 在Activity的onPause函数中手动调用MobclickAgent.onPause接口
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
}
}

View File

@ -3,10 +3,13 @@ package com.idormy.sms.forwarder.receiver;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.util.Log;
import androidx.annotation.RequiresApi;
import com.idormy.sms.forwarder.model.vo.SmsVo;
import com.idormy.sms.forwarder.sender.SendUtil;
import com.idormy.sms.forwarder.utils.SettingUtil;
@ -21,6 +24,7 @@ import java.util.Objects;
public class SmsBroadcastReceiver extends BroadcastReceiver {
@RequiresApi(api = Build.VERSION_CODES.M)
@Override
public void onReceive(Context context, Intent intent) {

View File

@ -1,5 +1,6 @@
package com.idormy.sms.forwarder.sender;
import android.annotation.SuppressLint;
import android.os.Handler;
import android.util.Log;
@ -11,6 +12,7 @@ public class SenderSmsMsg extends SenderBaseMsg {
static final String TAG = "SenderSmsMsg";
@SuppressLint("NewApi")
public static void sendMsg(final long logId, final Handler handError, int simSlot, String mobiles, Boolean onlyNoNetwork, String from, String text) throws Exception {
Log.i(TAG, "sendMsg simSlot:" + simSlot + " mobiles:" + mobiles + " onlyNoNetwork:" + onlyNoNetwork + " from:" + from + " text:" + text);

View File

@ -6,10 +6,8 @@ import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.text.TextUtils;
import androidx.core.app.ActivityCompat;
import androidx.core.app.NotificationManagerCompat;
@ -27,40 +25,6 @@ public class CommonUtil {
public static final int NOTIFICATION_REQUEST_CODE = 9527;
private static final String ACTION_NOTIFICATION_LISTENER_SETTINGS = "android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS";
/**
* <meta-data
* android:name="UMENG_CHANNEL"
* android:value="Umeng">
* </meta-data>
*
* @param ctx 上下文
* @return 渠道名称
*/
// 获取渠道工具函数
public static String getChannelName(Context ctx) {
if (ctx == null) {
return null;
}
String channelName = null;
try {
PackageManager packageManager = ctx.getPackageManager();
if (packageManager != null) {
//注意此处为ApplicationInfo 而不是 ActivityInfo,因为友盟设置的meta-data是在application标签中而不是activity标签中所以用ApplicationInfo
ApplicationInfo applicationInfo = packageManager.getApplicationInfo(ctx.getPackageName(), PackageManager.GET_META_DATA);
if (applicationInfo.metaData != null) {
channelName = applicationInfo.metaData.get("UMENG_CHANNEL") + "";
}
}
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
if (TextUtils.isEmpty(channelName)) {
channelName = "Unknown";
}
return channelName;
}
//是否启用通知监听服务
public static boolean isNotificationListenerServiceEnabled(Context context) {
Set<String> packageNames = NotificationManagerCompat.getEnabledListenerPackages(context);

View File

@ -329,7 +329,7 @@ public class PhoneUtils {
*
* @return 多Sim卡的具体信息
*/
@SuppressLint("ObsoleteSdkInt")
@SuppressLint({"ObsoleteSdkInt", "Range"})
public static List<SimInfo> getSimMultiInfo() {
List<SimInfo> infos = new ArrayList<>();
Log.d(TAG, "Build.VERSION.SDK_INT = " + Build.VERSION.SDK_INT);
@ -533,6 +533,7 @@ public class PhoneUtils {
/**
* 获取后一条通话记录
*/
@SuppressLint("Range")
public static CallInfo getLastCallInfo(String phoneNumber) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) {
return null;

View File

@ -0,0 +1,87 @@
package com.idormy.sms.forwarder.utils;
import android.content.Context;
import android.content.SharedPreferences;
import java.util.Map;
public class SharedPreferencesHelper {
private final SharedPreferences sharedPreferences;
private final SharedPreferences.Editor editor;
public SharedPreferencesHelper(Context context, String FILE_NAME) {
sharedPreferences = context.getSharedPreferences(FILE_NAME,
Context.MODE_PRIVATE);
editor = sharedPreferences.edit();
}
/**
* 存储
*/
public void put(String key, Object object) {
if (object instanceof String) {
editor.putString(key, (String) object);
} else if (object instanceof Integer) {
editor.putInt(key, (Integer) object);
} else if (object instanceof Boolean) {
editor.putBoolean(key, (Boolean) object);
} else if (object instanceof Float) {
editor.putFloat(key, (Float) object);
} else if (object instanceof Long) {
editor.putLong(key, (Long) object);
} else {
editor.putString(key, object.toString());
}
editor.commit();
}
/**
* 获取保存的数据
*/
public Object getSharedPreference(String key, Object defaultObject) {
if (defaultObject instanceof String) {
return sharedPreferences.getString(key, (String) defaultObject);
} else if (defaultObject instanceof Integer) {
return sharedPreferences.getInt(key, (Integer) defaultObject);
} else if (defaultObject instanceof Boolean) {
return sharedPreferences.getBoolean(key, (Boolean) defaultObject);
} else if (defaultObject instanceof Float) {
return sharedPreferences.getFloat(key, (Float) defaultObject);
} else if (defaultObject instanceof Long) {
return sharedPreferences.getLong(key, (Long) defaultObject);
} else {
return sharedPreferences.getString(key, null);
}
}
/**
* 移除某个key值已经对应的值
*/
public void remove(String key) {
editor.remove(key);
editor.commit();
}
/**
* 清除所有数据
*/
public void clear() {
editor.clear();
editor.commit();
}
/**
* 查询某个key是否存在
*/
public Boolean contain(String key) {
return sharedPreferences.contains(key);
}
/**
* 返回所有的键值对
*/
public Map<String, ?> getAll() {
return sharedPreferences.getAll();
}
}

View File

@ -702,7 +702,7 @@
android:gravity="end"
android:text="@string/enable_exclude_from_recents_tips"
android:textSize="9sp"
tools:ignore="SmallSp" />
tools:ignore="SmallSp,TooManyViews" />
</LinearLayout>
<Switch

View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:tools="http://schemas.android.com/tools"
android:background="#fff"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="Overdraw">
<TextView
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/privacy_policy"
android:textColor="#000"
android:textSize="17sp" />
<TextView
android:id="@+id/textlike"
android:layout_marginRight="5dp"
android:layout_marginLeft="5dp"
android:layout_marginBottom="10dp"
android:layout_width="wrap_content"
android:textColor="#000"
android:layout_height="wrap_content"
android:text="@string/privacy_policy_text"
android:textSize="17sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#514E4E" />
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="50dp">
<TextView
android:textColor="#000"
android:id="@+id/succsebtn"
android:gravity="center"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="@string/agree"
android:textSize="20sp" />
<View
android:layout_width="0.5dp"
android:layout_height="match_parent"
android:background="#5F6063" />
<TextView
android:textColor="#000"
android:id="@+id/caclebtn"
android:textSize="20sp"
android:gravity="center"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="@string/disagree" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@ -265,4 +265,8 @@
<string name="proxy_authenticator">Proxy Authenticator</string>
<string name="username">Username</string>
<string name="password">Password</string>
<string name="privacy_policy">Privacy Policy</string>
<string name="agree">Agree</string>
<string name="disagree">Disagree</string>
<string name="privacy_policy_text">SmsForwarder, this software is 100% free, open source, Github online compiled and release, will not collect any of your privacy data!\n\n The software version information will be reported in the following situations: \n 1. When starting the software, the version information will be sent to "Umeng +· U-APP Mobile Statistics" for analyzing the statistics of user version retention and software crash;\n 2. When manually checking the update, send the version number to check the new version;\n Other than that, there is no data!!\n\n The software will collect and use version information in accordance with the Privacy Policy, but will not collect bundled information because you have agreed to the Privacy Policy.</string>
</resources>

View File

@ -41,4 +41,12 @@
<item name="android:textColor">@drawable/txt_select_selector</item>
</style>
<style name="dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item><!--边框-->
<item name="android:windowIsFloating">true</item><!--是否浮现在activity之上-->
<item name="android:windowIsTranslucent">true</item><!--半透明-->
<item name="android:windowNoTitle">true</item><!--无标题-->
<item name="android:windowBackground">@android:color/transparent</item><!--背景透明-->
<item name="android:backgroundDimEnabled">true</item><!--模糊-->
</style>
</resources>

View File

@ -264,4 +264,8 @@
<string name="proxy_authenticator">代理身份验证</string>
<string name="username">用户</string>
<string name="password">密码</string>
<string name="privacy_policy">隐私政策</string>
<string name="agree">同意</string>
<string name="disagree">不同意</string>
<string name="privacy_policy_text">SmsForwarder-短信转发器(下称本软件) 100% 免费开源Github 在线编译发版,绝不会收集您的任何隐私数据! \n\n以下情形会上报本软件版本信息 \n 1、启动本软件时发送版本信息发送到《友盟+·U-App移动统计》用于分析本软件的用户版本留存与软件奔溃统计 \n 2、手动检查更新时发送版本号用于检查新版本 \n除此之外没有任何数据 \n\n本软件会遵循《隐私政策》收集、使用版本信息但不会因为您同意了《隐私政策》而进行强制捆绑式的信息收集。</string>
</resources>

View File

@ -43,4 +43,13 @@
<item name="android:letterSpacing">0.1</item>
<item name="android:textColor">@drawable/txt_select_selector</item>
</style>
<style name="dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item><!--边框-->
<item name="android:windowIsFloating">true</item><!--是否浮现在activity之上-->
<item name="android:windowIsTranslucent">true</item><!--半透明-->
<item name="android:windowNoTitle">true</item><!--无标题-->
<item name="android:windowBackground">@android:color/transparent</item><!--背景透明-->
<item name="android:backgroundDimEnabled">true</item><!--模糊-->
</style>
</resources>

View File

@ -2,21 +2,25 @@
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/public' }
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://repo1.maven.org/maven2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.chenenyu:img-optimizer:1.2.0'
}
}
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/public' }
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://repo1.maven.org/maven2/' }
}

View File

@ -1,3 +1,3 @@
#Fri Jul 16 10:33:23 CST 2021
versionName=2.3.0
versionCode=32
versionName=2.4.0
versionCode=33