Merge "Do not update matches string when there are no matches." into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
2358623917
@@ -143,6 +143,7 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher,
|
|||||||
/*
|
/*
|
||||||
* Update the string which tells the user how many matches were found, and
|
* Update the string which tells the user how many matches were found, and
|
||||||
* which match is currently highlighted.
|
* which match is currently highlighted.
|
||||||
|
* Not to be called when mNumberOfMatches is 0.
|
||||||
*/
|
*/
|
||||||
private void updateMatchesString() {
|
private void updateMatchesString() {
|
||||||
String template = mResources.getQuantityString(
|
String template = mResources.getQuantityString(
|
||||||
@@ -196,6 +197,11 @@ class FindActionModeCallback implements ActionMode.Callback, TextWatcher,
|
|||||||
findAll();
|
findAll();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (0 == mNumberOfMatches) {
|
||||||
|
// There are no matches, so moving to the next match will not do
|
||||||
|
// anything.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
switch(item.getItemId()) {
|
switch(item.getItemId()) {
|
||||||
case com.android.internal.R.id.find_prev:
|
case com.android.internal.R.id.find_prev:
|
||||||
findNext(false);
|
findNext(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user