Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 037d6e9f authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Move ProtoLog's configuration service registerClient binder call onto background thread

This is to avoid making a binder call on the main thread which is in the critical execution path

Bug: 394576783
Change-Id: I802981a9d4478c712dd230351fb0ef9faafbc437
Flag: android.tracing.client_side_proto_logging
parent 8d98da09
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ public abstract class PerfettoProtoLogImpl extends IProtoLogClient.Stub implemen
        Objects.requireNonNull(mConfigurationService,
                "A null ProtoLog Configuration Service was provided!");

        mBackgroundLoggingService.execute(() -> {
            try {
                var args = createConfigurationServiceRegisterClientArgs();

@@ -173,6 +174,7 @@ public abstract class PerfettoProtoLogImpl extends IProtoLogClient.Stub implemen
            } catch (RemoteException e) {
                throw new RuntimeException("Failed to register ProtoLog client");
            }
        });
    }

    /**