Commit 2b0b9cbd authored by mengcuiguang's avatar mengcuiguang

非vip用户 添加开屏逻辑 未启用

parent 21942a83
......@@ -13,6 +13,7 @@ import com.mints.helivideo.ad.TTAdManagerHolder;
import com.mints.helivideo.common.Constant;
import com.mints.helivideo.manager.TXCSDKService;
import com.mints.helivideo.manager.TalkingDataManager;
import com.mints.helivideo.manager.UserManager;
import com.mints.helivideo.net.LoanService;
import com.mints.helivideo.net.V6Service;
import com.mints.helivideo.utils.AppPreferencesManager;
......@@ -72,7 +73,12 @@ public class MintsApplication extends MultiDexApplication {
.getBoolean(Constant.LOAN_PERMISSION_FLAG, true)) return;
// 判断应用是否在前台
ForegroundOrBackground.init(this);
// if (UserManager.getInstance().getVipFlag() || AppPreferencesManager.INSTANCE.get()
// .getBoolean(Constant.CLICK_SPLASH, false)) {
// System.out.println("mcg -->>>>>:: MintsApplication initData ForegroundOrBackground.init")
ForegroundOrBackground.init(this);
// }
initMiitHelper();
......
......@@ -13,6 +13,7 @@ object Constant {
* 首次弹出权限声明
*/
const val LOAN_PERMISSION_FLAG = "loan_permission_flag"
const val CLICK_SPLASH = "CLICK_SPLASH"
const val FIRST_SPLASH = "first_splash"
const val IS_FIRST_AGREE_BTN = "is_first_agree_btn"
const val IS_FIRST_VIP_BTN = "is_first_agree_btn"
......
package com.mints.helivideo.ui.activitys
import android.annotation.SuppressLint
import android.app.Application
import android.os.Bundle
import android.view.KeyEvent
import android.view.View
import com.mints.helivideo.MintsApplication
import com.mints.helivideo.R
import com.mints.helivideo.ad.AdManager
import com.mints.helivideo.ad.splash.SplashManager
import com.mints.helivideo.common.Constant
import com.mints.helivideo.common.Constant.PRIVACY_URL
import com.mints.helivideo.common.Constant.REGISTER_URL
import com.mints.helivideo.manager.LocalVedioManager
import com.mints.helivideo.manager.TrackManager
import com.mints.helivideo.manager.UserManager
import com.mints.helivideo.ui.activitys.base.BaseActivity
......@@ -20,8 +20,8 @@ import com.mints.helivideo.ui.widgets.PowerDialog
import com.mints.helivideo.ui.widgets.PowerDialog2
import com.mints.helivideo.ui.widgets.countdowntimer.CountDownTimerSupport
import com.mints.helivideo.ui.widgets.countdowntimer.OnCountDownTimerListener
import com.mints.helivideo.utils.AppPreferencesManager
import com.mints.helivideo.utils.AppPreferencesManager.get
import com.mints.helivideo.utils.ForegroundOrBackground
import com.mints.helivideo.utils.LogUtil
import java.util.*
......@@ -38,6 +38,7 @@ class SplashActivity : BaseActivity() {
private val AD_TIME_OUT = 3000
var timer: CountDownTimerSupport? = null
private var isAdSuc = false
private var isAgree = false
override fun getContentViewLayoutID(): Int {
return R.layout.activity_splash
......@@ -69,6 +70,13 @@ class SplashActivity : BaseActivity() {
}
private fun initData() {
// // 非vip用户延迟调用
// if (!UserManager.getInstance().vipFlag && !isAgree) {
// println("mcg -->>>>>:: splash initData ForegroundOrBackground.init")
//
// ForegroundOrBackground.init(MintsApplication.getContext() as Application?)
// }
val firstSplash = get().getBoolean(Constant.FIRST_SPLASH, true)
if (!firstSplash) {
SplashManager.preLoadAd(this@SplashActivity)
......@@ -191,6 +199,8 @@ class SplashActivity : BaseActivity() {
powerDialog!!.dismiss()
}
get().put(Constant.LOAN_PERMISSION_FLAG, false)
get().put(Constant.CLICK_SPLASH, true)
isAgree = true
baseApplication.thirdConfig()
TrackManager.getInstance().visitorlogin()
initData()
......@@ -231,6 +241,8 @@ class SplashActivity : BaseActivity() {
powerDialog2!!.dismiss()
}
get().put(Constant.LOAN_PERMISSION_FLAG, false)
get().put(Constant.CLICK_SPLASH, true)
isAgree = true
baseApplication.thirdConfig()
TrackManager.getInstance().visitorlogin()
initData()
......
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