|
|
@@ -4,6 +4,7 @@ import android.view.InputDevice
|
|
|
import android.view.KeyEvent
|
|
|
import android.widget.ImageView
|
|
|
import androidx.lifecycle.MutableLiveData
|
|
|
+import com.grkj.iscs.BusinessManager
|
|
|
import com.grkj.iscs.R
|
|
|
import com.grkj.iscs.databinding.ActivityHomeBinding
|
|
|
import com.grkj.iscs.extentions.toByteArrays
|
|
|
@@ -44,6 +45,8 @@ class HomeActivity : BaseMvpActivity<IHomeView, HomePresenter, ActivityHomeBindi
|
|
|
presenter?.registerStatusListener()
|
|
|
|
|
|
val userInfo = intent.getSerializableExtra("userInfo")
|
|
|
+
|
|
|
+ BusinessManager.isTestMode = false
|
|
|
if (userInfo != null && (userInfo as UserInfoRespVO).roles != null) {
|
|
|
if (userInfo.roles?.any { it == USER_ROLE_DRAWER || it == USER_ROLE_LOCKER || it == USER_ROLE_COLOCKER || it == USER_ROLE_GUARD } == true) {
|
|
|
mMenuList.addAll(mutableListOf(
|
|
|
@@ -51,6 +54,7 @@ class HomeActivity : BaseMvpActivity<IHomeView, HomePresenter, ActivityHomeBindi
|
|
|
))
|
|
|
}
|
|
|
if (userInfo.roles?.any { it == USER_ROLE_ADMHDWTESTER } == true) {
|
|
|
+ BusinessManager.isTestMode = true
|
|
|
mMenuList.add(Menu(getString(R.string.test), R.mipmap.menu_icon_test, DockTestFragment()))
|
|
|
}
|
|
|
if (userInfo.roles?.any { it == USER_ROLE_ADMHDWSETTER } == true) {
|