diff --git a/service/src/main/java/com/topjohnwu/superuser/internal/RootServiceServer.java b/service/src/main/java/com/topjohnwu/superuser/internal/RootServiceServer.java index 27a6d6d..16bbb51 100644 --- a/service/src/main/java/com/topjohnwu/superuser/internal/RootServiceServer.java +++ b/service/src/main/java/com/topjohnwu/superuser/internal/RootServiceServer.java @@ -97,6 +97,10 @@ public class RootServiceServer extends IRootServiceManager.Stub { @Override public void connect(IBinder binder, boolean debug) { + UiThreadHandler.run(() -> connectInternal(binder, debug)); + } + + private void connectInternal(IBinder binder, boolean debug) { ClientProcess c = clients.get(getCallingUid()); if (c != null) return;