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

Commit d492dabe authored by Jeff DeCew's avatar Jeff DeCew Committed by Automerger Merge Worker
Browse files

Merge changes from topic "remove_dead_snooze_code" into sc-dev am: f006a648

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14647011

Change-Id: Ib7f1de0646073dba0c327e8eaa23c4cc471d5f3f
parents 0d90e87f f006a648
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -46,8 +46,6 @@ public interface NotificationSwipeActionHelper {
     */
     */
    public void snooze(StatusBarNotification sbn, SnoozeOption snoozeOption);
    public void snooze(StatusBarNotification sbn, SnoozeOption snoozeOption);


    public void snooze(StatusBarNotification sbn, int hours);

    public float getMinDismissVelocity();
    public float getMinDismissVelocity();


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

    override fun setNotificationSnoozed(sbn: StatusBarNotification, hoursToSnooze: Int) {
        notificationListener.snoozeNotification(
                sbn.key,
                hoursToSnooze * 60 * 60 * 1000.toLong())
    }
}
}
+0 −3
Original line number Original line 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, snoozeOption: SnoozeOption) {
    }
    }


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

    override fun getActiveNotificationsCount(): Int {
    override fun getActiveNotificationsCount(): Int {
        return 0
        return 0
    }
    }
+4 −0
Original line number Original line Diff line number Diff line
@@ -1103,6 +1103,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    /** The click listener for the snooze button. */
    /** The click listener for the snooze button. */
    public View.OnClickListener getSnoozeClickListener(MenuItem item) {
    public View.OnClickListener getSnoozeClickListener(MenuItem item) {
        return v -> {
        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);
            mNotificationGutsManager.openGuts(this, 0, 0, item);
            mSnoozedMenuItems = mMenuRow.getMenuItems(mMenuRow.getMenuView().getContext());
            mSnoozedMenuItems = mMenuRow.getMenuItems(mMenuRow.getMenuView().getContext());
            mMenuRow.resetMenu();
            mMenuRow.resetMenu();
Loading