Extend lifetime of notifs during activity launch
Clicking on a notification can result in a chain of asynchronous code, depending on the state of the shade and keyguard. If the notification that was clicked is cancelled during this async flow, then when it's finally complete, if the notification has FLAG_AUTO_CANCEL, SystemUI will attempt to dismiss the notification, which is no longer there according to the pipeline, due to the aforementioned cancellation. This CL fixes the issue by introducing a new ActivityLaunchAnimCoordinater that registers a lifetime extender to keep notifications alive during their launch animation. Fixes: 219939676 Test: atest SystemUITests Test: 1. Install Notify.apk (go/notify-apk) 2. In the Notify app: Check off Delayed 5000 and Auto Cancel 3. Click "Add" and spam click "Update" (5-10 times should suffice) 4. Expand notification shade 5. Immediately tap the Notify notification when it gets posted Observe: no crashing Change-Id: I819ad840845df1bfa3acd71187c6ba47de9a64b7
Loading
Please register or sign in to comment