|
@@ -57,6 +57,7 @@ import com.wdkl.rtc.util.JanusConstant
|
|
|
import io.reactivex.Observable
|
|
|
import kotlinx.android.synthetic.main.watch_activity_home2.*
|
|
|
import kotlinx.android.synthetic.main.watch_activity_register.*
|
|
|
+import org.greenrobot.eventbus.EventBus
|
|
|
import org.greenrobot.eventbus.Subscribe
|
|
|
import org.greenrobot.eventbus.ThreadMode
|
|
|
|
|
@@ -98,6 +99,11 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
|
|
|
HomeLaunch.component.inject(this)
|
|
|
}
|
|
|
|
|
|
+ override fun onWindowFocusChanged(hasFocus: Boolean) {
|
|
|
+ super.onWindowFocusChanged(hasFocus)
|
|
|
+ window.decorView.systemUiVisibility = screen_flags
|
|
|
+ }
|
|
|
+
|
|
|
//初始化
|
|
|
override fun init() {
|
|
|
// DaemonEnv.sendStopWorkBroadcast(this)
|
|
@@ -634,6 +640,8 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
|
|
|
|
|
|
override fun onResume() {
|
|
|
super.onResume()
|
|
|
+ window.decorView.systemUiVisibility = screen_flags
|
|
|
+
|
|
|
//主界面恢复时检查tcp连接状态
|
|
|
Log.d(TAG, "Watch home activity resumed...")
|
|
|
if (TcpClientHandler.getConnected()) {
|
|
@@ -649,6 +657,22 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
|
|
|
/*if (!Constants.showFloatWindow) {
|
|
|
DeviceChannel.calling = false
|
|
|
}*/
|
|
|
+
|
|
|
+ //未处理的来电
|
|
|
+ if (Constants.newCallList.size > 0) {
|
|
|
+ val intent = Intent()
|
|
|
+ intent.setClass(this, NewCallListActivity::class.java)
|
|
|
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
|
+ startActivity(intent)
|
|
|
+ }
|
|
|
+
|
|
|
+ //检查当前是否还有未处理事件,有则显示
|
|
|
+ if (Constants.eventList.size > 0) {
|
|
|
+ val intent = Intent()
|
|
|
+ intent.setClass(this, NewEventListActivity::class.java)
|
|
|
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
|
+ startActivity(intent)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
override fun onError(message: String, type: Int) {
|