Commit 4ed5cdbc authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 06a65178
...@@ -41,15 +41,6 @@ class MainActivity : BaseActivity(), View.OnClickListener { ...@@ -41,15 +41,6 @@ class MainActivity : BaseActivity(), View.OnClickListener {
override fun getContentViewLayoutID() = R.layout.activity_main override fun getContentViewLayoutID() = R.layout.activity_main
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
if (intent?.action == Intent.ACTION_MAIN && intent?.categories?.contains(Intent.CATEGORY_LAUNCHER) == true) {
// 应用是通过点击桌面图标进入的
println("mcg -->>>>> 应用是通过点击桌面图标进入的")
} else {
// 应用是从后台进入前台的
// 应用是通过点击桌面图标进入的
println("mcg -->>>>> 应用是通过点击桌面图标进入的")
}
DPHolderManager.initDpSdk(MintsApplication.getContext()) DPHolderManager.initDpSdk(MintsApplication.getContext())
audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager
......
...@@ -101,14 +101,14 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall ...@@ -101,14 +101,14 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
// System.out.println("mcg -->>>>>:: diffInSeconds=" + diffInSeconds + " adSuccessStatus=" + SplashManager.INSTANCE.isSuccessStatus()); // System.out.println("mcg -->>>>>:: diffInSeconds=" + diffInSeconds + " adSuccessStatus=" + SplashManager.INSTANCE.isSuccessStatus());
// if (diffInSeconds >= 10 && SplashManager.INSTANCE.isSuccessStatus()) { // if (diffInSeconds >= 10 && SplashManager.INSTANCE.isSuccessStatus()) {
//支付宝授权时不弹 //支付宝授权时不弹
if (AppConfig.alipayBackFalg) { // if (AppConfig.alipayBackFalg) {
tempAlipay = tempAlipay + 1; // tempAlipay = tempAlipay + 1;
if (tempAlipay >= 2) { // if (tempAlipay >= 2) {
AppConfig.alipayBackFalg = false; // AppConfig.alipayBackFalg = false;
} // }
} else { // } else {
activity.startActivity(new Intent(activity, SplashBackActivity.class)); // activity.startActivity(new Intent(activity, SplashBackActivity.class));
} // }
// } // }
} }
count++; count++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment