|
@@ -1,4 +1,4 @@
|
|
- package com.wdkl.app.ncs.callingbed.activity
|
|
|
|
|
|
+package com.wdkl.app.ncs.callingbed.activity
|
|
|
|
|
|
import android.content.Context
|
|
import android.content.Context
|
|
import android.content.Intent
|
|
import android.content.Intent
|
|
@@ -41,12 +41,11 @@ import okhttp3.OkHttpClient
|
|
import okhttp3.Request
|
|
import okhttp3.Request
|
|
import java.util.concurrent.TimeUnit
|
|
import java.util.concurrent.TimeUnit
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+/**
|
|
* 激活页面
|
|
* 激活页面
|
|
- * */
|
|
|
|
- @Router(path = "/callingbed/activation")
|
|
|
|
|
|
+* */
|
|
|
|
+@Router(path = "/callingbed/activation")
|
|
class CallingbedActivationActivity : BaseActivity<CallingbedActivationPresenter, CallingbedActivationBinding>(), CallingbedActivationContract.View {
|
|
class CallingbedActivationActivity : BaseActivity<CallingbedActivationPresenter, CallingbedActivationBinding>(), CallingbedActivationContract.View {
|
|
-
|
|
|
|
private val TAG = "CallingdoorActivationActivity"
|
|
private val TAG = "CallingdoorActivationActivity"
|
|
val QR_CODE_PATH = "http://m.wdklian.com/care/apk/care.user?type=NCS_DEVICE"
|
|
val QR_CODE_PATH = "http://m.wdklian.com/care/apk/care.user?type=NCS_DEVICE"
|
|
private val uninstallApk = false
|
|
private val uninstallApk = false
|
|
@@ -57,8 +56,11 @@ class CallingbedActivationActivity : BaseActivity<CallingbedActivationPresenter
|
|
//是否重启
|
|
//是否重启
|
|
private var cancelRestart = false
|
|
private var cancelRestart = false
|
|
|
|
|
|
|
|
+ private var clickTime: Long = 0
|
|
|
|
+ private var clickTimes: Int = 1
|
|
|
|
+
|
|
override fun getLayId(): Int {
|
|
override fun getLayId(): Int {
|
|
- return R.layout.callingbed_activation
|
|
|
|
|
|
+ return R.layout.callingbed_activation
|
|
}
|
|
}
|
|
|
|
|
|
override fun bindDagger() {
|
|
override fun bindDagger() {
|
|
@@ -90,6 +92,8 @@ class CallingbedActivationActivity : BaseActivity<CallingbedActivationPresenter
|
|
Utils.checkCameraSupport()
|
|
Utils.checkCameraSupport()
|
|
|
|
|
|
checkServer()
|
|
checkServer()
|
|
|
|
+
|
|
|
|
+ Utils.hideStatusBar(activity, true)
|
|
}
|
|
}
|
|
|
|
|
|
override fun bindEvent() {
|
|
override fun bindEvent() {
|
|
@@ -110,6 +114,22 @@ class CallingbedActivationActivity : BaseActivity<CallingbedActivationPresenter
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ activation_qr_code.setOnClickListener {
|
|
|
|
+ val time = System.currentTimeMillis()
|
|
|
|
+ if (time - clickTime < 1500) {
|
|
|
|
+ clickTimes++
|
|
|
|
+ } else {
|
|
|
|
+ clickTimes = 1
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (clickTimes >15) {
|
|
|
|
+ showMessage("enable status bar")
|
|
|
|
+ Utils.hideStatusBar(activity, false)
|
|
|
|
+ clickTimes = 1
|
|
|
|
+ }
|
|
|
|
+ clickTime = time
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
override fun onResume() {
|
|
override fun onResume() {
|