Revert "Revert "Log the apk optimization state in the MetricsLogger""

This reverts commit 5ad65cb1786bae05a9164b61395b2209551ac3b8.

Reason for revert: Fix the original issue. There was a race with the
cleanup method which was resetting the app record to null.

Test: manual, adb logcat -b events | grep sysui_multi_action
      repeat steps from bugreport reporting the crash
Bug: 73102540

Change-Id: I6d9c6110a9d5dadeb9d4361592711d63563c958a
1 file changed
tree: 5346d5ecb81b77c84b6ac6f552506416da42e788
  1. bin/