整理:code review

This commit is contained in:
pppscn 2022-01-26 22:02:58 +08:00
parent d124bd2b2d
commit 9c54d33391
7 changed files with 11 additions and 49 deletions

View File

@ -49,6 +49,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:networkSecurityConfig="@xml/network_security_config"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"

View File

@ -26,7 +26,6 @@ import androidx.appcompat.app.AppCompatActivity;
import com.idormy.sms.forwarder.adapter.AppAdapter;
import com.idormy.sms.forwarder.model.AppInfo;
import com.umeng.analytics.MobclickAgent;
import java.util.ArrayList;
import java.util.List;
@ -151,22 +150,4 @@ public class AppListActivity extends AppCompatActivity {
return (pi.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 1;
}
@Override
protected void onDestroy() {
Log.d(TAG, "onDestroy");
super.onDestroy();
}
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onResume(this);
}
@Override
protected void onPause() {
super.onPause();
MobclickAgent.onPause(this);
}
}

View File

@ -46,7 +46,6 @@ import com.idormy.sms.forwarder.utils.SharedPreferencesHelper;
import com.idormy.sms.forwarder.utils.SmsUtil;
import com.idormy.sms.forwarder.utils.TimeUtil;
import com.idormy.sms.forwarder.view.StepBar;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import java.lang.reflect.Method;
@ -229,8 +228,6 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onPageStart(TAG);
MobclickAgent.onResume(this);
//是否同意隐私协议
if (!MyApplication.allowPrivacyPolicy) return;
@ -285,8 +282,6 @@ public class MainActivity extends AppCompatActivity implements RefreshListView.I
//是否同意隐私协议
if (!MyApplication.allowPrivacyPolicy) return;
MobclickAgent.onPageEnd(TAG);
MobclickAgent.onPause(this);
try {
if (serviceIntent != null) startService(serviceIntent);
} catch (Exception e) {

View File

@ -35,7 +35,6 @@ import com.idormy.sms.forwarder.utils.LogUtil;
import com.idormy.sms.forwarder.utils.RuleUtil;
import com.idormy.sms.forwarder.utils.SettingUtil;
import com.idormy.sms.forwarder.view.StepBar;
import com.umeng.analytics.MobclickAgent;
import java.util.ArrayList;
import java.util.Date;
@ -596,19 +595,10 @@ public class RuleActivity extends AppCompatActivity {
super.onDestroy();
}
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onPageStart(TAG);
MobclickAgent.onResume(this);
}
@Override
protected void onPause() {
overridePendingTransition(0, 0);
super.onPause();
MobclickAgent.onPageEnd(TAG);
MobclickAgent.onPause(this);
}
private int checkRegexReplace(String regexReplace) {

View File

@ -72,7 +72,6 @@ import com.idormy.sms.forwarder.utils.LogUtil;
import com.idormy.sms.forwarder.utils.RuleUtil;
import com.idormy.sms.forwarder.view.ClearEditText;
import com.idormy.sms.forwarder.view.StepBar;
import com.umeng.analytics.MobclickAgent;
import java.net.Proxy;
import java.util.ArrayList;
@ -325,19 +324,10 @@ public class SenderActivity extends AppCompatActivity {
super.onDestroy();
}
@Override
protected void onResume() {
super.onResume();
MobclickAgent.onPageStart(TAG);
MobclickAgent.onResume(this);
}
@Override
protected void onPause() {
overridePendingTransition(0, 0);
super.onPause();
MobclickAgent.onPageEnd(TAG);
MobclickAgent.onPause(this);
}
// 初始化数据

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>