| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 3140925
Removed all the code from SearchDialog that is already in SearchView
and moved more stuff into SearchView.
SearchDialog layout changed to be more like a Holo.Light themed action mode.
Search field is right justified and limited to 500dip.
Zero query dropdown added to SearchView (causing some problems with Gmail,
but that may be an existing issue that's only now showing up due to this change)
Holo.Light search views assets still need to be updated, as the contrast is too low.
|
| |
|
|
|
|
| |
New method : setQueryRefinementEnabled() which will either enable all suggestions
to have the little query refinement icon in the right or just the ones that have
a bit set in the new SUGGEST_FLAGS column of the suggestion provider cursor.
|
| |
|
|
|
|
|
| |
line of text to be up to 2 lines (rather than the usual 1) if
no 'description' line is provided.
Change-Id: Ibc60d72868a4ad9630d38ee9b8cfe3f37c736e64
|
| | |
|
| |
|
|
|
|
|
| |
Fixes b/2426929
Calls onFilterComplete when the data set changes, so that it can recompute whether
the dropdown should be shown or not.
|
| |
|
|
|
|
|
|
|
| |
If a search provider returns an extra in the cursor with the key
SearchManager.CURSOR_EXTRA_KEY_IN_PROGRESS, and the value true, then
the spinny in the search dialog will not stop, but the cursor
contents will still be used to update the results. This way, partial
search results can be sent while the user is informed that the search
is still in progress.
|
| |
|
|
|
|
|
|
|
|
| |
This column overrides SUGGEST_COLUMN_TEXT_2. SearchDialog
and QuickSearchBox render the value of this column as a URL in
green.
Part of the fix for http://b/issue?id=2380681
Change-Id: I6735e0eba90e24c81f9e72520f257e5e61796d7a
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to expose SearchableInfo in the SDK in order to unbundle
Quick Search Box. Since the android.server.search package is
hidden, I'm moving SearchableInfo to android.app, where
SearchManager lives.
This change doesn't actually expose SearchableInfo. I'll do
that in a separate change to keep the change that
api-council needs to review small.
This is part of the fix for: http://b/issue?id=2270838
Change-Id: I9589f9c2c11d36c958beedff8245fe0c3319c6ba
|
| |
|
|
|
|
|
|
| |
Should mitigate http://b/issue?id=2149158
"Bad suggestions behavior within contacts app
search for 10k contact db"
Change-Id: Ida50e9157c3ce46fc7892ef09a67da9f4008e665
|
| |
|
|
|
|
|
| |
Fixes http://b/issue?id=2131078
"Incorrect icons shown in in-app search"
Change-Id: I88282d6323333796e66ca704390ad16016b846eb
|
| |
|
|
|
|
| |
Needed for QSB logging, http://b/issue?id=2097469
Change-Id: I817e5b26c9739ab05bd873675854478ce601d234
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, all icon URIs were opened with
ContentResolver.openInputStream(Uri), but that does not
include the density information from the source
application.
Now, if the URI uses the android.resource scheme,
we resolve the URI to a Resources and a resource ID,
and load it with Resources.getDrawable(int).
This requires making OpenResourceIdResult and getResourceId()
in ContentResolver public (but hidden).
This change also caches icons that were specified using just a
resource ID.
Since loading a Drawable from a URI is a generally useful operation,
it would be good to make it easy for apps to do it in the proper
density-independent way. We could add a getDrawable(Uri)
method to the framework. The question is where.
It would be easiest to add it to ContentResolver, but that may be a
bit odd since there is no other code for dealing with Drawables in
ContentResolver. Another alternative is in Resources, since
getDrawable(int) is there, but that class deals with the resources
for a single app, whereas getDrawable(Uri) can open a drawable
from any app. Putting it in Context may be the best choice,
since that's in android.content, and can thus access package
private members in ContentResolver, and since it's already
a dumping place for random useful high-level methods.
Opinions?
Fixes http://b/issue?id=2034526
"Icons on search do not scale for wide VGA"
Change-Id: I44de0b74826e5560141a3174bcbba991ba6264ac
|
| |
|
|
|
|
|
|
| |
Now that we are using preloaded drawables in compatibilty mode, when
constructing them from their constant state we need to set the new
drawable's target density appropriately.
Change-Id: I3665cbea09d38b9ac5f45f8c380dc8641f86b266
|
| |
|
|
|
|
|
|
| |
This is the framework part of http://b/issue?id=2099399
"executing a search in QSB should create a shortcut (like
when you click on a search suggestion)"
Change-Id: I2d07d9bfc808112948629ca16b24bc870fbd5fa6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before, after using the Browser, memory-hungry apps could
become very sluggish. This was because the search dialog in the
system process had the BrowserProvider open, which in turn had
EnhancedGoogleSearch open. Since EhancedGoogleSearch runs in acore,
the system would keep both the Browser process and acore to stay
around forever.
The cause (or at least one common cause) for this was that
if the user types quickly, and clicks on a suggestion before
the displayed suggestions have caught up, some suggestion cursors
are not be closed.
This change solves this problem by adding a close() method to
SuggestionsAdapter. SuggestionsAdapter now closes any cursors
that are passed to it after close() is called.
Fixes http://b/issue?id=2078226
"global search holding reference to browser: system -> browser -> acore = :("
|
| |
|
|
|
|
|
| |
close itself directly because it may not happen correctly for some cursors
currently. This fixes http://b/2036290, which is being caused by
http://b/2015069 which we are not fixing for Donut, so this is a hack around
that for the time being.
|
| |
|
|
| |
Fixes bug 2035791.
|
| |
|
|
| |
This is part of the fix for http://b/issue?id=2000655
|
| |
|
|
| |
This is part of the fix for http://b/issue?id=2000655
|
| |
|
|
| |
crashes.
|
| |
|
|
|
|
|
|
|
|
| |
Romain has checked in a framework fix,
https://android-git.corp.google.com/g/8218
so the workaround added in
https://android-git.corp.google.com/g/8209
is no longer needed.
Fixes http://b/issue?id=1996635
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes when searching, some of the suggestions had no left padding.
The left-hand side icons were flush with the left edge of the screen.
The problems was that setting a StateListDrawable as a background
will always set the padding of a View, because of a problem in
DrawableContainer.
DrawableContainer.DrawableContainerState.getConstantPadding()
will always return a Rect if mVariablePadding is false, which
makes DrawableContainer.getPadding() return true, which
causes View to change the padding.
As a workaround, we use setVariablePadding(true) on the background
that we create.
Fixes http://b/editIssue?id=1984813
|
| |
|
|
|
|
|
|
|
| |
Before, Drawables for cached icons were reused. This is not good,
since they can then share mutable state information. This change
copies all Drawables when getting them from the cache, storing
only the constant state in the cache.
Hopefully fixes http://b/issue?id=1984813
|
| |
|
|
|
|
| |
delay 500ms for delete keys in the search dialog.
Holding down delete is nice and zippy in the browser now :)
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New left-hand side icon fallback logic in search dialog:
1. If the search dialog gets no icon column, it shows no
icon (like before). This would handle the case of in-app
search where the provider does not include icons.
2. If the icon column is empty, or there is an error converting
the icon id or URI to a drawable, the search dialog identifies
the suggestion source by looking at the
SUGGEST_COLUMN_INTENT_COMPONENT_NAME.
3. If SUGGEST_COLUMN_INTENT_COMPONENT_NAME is empty or not set,
the current searchable activity is considered the suggestion source.
4. Try to get the activity icon of the suggestion source.
5. Fall back to the application icon of the suggestion source
if there is no activity icon.
6. Fall back to some generic icon if there is no application icon.
Fixes http://b/issue?id=1905757
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We support a ColorStateList reference now as a valid font color value
in the given html and manage html strings for all supported states
which we dynamically set while drawing the items.
This will get checked in along with changes to GlobalSearch,
EnhancedGoogleSearchProvider and Browser to make them use the new
model.
Bug: http://b/issue?id=1865037
|
| |
|
|
| |
Fixes http://b/issue?id=1940013
|
| |
|
|
|
|
|
| |
They were only static because of a now removed restriction that
only activity contexts could instantiate SearchManager.
This only changes hidden APIs, but all users of the changed methods
must be updated to use them non-statically before this is submitted.
|
| |
|
|
| |
With the new implementation of using a SuggestionItemView, we no longer need to draw a solid background for all items in the suggestion listview. Hence removing the code to draw a default white background, and make the item transparent so the listview-drawn selection hilite shows through.
|
| |
|
|
| |
I've used a simple approach of not drawing the solid background color for the selected item, thereby letting the default selection background to show through properly. This works by using the item's 'pressed' state and redraw code which are used by the listview during the tapping operation.
|
| | |
|
| |
|
|
|
|
| |
- A new column was added to SearchManager cursors to specify background color (optional)
- Two new colour references added to the theme for normal and search widget corpus items (we need both to be opaque for the items to render properly)
- SuggestionAdapter was updated to choose the right theme colour for each item
|
| |
|
|
| |
mode.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
communication.
(framework portion)
There are now 4 times the search dialog will check with the cursor:
- after data set changed
- when an item is clicked
- when the cursor is about to be closed
- when an item at a particular position is detected as showing
these are now the points where we can add data in either direction, which we use to accomplish:
- finding out whether there are any pending results
- find out if there is a position at which to notify when it is displayed (the "more results" triggering)
- toggling the "more results" button
- sending the max position that was displayed when the cursor is done
the new behavior (in addition to the refactoring) is improved detection of "more results" to trigger the additional sources
(it is now precise), and detection of which items were displayed to the user.
|
| |
|
|
|
|
|
|
| |
This is no longer needed, since content providers can now return
AssetFileDescriptors for in-memory data.
Bitmaps in the suggestion cursor was resopnsible for lots of
unnecessary copying, since all rows are copied out of the database
regardless of how many are displayed in the UI.
|
| |
|
|
|
|
| |
Before, SuggestionsAdapter would not close input streams after
reading icons from them. This leaks file descriptors and,
in the case of MemoryFiles, virtual address space.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
internal cleanup
(framework portion)
suggestionCursor has new callbacks for impressions and clicks
- impressions now used to trigger "more" UI, cleanup apis around that
search dialog reports which position was clicked on via cursor#respond
- can now detect when sources under "more results" are clicked
- also used to simplify existing stuff:
- can detect when "more results" entry is clicked and toggle base on that (no longer need INTENT_ACTION_CURSOR_RESPOND one off)
- use response from click reporting to instruct which position should be selected
|
| |
|
|
| |
Good for checking that lazy contact photos works.
|
| |
|
|
| |
when it is clicked.
|
| |
|
|
|
|
|
|
|
| |
false and then true on the drawables. For an AnimationDrawable, this will
trigger the desired behavior of 'automatically' starting the animation,
which should have been working to begin with according to the intended
design of AnimationDrawable (see http://b/1878430 for my description of
my correspondence with Romain). For Donut we'll just do this to work
around it, but for a later release we need to decide a better story.
|
| |
|
|
|
| |
of its underlying cursor and update a spinner in the search dialog
accordingly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removes the mSearchable field which was only
for communication between the constructor and
getActivityMetaData().
- Removes the badge and query rewriting fields,
since their values can be efficiently computed
on the fly.
- Makes all the other public fields private and adds getters
for them.
- Makes all fields final, except mActionKeys.
- Removes the DBG_INHIBIT_SUGGESTIONS_CONSTANT.
I don't see why we would every want that, and it
complicated making the fields final.
- Makes all fields in ActionKeyInfo final.
- Makes all fields in ActionKeyInfo private and adds getters.
- Removes the use of ActioKeyInfo.mKeyCode for failure
signalling. Uses IllegalArgumentException instead.
- Replaces the ad hoc linked list for looking up
action keys by a HashMap. This is needed to
make the fields in ActionkeyInfo final, and also avoids O(N)
lookup in the (unlikely) case that an activity
has lots of action keys.
- Don't throw exceptions when reading searchable
meta-data, since that could crash SearchManagerService.
- Adds debug logging.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
CL 147456 introduced support for HTML formatted search suggestions.
This is triggered by the value "html" in the SUGGEST_COLUMN_FORMAT
column. However, the code failed to check that the
SUGGEST_COLUMN_FORMAT column was present before trying to read it.
This resulted in an IllegalStateException being thrown when searching
with a suggestion provider that does not include the SUGGEST_COLUMN_FORMAT
column. This broke search at least in the Contacts and Music apps.
Automated import of CL 147681
|
|
|
- all public apis and framework changes have been reviewed by relevant folks in our branch (e.g romainguy)
- all new public apis are @hidden; they will still get reviewed by api council once we're in git
- other than that, it's mostly GlobalSearch and search dialog stuff, a new apps provider, and some tweaks
to the contacts provider that was reviewed by jham
Automated import of CL 147564
|