fix: 移除 onCompletion 中的 forceChangeNext 设置
- 按照规范要求使用正常流程,不强制更换 - 调整日志信息与规范一致 - 保持状态重置和 handler.post 调用 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
40ec63f483
commit
a67fa45786
1 file changed
+8
-8
@@ -184,14 +184,14 @@ public class AutoWallpaperService extends WallpaperService {
|
||||
|
||||
@Override
|
||||
public void onCompletion() {
|
||||
Log.i(TAG, "Video playback completed, switching to next wallpaper");
|
||||
fileLogger.log(TAG, "Video completed, triggering next wallpaper");
|
||||
// 视频播放完成,标记为未播放状态
|
||||
isPlayingVideo = false;
|
||||
isLoadingWallpaper = false;
|
||||
// 设置强制更换标志,触发下一个壁纸
|
||||
forceChangeNext = true;
|
||||
handler.post(() -> drawWallpaper());
|
||||
fileLogger.log(TAG, "Video completed, switching to next media");
|
||||
isLoadingWallpaper = false; // 允许新的加载请求
|
||||
isPlayingVideo = false; // 标记当前不在播放视频
|
||||
|
||||
// 触发切换到下一个媒体(不设置 forceChangeNext,使用正常流程)
|
||||
handler.post(() -> {
|
||||
drawWallpaper();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user