Merge "Avoid potential NPE by accessing ActivityRecord on logger thread" into main