muhomorr Unfortunately, logs were coming in every second, so I couldn't tell which of them were due to tapping the notification . But, based on roughly matching up the timing afterward, and the context of this being due to an activity trying to be launched from the background, I think these logs are it:
Logs while notifications are appearing:
10-15 21:26:56.868 1665 4543 I ActivityTaskManager: START u10 {act=com.google.android.gms.cast.activity.CAST_CONNECTION_NOTIFY flg=0x34010000 pkg=com.google.android.gms cmp=com.google.android.gms/.cast.activity.CastPopupActivity (has extras)} from uid 1010125
10-15 21:26:56.869 1665 4543 W ActivityTaskManager: Background activity start [callingPackage: com.google.android.gms; callingUid: 1010125; appSwitchState: 2; isCallingUidForeground: false; callingUidHasAnyVisibleWindow: false; callingUidProcState: FOREGROUND_SERVICE; isCallingUidPersistentSystemProcess: false; realCallingUid: 1010125; isRealCallingUidForeground: false; realCallingUidHasAnyVisibleWindow: false; realCallingUidProcState: FOREGROUND_SERVICE; isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: null; allowBackgroundActivityStart: false; intent: Intent { act=com.google.android.gms.cast.activity.CAST_CONNECTION_NOTIFY flg=0x34010000 pkg=com.google.android.gms cmp=com.google.android.gms/.cast.activity.CastPopupActivity (has extras) }; callerApp: ProcessRecord{af32039 21788:com.google.android.gms.persistent/u10a125}; inVisibleTask: false]
10-15 21:26:56.870 1665 4543 D CompatibilityChangeReporter: Compat change id reported: 194480991; UID 1010125; state: ENABLED
10-15 21:26:56.870 1665 4543 E ActivityTaskManager: Abort background activity starts from 1010125
10-15 21:26:56.893 1665 4543 I ActivityTaskManager: START u10 {act=com.google.android.gms.cast.activity.CAST_CONNECTION_NOTIFY flg=0x34010000 pkg=com.google.android.gms cmp=com.google.android.gms/.cast.activity.CastPopupActivity (has extras)} from uid 1010125
10-15 21:26:56.893 1665 4543 W ActivityTaskManager: Background activity start [callingPackage: com.google.android.gms; callingUid: 1010125; appSwitchState: 2; isCallingUidForeground: false; callingUidHasAnyVisibleWindow: false; callingUidProcState: FOREGROUND_SERVICE; isCallingUidPersistentSystemProcess: false; realCallingUid: 1010125; isRealCallingUidForeground: false; realCallingUidHasAnyVisibleWindow: false; realCallingUidProcState: FOREGROUND_SERVICE; isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: null; allowBackgroundActivityStart: false; intent: Intent { act=com.google.android.gms.cast.activity.CAST_CONNECTION_NOTIFY flg=0x34010000 pkg=com.google.android.gms cmp=com.google.android.gms/.cast.activity.CastPopupActivity (has extras) }; callerApp: ProcessRecord{af32039 21788:com.google.android.gms.persistent/u10a125}; inVisibleTask: false]
10-15 21:26:56.894 1665 4543 E ActivityTaskManager: Abort background activity starts from 1010125
10-15 21:26:57.093 1665 1665 W NotificationHistory: Attempted to add notif for locked/gone/disabled user 10
10-15 21:26:57.100 1665 1665 E NotificationService: Muting recently noisy 10|app.grapheneos.gmscompat|10003|null|1010051
10-15 21:26:57.103 1665 1665 W NotificationHistory: Attempted to add notif for locked/gone/disabled user 10
10-15 21:26:59.731 1665 3637 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
Logs while tapping notifications:
10-15 21:36:29.763 1665 16245 I ActivityTaskManager: START u10 {act=com.google.android.gms.cast.activity.CAST_CONNECTION_NOTIFY flg=0x34010000 pkg=com.google.android.gms cmp=com.google.android.gms/.cast.activity.CastPopupActivity (has extras)} from uid 1010125
10-15 21:36:29.775 1665 16245 W ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (10700248)
10-15 21:36:30.066 1665 16245 I ActivityTaskManager: START u10 {act=com.google.android.gms.cast.activity.CAST_CONNECTION_NOTIFY flg=0x34010000 pkg=com.google.android.gms cmp=com.google.android.gms/.cast.activity.CastPopupActivity (has extras)} from uid 1010125
10-15 21:36:30.080 1665 16245 W ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (10700810)
10-15 21:36:32.626 1665 16245 I ActivityTaskManager: START u10 {act=com.google.android.gms.cast.activity.CAST_CONNECTION_NOTIFY flg=0x34010000 pkg=com.google.android.gms cmp=com.google.android.gms/.cast.activity.CastPopupActivity (has extras)} from uid 1010125
10-15 21:36:32.640 1665 16245 W ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (10701115)
10-15 21:36:32.654 1665 16245 I ActivityTaskManager: START u10 {act=com.google.android.gms.cast.activity.CAST_CONNECTION_NOTIFY flg=0x34010000 pkg=com.google.android.gms cmp=com.google.android.gms/.cast.activity.CastPopupActivity (has extras)} from uid 1010125
10-15 21:36:32.659 1665 16245 I ActivityTaskManager: Add Task{5a6c48a #1001003 type=standard A=1010125:com.google.android.gms U=10 visible=false visibleRequested=false mode=fullscreen translucent=true sz=1} to hidden list because adding Task{9349f56 #1001004 type=standard A=1010125:com.google.android.gms U=10 visible=true visibleRequested=false mode=fullscreen translucent=true sz=1}
10-15 21:36:32.662 1665 3770 W ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (10703674)
10-15 21:36:33.258 1665 3637 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
Maybe this is a google play services bug related to casting? And if so, how could gmscompat avoid spamming the user with notifications?
Next time this happens, I'll filter the logs for "gms" so it'll be easier to tell which are a result of tapping the notifications.