fix WM instance leaks

Somehow weak references to WindowTracingPerfetto's methods become null,
even though WindowTracingPerfetto is not garbage collected.

Directly referencing (weakly) WindowTracingPerfetto,
instead of its methods, solves the issue.

Flag: android.tracing.perfetto_wm_tracing
Bug: 323165543
Test: presubmit
Change-Id: I73eb10b76d7e6ab3666ac977159d04ad0b38fd17
2 files changed