Merge "Give GEL a way to clear the typed text when it starts searching" into ub-now-porkchop
This commit is contained in:
commit
25ad9e4ee5
1 file changed
+13
-2
@@ -2064,14 +2064,25 @@ public class Launcher extends Activity
|
|||||||
sourceBounds = mSearchDropTargetBar.getSearchBarBounds();
|
sourceBounds = mSearchDropTargetBar.getSearchBarBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
startSearch(initialQuery, selectInitialQuery,
|
boolean clearTextImmediately = startSearch(initialQuery, selectInitialQuery,
|
||||||
appSearchData, sourceBounds);
|
appSearchData, sourceBounds);
|
||||||
|
if (clearTextImmediately) {
|
||||||
|
clearTypedText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startSearch(String initialQuery,
|
/**
|
||||||
|
* Start a text search.
|
||||||
|
*
|
||||||
|
* @return {@code true} if the search will start immediately, so any further keypresses
|
||||||
|
* will be handled directly by the search UI. {@code false} if {@link Launcher} should continue
|
||||||
|
* to buffer keypresses.
|
||||||
|
*/
|
||||||
|
public boolean startSearch(String initialQuery,
|
||||||
boolean selectInitialQuery, Bundle appSearchData, Rect sourceBounds) {
|
boolean selectInitialQuery, Bundle appSearchData, Rect sourceBounds) {
|
||||||
startGlobalSearch(initialQuery, selectInitialQuery,
|
startGlobalSearch(initialQuery, selectInitialQuery,
|
||||||
appSearchData, sourceBounds);
|
appSearchData, sourceBounds);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user