Commit Graph
34 Commits
Author SHA1 Message Date
hughhuangandClaude Sonnet 4.5 390d417f5b build: 修正 Gradle 9.0 完整版本号并添加 .gitignore
- Gradle: 9.0 → 9.0.0(完整版本号)
- 添加标准 Android .gitignore 文件
- 忽略 .gradle/、.idea/、build/ 等构建产物

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:58:57 +08:00
hughhuangandClaude Sonnet 4.5 35fd1a2ba0 build: 升级到 Gradle 9.0
- Gradle: 8.5 → 9.0
- 使用腾讯云镜像 mirrors.cloud.tencent.com
- 完全支持 Java 21

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:55:05 +08:00
hughhuangandClaude Sonnet 4.5 7ebe03e66c fix: 使用腾讯云镜像下载 Gradle 8.5
- Gradle 8.5 完全支持 Java 21
- 使用腾讯云镜像 mirrors.cloud.tencent.com

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:54:28 +08:00
hughhuangandClaude Sonnet 4.5 75c60ff83b fix: 降级到 Gradle 8.5 以兼容 Java 21
- Gradle 9.0 在国内镜像不可用
- Gradle 8.5 完全支持 Java 21
- 使用清华镜像 mirrors.tuna.tsinghua.edu.cn

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:52:27 +08:00
hughhuangandClaude Sonnet 4.5 f0fa44f22d fix: 切换到华为云镜像下载 Gradle 9.0
- 腾讯云镜像可能没有 Gradle 9.0
- 改用华为云镜像 repo.huaweicloud.com

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:52:12 +08:00
hughhuangandClaude Sonnet 4.5 fa7331bff2 build: 升级到 Gradle 9.0 和 AGP 8.7.3 以支持 Java 21
- Gradle: 8.0 → 9.0(使用腾讯云镜像)
- Android Gradle Plugin: 8.1.0 → 8.7.3
- Java: 兼容 Java 17-21
- 保持 compileSdk 33, targetSdk 31(可后续升级)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:51:40 +08:00
hughhuangandClaude Sonnet 4.5 fc678a6bf2 fix: 配置腾讯云镜像和优化网络设置
- Gradle Wrapper 使用腾讯云镜像,避免 GitHub 访问问题
- 增加网络超时时间到 10 分钟
- 启用 Gradle 缓存和按需配置
- 预留代理配置选项

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:50:28 +08:00
hughhuangandClaude Sonnet 4.5 953815e400 build: 升级到 Java 17 并配置国内镜像
- 修改 sourceCompatibility 和 targetCompatibility 到 VERSION_17
- 添加阿里云镜像仓库以加速依赖下载
- 优化 gradle.properties 配置(并行构建、内存设置)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:49:57 +08:00
hughhuangandClaude Sonnet 4.5 81855239d2 docs: 添加代码审查报告
- MVP 功能完整性:100% 完成
- 整体评分:⭐⭐⭐⭐☆ (4/5 星)
- 发现 13 个问题(P1: 3个, P2: 5个, P3: 5个)
- 验证所有已知问题确实存在
- 新发现 2 个问题(SeekBar边界、Bitmap内存泄漏)
- 提供 3 个修复方案(渐进式修复推荐)

关键发现:
✅ 优点:功能完整、性能优化、代码清晰
⚠️ 缺点:数据模型可变、线程安全、内存管理

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 00:22:06 +08:00
hughhuangandClaude Sonnet 4.5 13d9f5d853 docs: 添加代码质量审查问题跟踪
- 记录所有审查发现的问题和优化建议
- 按优先级分类(P1: 重要问题, P2: 功能增强, P3: 代码优化)
- 提供详细的修复方案和代码示例
- 制定后续优化实施计划(3个阶段)

包含 10 个优化任务:
- P1: WallpaperImage 改进、AppConfig 封装性、targetSdk 升级
- P2: Parcelable 实现、配置验证、线程安全
- P3: JavaDoc、枚举增强、Gradle 优化、单元测试

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 00:04:24 +08:00
hughhuangandClaude Sonnet 4.5 1487948ae7 chore: 完成 MVP 实现
已完成所有 Task 5-12 的开发任务

## Task 5: 定时调度
- AlarmScheduler.java - 支持 1-60 分钟间隔的定时任务
- 兼容 Android 12+ 精确闹钟权限

## Task 6: 广播接收器
- WallpaperChangeReceiver.java - 接收定时任务触发壁纸更新
- 更新 AutoWallpaperService.java - 支持刷新广播

## Task 7: 图片扫描
- JsonHelper.java - JSON 索引存储
- ImageScanner.java - 文件夹扫描和图片索引

## Task 8: 主界面
- strings.xml - 字符串资源
- colors.xml - 颜色资源
- activity_main.xml - 主界面布局
- MainActivity.java - 主界面逻辑

## Task 9: 设置页面
- activity_settings.xml - 设置界面布局
- SettingsActivity.java - 设置界面逻辑

## Task 10: 壁纸配置
- wallpaper_info.xml - 壁纸元数据

## 项目统计
- 13 个 Java 源文件
- 5 个 XML 资源文件
- 完整的 MVP 功能实现

## 下一步
需要在 Android Studio 中完成:
1. 添加应用图标(mipmap 资源)
2. 添加 Gradle Wrapper(gradle-wrapper.jar)
3. 编译项目验证功能
4. 在鸿蒙 4.2 设备上测试

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 00:03:09 +08:00
hughhuangandClaude Sonnet 4.5 f933b03e14 feat: 添加壁纸元数据配置
创建了壁纸服务的元数据文件

- 定义壁纸描述文本
- 设置壁纸缩略图
- 用于在系统壁纸选择器中显示

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 00:01:35 +08:00
hughhuangandClaude Sonnet 4.5 62a89ead44 feat: 添加设置页面 Activity
实现了设置页面的所有功能

- 播放模式选择(顺序/随机)
- 更换间隔调整(1-60 分钟滑块)
- 实时显示间隔时间
- 保存配置到 SharedPreferences
- 如果服务已启用,自动重新调度定时器
- 保存后自动关闭页面并显示提示

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 00:01:24 +08:00
hughhuangandClaude Sonnet 4.5 aa65cce3b0 feat: 添加设置页面布局
创建了设置页面的 UI 布局

- 标题显示
- 播放模式选择(顺序/随机)
- 更换间隔滑块(1-60 分钟)
- 间隔时间实时显示
- 保存按钮

使用 ConstraintLayout 实现响应式布局

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 00:01:08 +08:00
hughhuangandClaude Sonnet 4.5 e331b0251c feat: 添加主界面 Activity
实现了主界面的所有功能

- 服务启用/禁用切换
- 立即更换壁纸
- 打开文件夹选择器
- 打开设置页面
- 动态更新 UI 状态
- 显示文件夹和图片统计信息
- 使用 ActivityResultLauncher 处理文件夹选择结果

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 00:00:37 +08:00
hughhuangandClaude Sonnet 4.5 535ce9a22d feat: 添加主界面布局
创建了主界面的 UI 布局

- 应用标题显示
- 服务状态显示(运行中/已停止)
- 启用/禁用按钮
- 立即更换按钮
- 选择文件夹按钮
- 设置按钮
- 文件夹信息显示

使用 ConstraintLayout 实现居中布局

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:59:42 +08:00
hughhuangandClaude Sonnet 4.5 1f2e9c113c feat: 添加颜色资源文件
定义了应用的主题颜色

- Material Design 紫色系(purple_200/500/700)
- 青色系(teal_200/700)
- 基础颜色(黑色、白色)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:59:19 +08:00
hughhuangandClaude Sonnet 4.5 d58edcbfa2 feat: 添加字符串资源文件
定义了应用的所有字符串资源

- 应用名称和描述
- 按钮文本(启用、禁用、立即更换、选择文件夹、设置)
- 状态文本(运行中、已停止、未选择文件夹)
- 时间显示文本

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:59:02 +08:00
hughhuangandClaude Sonnet 4.5 78d33cc460 feat: 添加 ImageScanner 图片扫描工具
实现了文件夹扫描和图片索引功能

- 扫描指定文件夹中的图片文件
- 支持 jpg、jpeg、png、webp、bmp 格式
- 使用 JSON 缓存避免重复扫描
- 支持按索引获取图片
- 支持随机获取图片(可排除当前图片)
- 统计总图片数量

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:58:49 +08:00
hughhuangandClaude Sonnet 4.5 b63156cda9 feat: 添加 JsonHelper JSON 索引存储
实现了图片索引的 JSON 文件存储功能

- 保存文件夹扫描结果到 JSON 文件
- 从 JSON 文件加载图片索引
- 智能检测是否需要重新扫描
- 支持文件夹路径哈希命名
- 使用 Gson 进行 JSON 序列化

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:58:21 +08:00
hughhuangandClaude Sonnet 4.5 10f96fa99d feat: 添加 WallpaperChangeReceiver 广播接收器
实现了接收定时任务的广播接收器,触发壁纸更新

- 接收 ACTION_CHANGE_WALLPAPER 广播
- 刷新当前壁纸
- 调度下一次壁纸更换
- 持久化配置支持

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:57:47 +08:00
hughhuangandClaude Sonnet 4.5 cef3caf355 feat: 添加 AlarmScheduler 定时调度器
实现了定时任务调度功能,支持 1-60 分钟间隔的壁纸自动更换

- 支持 Android 12+ 的精确闹钟权限检查
- 使用 setExactAndAllowWhileIdle 确保在低功耗模式下正常工作
- 兼容 Android M 及以上版本
- 实现取消调度功能

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:57:35 +08:00
hughhuangandClaude Sonnet 4.5 ccb5b6b287 feat: 添加壁纸服务
- 继承 WallpaperService
- 注册刷新广播接收器
- 创建 WallpaperEngine 实例

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:55:54 +08:00
hughhuangandClaude Sonnet 4.5 eab6ee4ce5 feat: 添加壁纸引擎
- 实现 Canvas 绘制逻辑
- 支持顺序和随机播放模式
- 添加占位符显示

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:55:46 +08:00
hughhuangandClaude Sonnet 4.5 c28ce244ea feat: 添加图片加载器
- 实现图片采样和缩放功能
- 使用 RGB_565 降低内存占用
- 自动计算 inSampleSize 优化加载性能

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:55:35 +08:00
hughhuangandClaude Sonnet 4.5 9d6b34cde7 feat: 添加 SharedPreferences 管理类
- 实现配置加载和保存功能
- 使用 Gson 序列化文件夹列表
- 支持保存和读取最后显示的壁纸 URI

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:54:29 +08:00
hughhuangandClaude Sonnet 4.5 ae29ac8255 feat: 添加 AppConfig 配置类
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:51:06 +08:00
hughhuangandClaude Sonnet 4.5 57bfb756ef feat: 添加 WallpaperImage 数据类
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:50:55 +08:00
hughhuangandClaude Sonnet 4.5 4ddda30063 feat: 添加 PlayMode 枚举
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:50:48 +08:00
hughhuangandClaude Sonnet 4.5 d661b6bb56 chore: 初始化 Android 项目结构
- 创建项目配置文件(settings.gradle, build.gradle)
- 配置应用模块(app/build.gradle)
- 配置 Gradle Wrapper
- 添加 ProGuard 混淆规则
- 配置 AndroidManifest.xml(权限和组件声明)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:49:38 +08:00
hughhuangandClaude Sonnet 4.5 a5968393b3 feat: add manifest with permissions and components
创建 AndroidManifest.xml 文件,配置应用权限和组件:
- 声明所需权限(存储访问、设置壁纸、定时任务等)
- 注册主 Activity 和设置 Activity
- 配置自动壁纸服务
- 添加壁纸变更广播接收器

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:45:47 +08:00
hughhuangandClaude Sonnet 4.5 41fa3b04a5 chore: configure app module with dependencies
配置应用模块的构建设置,添加必要的依赖库:
- AndroidX 核心库
- Material Design 组件
- Glide 图片加载库
- Gson JSON 解析库

同时配置 Gradle wrapper 设置。

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:45:39 +08:00
hughhuangandClaude Sonnet 4.5 4b07f6bc3e chore: add root build configuration
配置项目级别的构建设置,包括仓库地址和 Android Gradle 插件依赖。

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:45:36 +08:00
hughhuangandClaude Sonnet 4.5 ff9b8c30ae chore: initialize project settings
创建项目根配置文件,定义项目名称和模块结构。

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:45:33 +08:00