Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1cb8467 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update HUNCoordinator's lifetime extender"

parents c77e818e 7ef9c265
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -204,10 +204,8 @@ public class HeadsUpCoordinator implements Coordinator {
        public void onHeadsUpStateChanged(NotificationEntry entry, boolean isHeadsUp) {
            NotificationEntry newHUN = mHeadsUpManager.getTopEntry();
            if (!Objects.equals(mCurrentHun, newHUN)) {
                endNotifLifetimeExtension();
                mCurrentHun = newHUN;
                mNotifPromoter.invalidateList();
                mNotifSectioner.invalidateList();
                endNotifLifetimeExtension();
            }
            if (!isHeadsUp) {
                mHeadsUpViewBinder.unbindHeadsUpView(entry);
+5 −1
Original line number Diff line number Diff line
@@ -55,6 +55,10 @@ public interface NotifLifetimeExtender {

    /** Callback for notifying the NotifCollection that a lifetime extension has expired.*/
    interface OnEndLifetimeExtensionCallback {
        /**
         * Stop extending the lifetime of `entry` with `extender` and then immediately re-evaluates
         * whether to continue lifetime extending this notification or to remove it.
         */
        void onEndLifetimeExtension(NotifLifetimeExtender extender, NotificationEntry entry);
    }
}