feat: statusBar ui
This commit is contained in:
@@ -18,6 +18,7 @@ import com.rokid.dcg.sprite.service.ISystemFuncService
|
||||
import com.rokid.dcg.sprite.service.ITTSService
|
||||
import com.rokid.dcg.sprite.service.ServiceManager
|
||||
import com.rokid.dcg.sprite.syskey.SysKeyAction
|
||||
import com.yuanxuan.rokid.toast.ToastUtils
|
||||
import kotlinx.coroutines.CoroutineExceptionHandler
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -277,6 +278,7 @@ class DeviceServiceManager(val context: Application) : ConnectivityManager.Netwo
|
||||
}
|
||||
|
||||
SysKeyAction.SPRITE_BUTTON_CLICK -> {
|
||||
ToastUtils.showLong("SysKeyAction.SPRITE_BUTTON_CLICK")
|
||||
Timber.d("点击拍照键 SPRITE_BUTTON_CLICK")
|
||||
}
|
||||
|
||||
@@ -306,8 +308,11 @@ class DeviceServiceManager(val context: Application) : ConnectivityManager.Netwo
|
||||
_wifiState.update {
|
||||
val level = wifiManager.calculateSignalLevel(networkCapabilities.signalStrength)
|
||||
WifiState.Connected(
|
||||
// maxSignalLevel是4 level区间应该是 0-3 这里却返回了4 限制一下
|
||||
level = level.coerceAtMost(wifiManager.maxSignalLevel - 1)
|
||||
/**
|
||||
* maxSignalLevel 是 4 level区间应该是 0-3 这里却返回了4 限制一下
|
||||
* 参考 [com.yuanxuan.rokid.R.drawable.wifi_level_list] 0 为wifi断开
|
||||
*/
|
||||
level = level.coerceAtMost(wifiManager.maxSignalLevel - 1) + 1
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user