Update ProtoLog cache updater to take an ProtoLog instance object
Instead to querying the static variable directly, we pass the instance to use to query the state of tracing.
This makes testing easier, but also addressed the issue of having to
call the cacheUpdate method while enabling the PerfettoProtoLogImpl
which has to happen before we set the instance as the static singleton
this means the update cache method cannot rely on this static variable
on the first call since it won't be set yet as the ProtoLogImpl will not
be fully initialized at that point.
Flag: android.tracing.perfetto_protolog_tracing
Bug: 369560789
Test: atest TracingTests
Change-Id: Ib2befa74bf3f4a89dcf093bdbb0b9cf37c3ac456
10 files changed