Browse Source

提交人:jtm
提交内容:屏保问题

江天明 2 years ago
parent
commit
f01ad64d46

+ 5 - 5
BusinessCommon/src/main/java/com/develop/common/ui/CommonBindingActivity.kt

@@ -81,17 +81,17 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
     override fun onPause() {
         super.onPause()
         isResume = false
-//        stopScreenSaverCount()
+        stopScreenSaverCount()
     }
 
     override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
         if (ev.x == 0f && ev.y == 0f) {
             return true
         }
-//        when (ev.action) {
-//            MotionEvent.ACTION_UP -> if (!hasShowScreenSaver) startScreenSaverCount()
-//            else -> stopScreenSaverCount()
-//        }
+        when (ev.action) {
+            MotionEvent.ACTION_UP -> if (!hasShowScreenSaver) startScreenSaverCount()
+            else -> stopScreenSaverCount()
+        }
         if (ev.action == MotionEvent.ACTION_DOWN) {
             //全局点击外面关闭软键盘
             // 获得当前得到焦点的View,一般情况下就是EditText(特殊情况就是轨迹求或者实体案件会移动焦点)