Track search KeyEvents in SearchDialog.

This fixes the bug preventing switching between global and in-app search,
and also enables long press for voice search (I think).

Bug: 2127442
Change-Id: I045a0f7b2c797c016191709a3983b6b33fc6186e
This commit is contained in:
Bryan Mawhinney
2009-09-18 17:09:33 +01:00
parent f97f436ed6
commit 3c5767d8fe

View File

@@ -736,7 +736,8 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
return false;
}
if (keyCode == KeyEvent.KEYCODE_SEARCH) {
if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) {
event.startTracking();
// Consume search key for later use.
return true;
}