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

Commit 19da747a authored by Tony Wu's avatar Tony Wu Committed by Steve Kondik
Browse files

Fix number counter will keep going after window losed focus.

Use Time pick in AlarmClock, long press on + or -, make an
incoming call or press power key to suspend the device,
after resumed, the counter will keep going without press.

Change-Id: I5e69d5e17d3be9aa78648e6f8e28665ec305b36f
parent b538c719
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -85,4 +85,12 @@ class NumberPickerButton extends ImageButton {
            mNumberPicker.cancelDecrement();
        }
    }

    public void onWindowFocusChanged(boolean hasWindowFocus) {
        super.onWindowFocusChanged(hasWindowFocus);
        if (!hasWindowFocus) {
            cancelLongpress();
        }
    }

}