-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Parent #16062
Notification trampoline restrictions
TL;DR
As part of fixing new Lint warnings, due to upgrading to AGP 7.0.4, a new Notification Trampolines warning appeared for the PostUploadNotfier.java class (line 373).
Although this new Lint issue is a warning at the moment, it will become forbidden when the targetSdkVersion will be set to API level for Android 12 or higher.
Details
This intent launches a BroadcastReceiver (ShareAndDismissNotificationReceiver) which launches activities; this indirection is bad for performance, and activities should be launched directly from the notification. Activities should not be launched indirectly from a notification via an intermediate BroadcastReceiver or Service. This can lead to significant lags in some scenarios. To fix this, launch the Activity directly from the notification.
Assignment
I am assigning this to you @ashiagr so that you are aware of it and can plan it accordingly during the Android 12 upgrade. I did that since you are the DRI on min/compile/target SDK versions for this repo.