|
@@ -1,5 +1,6 @@
|
|
package com.wdkl.app.ncs.callingbed.activity
|
|
package com.wdkl.app.ncs.callingbed.activity
|
|
|
|
|
|
|
|
+import android.app.zhyl.ZhylManager
|
|
import android.bluetooth.BluetoothGatt
|
|
import android.bluetooth.BluetoothGatt
|
|
import android.bluetooth.BluetoothGattCharacteristic
|
|
import android.bluetooth.BluetoothGattCharacteristic
|
|
import android.content.*
|
|
import android.content.*
|
|
@@ -350,8 +351,8 @@ class CallingbedActivity :BaseActivity<BedCallingbedActivityPresenter, Callingbe
|
|
//禁止下拉状态栏
|
|
//禁止下拉状态栏
|
|
Utils.setStatusBarDisable(activity, Utils.STATUS_BAR_DISABLE_EXPAND)
|
|
Utils.setStatusBarDisable(activity, Utils.STATUS_BAR_DISABLE_EXPAND)
|
|
|
|
|
|
- //保持屏幕常亮
|
|
|
|
- //AppTool.Setting.setScreenOffTimeOut(applicationContext, 35)
|
|
|
|
|
|
+ //默认保持屏幕常亮
|
|
|
|
+ AppTool.Setting.setScreenOffTimeOut(applicationContext, Int.MAX_VALUE)
|
|
|
|
|
|
presenter.loadServerInfo()
|
|
presenter.loadServerInfo()
|
|
|
|
|
|
@@ -3036,6 +3037,16 @@ class CallingbedActivity :BaseActivity<BedCallingbedActivityPresenter, Callingbe
|
|
AppTool.Time.delay(2000) {
|
|
AppTool.Time.delay(2000) {
|
|
SerialPortHelper.setSosLight("0")
|
|
SerialPortHelper.setSosLight("0")
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (Build.PRODUCT == "ceres_b3") {
|
|
|
|
+ //白天设置屏幕常亮并亮屏
|
|
|
|
+ AppTool.Setting.setScreenOffTimeOut(applicationContext, Int.MAX_VALUE)
|
|
|
|
+ try {
|
|
|
|
+ ZhylManager.getInstance(BaseApplication.appContext).disp_setScreenWakeUp()
|
|
|
|
+ } catch (e: Exception) {
|
|
|
|
+ e.printStackTrace()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
Constant.day_state = 0
|
|
Constant.day_state = 0
|
|
} else {
|
|
} else {
|
|
@@ -3052,6 +3063,14 @@ class CallingbedActivity :BaseActivity<BedCallingbedActivityPresenter, Callingbe
|
|
AppTool.Time.delay(2000) {
|
|
AppTool.Time.delay(2000) {
|
|
SerialPortHelper.setSosLight("1")
|
|
SerialPortHelper.setSosLight("1")
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (Build.PRODUCT == "ceres_b3") {
|
|
|
|
+ //夜晚自动熄屏
|
|
|
|
+ AppTool.Setting.setScreenOffTimeOut(
|
|
|
|
+ applicationContext,
|
|
|
|
+ SettingConfig.getSleepTime(BaseApplication.appContext) * 60
|
|
|
|
+ )
|
|
|
|
+ }
|
|
}
|
|
}
|
|
Constant.day_state = 1
|
|
Constant.day_state = 1
|
|
}
|
|
}
|