Commit 7392ed0f by konghaorui

修复手势密码解锁切换登录方式问题

parent 6b4d7adb
...@@ -19,6 +19,9 @@ import com.yidianling.common.tools.ToastUtil ...@@ -19,6 +19,9 @@ import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.R import com.yidianling.user.R
import com.yidianling.user.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.route.UserIn import com.yidianling.user.route.UserIn
import com.yidianling.user.safePrivate.FingerPrintCheckActivity
import com.yidianling.user.safePrivate.FingerPrintUtil
import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import com.yidianling.user.ui.login.contract.IInputPassWordContract import com.yidianling.user.ui.login.contract.IInputPassWordContract
import com.yidianling.user.ui.login.presenter.InputPassWordPresenterImpl import com.yidianling.user.ui.login.presenter.InputPassWordPresenterImpl
import kotlinx.android.synthetic.main.user_activity_input_password.* import kotlinx.android.synthetic.main.user_activity_input_password.*
...@@ -282,7 +285,12 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput ...@@ -282,7 +285,12 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput
var flag = 0 var flag = 0
//判断stack中activity是否属于登录相关的三个页面 //判断stack中activity是否属于登录相关的三个页面
for (activity in ActivityManager.getInstance().getActivitys()) { for (activity in ActivityManager.getInstance().getActivitys()) {
if (activity is RegisterAndLoginActivity || activity is VerificationCodeActivity || activity is InputPassWordActivity) { if (activity is RegisterAndLoginActivity
|| activity is VerificationCodeActivity
|| activity is InputPassWordActivity
|| activity is FingerPrintCheckActivity
|| activity is HandUnlockCheckActivity
) {
flag++ flag++
} }
} }
...@@ -291,6 +299,9 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput ...@@ -291,6 +299,9 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput
ActivityManager.getInstance().finishActivity(VerificationCodeActivity::class.java) ActivityManager.getInstance().finishActivity(VerificationCodeActivity::class.java)
ActivityManager.getInstance().finishActivity(InputPassWordActivity::class.java) ActivityManager.getInstance().finishActivity(InputPassWordActivity::class.java)
ActivityManager.getInstance().finishActivity(RegisterAndLoginActivity::class.java) ActivityManager.getInstance().finishActivity(RegisterAndLoginActivity::class.java)
ActivityManager.getInstance().finishActivity(FingerPrintCheckActivity::class.java)
ActivityManager.getInstance().finishActivity(HandUnlockCheckActivity::class.java)
FingerPrintUtil.instance().setCurrentUnLockTime(System.currentTimeMillis())
} else { } else {
ActivityManager.finishAll() ActivityManager.finishAll()
startActivity(UserIn.mainIntent(this)) startActivity(UserIn.mainIntent(this))
......
...@@ -44,6 +44,9 @@ import com.yidianling.user.http.request.BindPhoneJavaParam ...@@ -44,6 +44,9 @@ import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.http.request.PhoneLoginAutoParam import com.yidianling.user.http.request.PhoneLoginAutoParam
import com.yidianling.user.http.response.ChcekPhoneResponeBean import com.yidianling.user.http.response.ChcekPhoneResponeBean
import com.yidianling.user.route.UserIn import com.yidianling.user.route.UserIn
import com.yidianling.user.safePrivate.FingerPrintCheckActivity
import com.yidianling.user.safePrivate.FingerPrintUtil
import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import com.yidianling.user.ui.CountryListActivity import com.yidianling.user.ui.CountryListActivity
import com.yidianling.user.ui.login.contract.ILoginContract import com.yidianling.user.ui.login.contract.ILoginContract
import com.yidianling.user.ui.login.presenter.LoginPresenterImpl import com.yidianling.user.ui.login.presenter.LoginPresenterImpl
...@@ -450,9 +453,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -450,9 +453,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
tv_reg_title.text = "手机号绑定" tv_reg_title.text = "手机号绑定"
tv_protocol.visibility = View.GONE tv_protocol.visibility = View.GONE
} else { } else {
ActivityManager.getInstance().finishActivity(VerificationCodeActivity::class.java) finishPrePage()
ActivityManager.getInstance().finishActivity(InputPassWordActivity::class.java)
ActivityManager.getInstance().finishActivity(RegisterAndLoginActivity::class.java)
if (isFromGuide) { if (isFromGuide) {
startActivity(UserIn.mainIntent(this)) startActivity(UserIn.mainIntent(this))
} }
...@@ -527,9 +528,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -527,9 +528,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
UserHelper.getUserInfo()!!.userInfo!!.bind_phone = 1 UserHelper.getUserInfo()!!.userInfo!!.bind_phone = 1
UserHelper.getUserInfo()!!.userInfo!!.phone = userPhoneNumber UserHelper.getUserInfo()!!.userInfo!!.phone = userPhoneNumber
ActivityManager.getInstance().finishActivity(VerificationCodeActivity::class.java) finishPrePage()
ActivityManager.getInstance().finishActivity(InputPassWordActivity::class.java)
ActivityManager.getInstance().finishActivity(RegisterAndLoginActivity::class.java)
} }
/** /**
...@@ -559,13 +558,22 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -559,13 +558,22 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
ActivityManager.finishAll() ActivityManager.finishAll()
startActivity(UserIn.mainIntent(this)) startActivity(UserIn.mainIntent(this))
} else { } else {
ActivityManager.getInstance().finishActivity(VerificationCodeActivity::class.java) finishPrePage()
ActivityManager.getInstance().finishActivity(InputPassWordActivity::class.java)
ActivityManager.getInstance().finishActivity(RegisterAndLoginActivity::class.java)
} }
}, 3000) }, 3000)
} }
private fun finishPrePage() {
ActivityManager.getInstance().finishActivity(VerificationCodeActivity::class.java)
ActivityManager.getInstance().finishActivity(InputPassWordActivity::class.java)
ActivityManager.getInstance().finishActivity(RegisterAndLoginActivity::class.java)
//关闭手势解锁页面与指纹解锁页面
ActivityManager.getInstance().finishActivity(FingerPrintCheckActivity::class.java)
ActivityManager.getInstance().finishActivity(HandUnlockCheckActivity::class.java)
FingerPrintUtil.instance().setCurrentUnLockTime(System.currentTimeMillis())
}
override fun onBackPressed() { override fun onBackPressed() {
//当前stack只有一个activity,说明被挤掉线的 //当前stack只有一个activity,说明被挤掉线的
......
...@@ -10,10 +10,8 @@ import android.view.View ...@@ -10,10 +10,8 @@ import android.view.View
import com.ydl.ydlcommon.base.BaseMvpActivity import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.YDLCacheUtils import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.ydl.ydlcommon.utils.actionutil.BIConstants
import com.yidianling.common.tools.RxKeyboardTool import com.yidianling.common.tools.RxKeyboardTool
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.R import com.yidianling.user.R
...@@ -21,6 +19,9 @@ import com.yidianling.user.UserHelper ...@@ -21,6 +19,9 @@ import com.yidianling.user.UserHelper
import com.yidianling.user.constants.UserBIConstants import com.yidianling.user.constants.UserBIConstants
import com.yidianling.user.http.request.BindPhoneJavaParam import com.yidianling.user.http.request.BindPhoneJavaParam
import com.yidianling.user.route.UserIn import com.yidianling.user.route.UserIn
import com.yidianling.user.safePrivate.FingerPrintCheckActivity
import com.yidianling.user.safePrivate.FingerPrintUtil
import com.yidianling.user.safePrivate.HandUnlockCheckActivity
import com.yidianling.user.ui.login.contract.IVerificationCodeContract import com.yidianling.user.ui.login.contract.IVerificationCodeContract
import com.yidianling.user.ui.login.presenter.VerificationCodePresenterImpl import com.yidianling.user.ui.login.presenter.VerificationCodePresenterImpl
import io.reactivex.Observable import io.reactivex.Observable
...@@ -280,7 +281,12 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -280,7 +281,12 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
var flag = 0 var flag = 0
//判断stack中activity是否属于登录相关的三个页面 //判断stack中activity是否属于登录相关的三个页面
for (activity in ActivityManager.getInstance().getActivitys()) { for (activity in ActivityManager.getInstance().getActivitys()) {
if (activity is RegisterAndLoginActivity || activity is VerificationCodeActivity || activity is InputPassWordActivity) { if (activity is RegisterAndLoginActivity
|| activity is VerificationCodeActivity
|| activity is InputPassWordActivity
|| activity is FingerPrintCheckActivity
|| activity is HandUnlockCheckActivity
) {
flag++ flag++
} }
} }
...@@ -289,6 +295,9 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View, ...@@ -289,6 +295,9 @@ class VerificationCodeActivity : BaseMvpActivity<IVerificationCodeContract.View,
ActivityManager.getInstance().finishActivity(VerificationCodeActivity::class.java) ActivityManager.getInstance().finishActivity(VerificationCodeActivity::class.java)
ActivityManager.getInstance().finishActivity(InputPassWordActivity::class.java) ActivityManager.getInstance().finishActivity(InputPassWordActivity::class.java)
ActivityManager.getInstance().finishActivity(RegisterAndLoginActivity::class.java) ActivityManager.getInstance().finishActivity(RegisterAndLoginActivity::class.java)
ActivityManager.getInstance().finishActivity(FingerPrintCheckActivity::class.java)
ActivityManager.getInstance().finishActivity(HandUnlockCheckActivity::class.java)
FingerPrintUtil.instance().setCurrentUnLockTime(System.currentTimeMillis())
} else { } else {
ActivityManager.finishAll() ActivityManager.finishAll()
startActivity(UserIn.mainIntent(this)) startActivity(UserIn.mainIntent(this))
......
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