Split ambient pulse notif logic from heads up.
This CL aims to split the ambient pulse logic from the heads up logic as a lot of the logic is specific to one or the other. This CL introduces the following major changes. 1. Introduces AmbientPulseManager which manages notifications that pulse while the screen is dozing or on AOD and manages their lifetime. 2. Ties pulse duration for notifications more tightly with the lifetime. This means DozeScrimController does not control the pulse time but instead AmbientPulseManager. This is because previously, having two separate lifetimes (one for the pulse, one for the notification) caused some strange issues to occur if one ended before the other. 3. Divide out logic for heads up and ambient pulse, so they are no longer both tied to shouldPeek in NotificationEntryManager. 4. Multiple naming refactors for readability (e.g. contains -> isAlerting, mShowAmbient -> mOnAmbient, etc.). Although this is a refactor, some of the behavior does change in some places where I thought the current behavior was not intended. In particular: * Ambient notifications are no longer marked as seen immediately on pulsing. We should reserve this for when we are confident the user has seen the notification. * Ambient notifications are no longer disabled or snoozed when heads up notifications are disabled or snoozed respectively. * Removing/cancelling a notification that is pulsing no longer keeps the pulse going awkwardly with no notification in the middle. Instead, the pulse ends (provided it was shown for a minimum amount of time). Change-Id: I26af6f7e7ad7fa71d2d43f7c4d86fb34551151b0 Test: manual, runtest systemui
Loading
Please register or sign in to comment