Files
ElderlyDialer/app/src/main/java/com/ttstd/dialer/base/BaseService.java
TongTongStudio 5072917758 fix(settings): 重构SN上报并清理失效启动页
- SettingsViewModel改用SnRepository进行设备注册
- 移除RxLifecycle手动绑定基类,改用AndroidX Lifecycle
- 新增系统、硬件、网络、安全、定位等SN信息上报接口
- 修复ContactInfo equals逻辑错误
- 应用列表变化后自动清理失效启动页
2026-08-22 12:31:20 +08:00

19 lines
814 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.ttstd.dialer.base;
import androidx.lifecycle.LifecycleService;
/**
* Service 基类(基于 AndroidX {@link LifecycleService})。
* <p>
* 通过继承 {@link LifecycleService} 自动获得:
* - {@link androidx.lifecycle.LifecycleOwner} 能力
* - 生命周期事件自动派发:onCreate → ON_CREATE,onStartCommand → ON_START / ON_RESUME,onDestroy → ON_DESTROY
* (其中 ON_START / ON_RESUME 满足 Service 中 LiveData 的触发条件,无需再手动修补)
* - 不再需要手动维护 {@link androidx.lifecycle.LifecycleRegistry} 或覆写生命周期方法派发事件
* <p>
* 子类如需在生命周期回调中做处理,可直接覆写 onStartCommand / onDestroy 并调用 super。
*/
public abstract class BaseService extends LifecycleService {
}