mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-04 06:00:11 +00:00
整理:code review
This commit is contained in:
parent
d124bd2b2d
commit
9c54d33391
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
|
@ -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>
|
10
app/src/main/res/xml/network_security_config.xml
Normal file
10
app/src/main/res/xml/network_security_config.xml
Normal 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>
|
Loading…
Reference in New Issue
Block a user