HTML parsing of search suggestions is still a major
CPU hog in the search dialog. This change first
checks if the text contains any HTML markup
(by looking for < and &) before bothering to
treat it as HTML.
Before, SuggestionsAdapter parsed every HTML formatted
string three times, to support state-dependent colors
in <font> tags. Now that there is support in Html
for color resources (added in
https://android-git.corp.google.com/g/7441),
we can get rid of this code.
Also, SuggestionsAdapter had a special purpose view
for drawing background colors when suggestion items
were not selected or pressed. This change replaces that
code with a StateListDrawable of ColorDrawables.
Before this change, HTML parsing used ~17% (uncontrolled benchmark,
just did some random searching) of the system_process CPU.
This change should reduce that by 2/3, i.e. about ~11% total
system_process reduction.
This change adds checking that the searchdialog is initialized
properly to a few key event listeners where it was missing
before.
Also makes sure that the search dialog is not shown if the
global search is requested but the global search provider
cannot be found.
Should fix http://b/issue?id=1982128
"Device rebooting after search results"
where SearchDialog.onKeyDown() threw an NPE
Merge commit '82b283a9bf8e3508e1b5c6d4b6b8cae04597b83c'
* commit '82b283a9bf8e3508e1b5c6d4b6b8cae04597b83c':
Include 'calling_package' extra for uses of in-app voice search so that
Merge commit '6ce4236d70c8543021bb521731ac9f05d22b3002'
* commit '6ce4236d70c8543021bb521731ac9f05d22b3002':
Adding missing addEarcon method. Not having this was a bug as
Merge commit 'c122824f48266c5df1b1b3a0a915619e5963ed7a'
* commit 'c122824f48266c5df1b1b3a0a915619e5963ed7a':
Run background threads associated with filtering at background priority.
* changes:
Adding missing addEarcon method. Not having this was a bug as this method is needed to add earcons; otherwise, there is nothing for playEarcon to play.
Merge commit '5628711a6f5674070da674488513d2e1b03c4959'
* commit '5628711a6f5674070da674488513d2e1b03c4959':
Add a Gservices setting to control if we send up multipart protocol buffers
Merge commit '1fffbd97fa756ef7d3e7e885a5c1c8bb64380c20'
* commit '1fffbd97fa756ef7d3e7e885a5c1c8bb64380c20':
Fix keyboard not showing for global search on Dream. Rather than trying to
* changes:
Unhide required definitions in TextToSpeech.Engine that cover return codes and extras for android.intent.action.CHECK_TTS_DATA intent, and the key values for the parameter hashmap that can be passed by an application in speak(), synthesizeToFile(), playSilence() and playEarcon().
extras for android.intent.action.CHECK_TTS_DATA intent, and the key values
for the parameter hashmap that can be passed by an application in speak(),
synthesizeToFile(), playSilence() and playEarcon().
call the hidden showSoftInputUnchecked method to show the IME in SearchDialog#show(),
override onWindowFocusChanged in our subclass of AutoCompleteTextView so that whenever
it gets focus, we call the public showSoftInput method, passing in the ACTV, which is
the correct way to do this.
This fixes http://b/1930989.
Merge commit 'a2694c998c85a438c7d3fefd79bbeb751d594134'
* commit 'a2694c998c85a438c7d3fefd79bbeb751d594134':
Fix a few date format strings to put backslashes in front of apostrophes.
Merge commit 'b3948bbd8dfba7fac64d2c06d871386c987692c2'
* commit 'b3948bbd8dfba7fac64d2c06d871386c987692c2':
Run the search dialog at THREAD_PRIORITY_DEFAULT instead of THREAD_PRIORITY_FOREGROUND.
Merge commit '00d3e361148133cea354d358757628b0acc01b75'
* commit '00d3e361148133cea354d358757628b0acc01b75':
Restore PopupWindow's original behavior and add an API to control the soft input