Commit Graph
3 Commits
Author SHA1 Message Date
tongtong a972ce7b89 refactor(app): 统一工具类并简化服务架构
- 移除 GuardService、StepService、ControlPanelService,替换为 SocketService
- 将 QR 码生成从 Utils 迁移到 BitmapUtils
- 将缓存目录选择逻辑统一到 FileUtils.getCacheFileDir
- 将 ServiceAliveUtils、NetStateUtils 合并到 SystemUtils
- 将 CacheUtils 同步清理替换为 ApkUtils.cleanApplicationUserDataAsync
- 用 EncryptUtils 替代自定义 MD5Util
- 重写 catchException 支持主线程兜底循环与子线程 Bugly 上报
- 移除 RunningAppManager 中未使用的 killBackgroundProcesses 方法
- 移除 ControlManager 中冗余的 hideSystemSettingAPP 调用
- MyGlideModule 重命名为 BaseGlideModule
2026-11-07 17:55:56 +08:00
tongtong df8a7bc153 refactor(utils): 清理未使用的工具类和方法
- 删除整个 AppsManagerUtils、AppUpdateInfo、ForegroundAppUtil 类
- 移除 ApkUtils 中未使用的方法,包括 getRootAhth、openApp、installApkInSilence、addShortcut、getTaskPackname、queryFilterAppInfo、getAppIcon 等
- 移除 CacheUtils 中未使用的 getApplicationCache 方法和 PackageStatsObserver 内部类
- 移除 CXAESUtil 中未使用的加解密及文件操作方法
- 将 StringUtils.join 替换为 String.join 以消除自定义依赖
- 清理各文件中未使用的 import 语句和冗余字段
2026-11-07 15:13:29 +08:00
tongtong f7fd668a45 refactor(sync): 拆分 NetInterfaceManager 为独立同步模块与仓库层
- 将 NetInterfaceManager 上帝类按职责拆分为 AppUpdateCoordinator、DeviceProfileSync、AppInventorySync、TimePolicySync 等独立同步模块
- 新增 DeviceRepository 统一管理网络请求与多级缓存能力,StatisticsRepository 改为依赖 DeviceRepository
- 各 ViewModel 引入 CompositeDisposable 管理订阅生命周期,onDestroy 时统一释放
- 使用 RequestCompletion 辅助类将 Disposable 自动加入 CompositeDisposable,消除手动管理
- ControlStatusCombined 数据模型去除 BaseResponse 包装,直接持有业务数据,通过 unwrap 方法统一解包
- BaseApplication 中逐一初始化各同步模块,替代原 NetInterfaceManager.init 单入口
- MainViewModel 错误回退逻辑从手动 Gson 反序列化改为调用 DeviceRepository.getCachedSnInfo
- UsageDetailViewModel 返回类型从 BaseResponse<AppUseTimeData> 简化为 AppUseTimeData
2026-11-07 11:56:10 +08:00