Commit 26ebd735 by 刘鹏

Merge branch 'feat/qj/fix_login' into 'release'

修复登录不进去首页

See merge request app_android_lib/YDL-Component!152
parents 543f778c fdf63932
package com.yidianling.user package com.yidianling.user
import android.app.Activity import android.app.Activity
import android.content.Intent
import com.tencent.bugly.crashreport.CrashReport import com.tencent.bugly.crashreport.CrashReport
import com.ydl.ydlcommon.data.http.RxUtils import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
...@@ -21,7 +20,6 @@ import com.yidianling.user.route.UserIn ...@@ -21,7 +20,6 @@ import com.yidianling.user.route.UserIn
import com.yidianling.user.safePrivate.FingerPrintCheckActivity import com.yidianling.user.safePrivate.FingerPrintCheckActivity
import com.yidianling.user.safePrivate.FingerPrintUtil import com.yidianling.user.safePrivate.FingerPrintUtil
import com.yidianling.user.safePrivate.HandUnlockCheckActivity import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import com.yidianling.user.ui.login.InputPassWordActivity import com.yidianling.user.ui.login.InputPassWordActivity
import com.yidianling.user.ui.login.OneKeyLoginHelp import com.yidianling.user.ui.login.OneKeyLoginHelp
import com.yidianling.user.ui.login.RegisterAndLoginActivity import com.yidianling.user.ui.login.RegisterAndLoginActivity
...@@ -130,7 +128,11 @@ object LoginUtils { ...@@ -130,7 +128,11 @@ object LoginUtils {
//这里不能引用到MainActivity 想别的办法 //这里不能引用到MainActivity 想别的办法
var flag = 0 var flag = 0
//判断stack中activity是否属于登录相关的三个页面 //判断stack中activity是否属于登录相关的三个页面
var containMainActivity = false
for (activity in ActivityManager.getInstance().getActivitys()) { for (activity in ActivityManager.getInstance().getActivitys()) {
if (activity.javaClass.name == "com.cxzapp.yidianling.activity.MainActivity") {
containMainActivity = true
}
if (activity is RegisterAndLoginActivity if (activity is RegisterAndLoginActivity
|| activity is VerificationCodeActivity || activity is VerificationCodeActivity
|| activity is InputPassWordActivity || activity is InputPassWordActivity
...@@ -148,6 +150,9 @@ object LoginUtils { ...@@ -148,6 +150,9 @@ object LoginUtils {
ActivityManager.getInstance().finishActivity(FingerPrintCheckActivity::class.java) ActivityManager.getInstance().finishActivity(FingerPrintCheckActivity::class.java)
ActivityManager.getInstance().finishActivity(HandUnlockCheckActivity::class.java) ActivityManager.getInstance().finishActivity(HandUnlockCheckActivity::class.java)
FingerPrintUtil.instance().setCurrentUnLockTime(System.currentTimeMillis()) FingerPrintUtil.instance().setCurrentUnLockTime(System.currentTimeMillis())
if (!containMainActivity) {
UserIn.mainIntent(activity)
}
} else { } else {
ActivityManager.finishAll() ActivityManager.finishAll()
if (StatusUtils.isFirstLogin && StatusUtils.isFirstStartApp) { if (StatusUtils.isFirstLogin && StatusUtils.isFirstStartApp) {
......
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