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

Commit 9732c70a authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Revert^2 "Initialize ProtoLog instances statically"

6eac90fe

Change-Id: Id761103329edc3ad537566c618564a2fd1ba4597
parent 90b0fcd3
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -169,4 +169,16 @@ public class ProtoLog {
            sProtoLogInstance.log(logLevel, group, stringMessage, args);
        }
    }

    static {
        if (android.tracing.Flags.perfettoProtologTracing()) {
            sProtoLogInstance = new PerfettoProtoLogImpl();
        } else {
            if (REQUIRE_PROTOLOGTOOL) {
                throw new RuntimeException("REQUIRE_PROTOLOGTOOL not set to false.");
            } else {
                sProtoLogInstance = new LogcatOnlyProtoLogImpl();
            }
        }
    }
}