- SettingsViewModel改用SnRepository进行设备注册 - 移除RxLifecycle手动绑定基类,改用AndroidX Lifecycle - 新增系统、硬件、网络、安全、定位等SN信息上报接口 - 修复ContactInfo equals逻辑错误 - 应用列表变化后自动清理失效启动页
19 lines
814 B
Java
19 lines
814 B
Java
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 {
|
||
|
||
}
|