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` 标志正确重置 + ## 代码修改指南 ### 添加新的壁纸更换触发条件