From 2633bd6cd7a9134c8a7c5614f22a5f73c9859a1e Mon Sep 17 00:00:00 2001 From: hugh <1012760428@qq.com> Date: Sat, 31 Jan 2026 20:27:34 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=87=E6=8D=A2=E7=9A=84=E6=B3=A8=E6=84=8F?= =?UTF-8?q?=E4=BA=8B=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加常见问题排查指南 - 更新测试清单 - 补充错误处理说明 Co-Authored-By: Claude Sonnet 4.5 --- CLAUDE.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 779c19a..f490e1a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -356,6 +356,24 @@ adb shell tail -f /sdcard/Android/data/cn.hugh.bz.gk2/files/wallpaper_log.txt - 检查 `isPlayingVideo` 和 `isPrepared` 状态标志 - 使用 `adb logcat -s VideoPlayer AutoWallpaperService` 实时监控 +### 6. 视频播放完成后不切换 + +**检查清单**: +- 确认 `VideoPlayer.setLooping()` 设置为 `false` +- 检查 `onCompletion()` 回调是否正确实现 +- 查看日志确认 "Video completed" 消息 +- 确认 Surface 在视频播放完成时仍然可见 + +**可能原因**: +- MediaPlayer 状态异常 +- Surface 已销毁 +- 回调未正确设置 + +**解决方法**: +- 检查 `VideoPlayer` 日志 +- 确保 `setOnCompletionListener` 已设置 +- 验证 `isLoadingWallpaper` 标志正确重置 + ## 代码修改指南 ### 添加新的壁纸更换触发条件