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

Commit b964f249 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Initialize ProtoLog once on first activity launch

Fixes an IllegalStateException crash caused by using ProtoLog before it
was initialized. This could happen in UI processes where logging code
was called during the activity lifecycle before ProtoLog.start() was
invoked.

This change moves the initialization to handleLaunchActivity(), ensuring
it runs in processes that have a UI. A static boolean,
sProtoLogInitialized, is used to guarantee that the initialization
occurs only once per process, on the first activity launch.

The ProtoLog initialization here will be guarded by a flag to roll out
gradually and safely.

Bug: 432646252
Flag: android.tracing.imetracker_protolog
Change-Id: Ia9160a26702550d7bc7ef6a0c2e1e7e4f4cdf490
parent 06e27907
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment