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
This commit is contained in:
@@ -85,4 +85,12 @@ class NumberPickerButton extends ImageButton {
|
||||
mNumberPicker.cancelDecrement();
|
||||
}
|
||||
}
|
||||
|
||||
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
||||
super.onWindowFocusChanged(hasWindowFocus);
|
||||
if (!hasWindowFocus) {
|
||||
cancelLongpress();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user