Call `systemMain` after prepare (#1692)

This commit is contained in:
LoveSy 2022-02-14 20:27:41 +08:00 committed by GitHub
parent f8198488aa
commit e17c39318d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -95,13 +95,13 @@ public class ServiceManager {
System.exit(1);
});
ActivityThread.systemMain();
logcatService = new LogcatService();
logcatService.start();
Process.setThreadPriority(Process.THREAD_PRIORITY_FOREGROUND);
Looper.prepareMainLooper();
mainService = new LSPosedService();
applicationService = new LSPApplicationService();
managerService = new LSPManagerService();
@ -116,6 +116,8 @@ public class ServiceManager {
var configManager = ConfigManager.getInstance();
// --- DO NOT call ConfigManager.getInstance later!!! ---
ActivityThread.systemMain();
waitSystemService("package");
waitSystemService("activity");
waitSystemService(Context.USER_SERVICE);