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

Commit 80c02c3c authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Fix constructor check

And convert to runtime error instead of just an assertion

Test: n/a

Flag: EXEMPT bug fix
Change-Id: Ia945cb55679f8f5d12ed5f5a7b7b6aad778c9408
parent 8b6d2d95
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -162,8 +162,10 @@ public class PerfettoProtoLogImpl extends IProtoLogClient.Stub implements IProto
            @Nullable ViewerConfigInputStreamProvider viewerConfigInputStreamProvider,
            @Nullable ProtoLogViewerConfigReader viewerConfigReader,
            @NonNull Runnable cacheUpdater) {
        assert (viewerConfigFilePath == null || viewerConfigInputStreamProvider == null) :
                "Only one of viewerConfigFilePath and viewerConfigInputStreamProvider can be set";
        if (viewerConfigFilePath != null && viewerConfigInputStreamProvider != null) {
            throw new RuntimeException("Only one of viewerConfigFilePath and "
                    + "viewerConfigInputStreamProvider can be set");
        }

        Producer.init(InitArguments.DEFAULTS);
        DataSourceParams params =