debug: 启动时打印设备所有可用传感器列表
检查是否有陀螺仪/旋转向量等传感器可用于改进抬手检测。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,13 @@ class FiseAccelerometerWake @Inject constructor(
|
|||||||
override fun start() {
|
override fun start() {
|
||||||
if (started) return
|
if (started) return
|
||||||
|
|
||||||
|
// 列出设备所有可用传感器(调试用,正式发布删除)
|
||||||
|
val allSensors = sensorManager.getSensorList(Sensor.TYPE_ALL)
|
||||||
|
Timber.i("抬手亮屏: 设备传感器列表(共 %d 个):", allSensors.size)
|
||||||
|
for (s in allSensors) {
|
||||||
|
Timber.i(" - type=%d name=%s vendor=%s", s.type, s.name, s.vendor)
|
||||||
|
}
|
||||||
|
|
||||||
// 方案D:优先尝试 TYPE_WRIST_TILT_GESTURE (type=26, API 20+)
|
// 方案D:优先尝试 TYPE_WRIST_TILT_GESTURE (type=26, API 20+)
|
||||||
val wristTilt = sensorManager.getDefaultSensor(26)
|
val wristTilt = sensorManager.getDefaultSensor(26)
|
||||||
if (wristTilt != null) {
|
if (wristTilt != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user