Fix NPE in ActivityRecord.inSizeCompatMode()

- Since commit c3cb0cb, isSizeCompatMode is included in protoDump.
  If ActivityMetricsLogger dumps log and the Activity is in detached
  state, then 'parent' can be null.

Bug: 183043632
Test: atest AndroidCarApiTest in cf_x86_auto-userdebug
Change-Id: I823e787ce4f1c70736edcb10e043a4062a31e774
1 file changed