更改判断应用前后台状态的实现逻辑
This commit is contained in:
@ -219,7 +219,7 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
// 必须放在这里,否则会导致获取 baseActivity 不是本应用包名
|
||||
// postDelayed 是为了让 ProcessLifecycleOwner 知道准确状态,避免调用 startForegroundService
|
||||
handler.postDelayed(() -> DownloadManager.getInstance(this).initDownloadService(), 0);
|
||||
DownloadManager.getInstance(this).initDownloadService();
|
||||
|
||||
checkNotificationPermission();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user