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

Commit f006a648 authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge changes from topic "remove_dead_snooze_code" into sc-dev

* changes:
  Do not allow multiple snooze menus to be open at once
  Remove dead snooze code
parents a06ab7e8 85a31994
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -46,8 +46,6 @@ public interface NotificationSwipeActionHelper {
     */
    public void snooze(StatusBarNotification sbn, SnoozeOption snoozeOption);

    public void snooze(StatusBarNotification sbn, int hours);

    public float getMinDismissVelocity();

    public boolean isDismissGesture(MotionEvent ev);
+0 −1
Original line number Diff line number Diff line
@@ -48,6 +48,5 @@ interface NotificationsController {
    fun resetUserExpandedStates()
    fun setNotificationSnoozed(sbn: StatusBarNotification, snoozeOption: SnoozeOption)
    fun getActiveNotificationsCount(): Int
    fun setNotificationSnoozed(sbn: StatusBarNotification, hoursToSnooze: Int)
    fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<String>, dumpTruck: Boolean)
}
+0 −6
Original line number Diff line number Diff line
@@ -171,10 +171,4 @@ class NotificationsControllerImpl @Inject constructor(
    override fun getActiveNotificationsCount(): Int {
        return entryManager.activeNotificationsCount
    }

    override fun setNotificationSnoozed(sbn: StatusBarNotification, hoursToSnooze: Int) {
        notificationListener.snoozeNotification(
                sbn.key,
                hoursToSnooze * 60 * 60 * 1000.toLong())
    }
}
+0 −3
Original line number Diff line number Diff line
@@ -59,9 +59,6 @@ class NotificationsControllerStub @Inject constructor(
    override fun setNotificationSnoozed(sbn: StatusBarNotification, snoozeOption: SnoozeOption) {
    }

    override fun setNotificationSnoozed(sbn: StatusBarNotification, hoursToSnooze: Int) {
    }

    override fun getActiveNotificationsCount(): Int {
        return 0
    }
+4 −0
Original line number Diff line number Diff line
@@ -1103,6 +1103,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    /** The click listener for the snooze button. */
    public View.OnClickListener getSnoozeClickListener(MenuItem item) {
        return v -> {
            // Dismiss a snoozed notification if one is still left behind
            mNotificationGutsManager.closeAndSaveGuts(true /* removeLeavebehind */,
                    false /* force */, false /* removeControls */, -1 /* x */, -1 /* y */,
                    false /* resetMenu */);
            mNotificationGutsManager.openGuts(this, 0, 0, item);
            mSnoozedMenuItems = mMenuRow.getMenuItems(mMenuRow.getMenuView().getContext());
            mMenuRow.resetMenu();
Loading