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:
Tony Wu
2010-09-03 12:06:20 +08:00
parent 75a2ae937f
commit 3d456a4fc0

View File

@@ -85,4 +85,12 @@ class NumberPickerButton extends ImageButton {
mNumberPicker.cancelDecrement();
}
}
public void onWindowFocusChanged(boolean hasWindowFocus) {
super.onWindowFocusChanged(hasWindowFocus);
if (!hasWindowFocus) {
cancelLongpress();
}
}
}