Settings now collects search results from a single
loader which fetches from an aggregator. This is to
facilitate the separation of search functionalitiy,
where "query" becomes a single synchronous call.
In this case, the aggregator will move to the
unbundled app and would be called on the
other end of the Query call. i.e. the new search
result loader will just call query, and unbundled
search will handle everything else.
An important implication is that the results will
be returned in a ranked order. Thus the ranking and
merging logic has been moved out of the RecyclerView
adapter (which is a good clean-up, anyway).
The SearchResultAggregator starts a Future for each
of the data sources:
- Static Results
- Installed Apps
- Input Devices
- Accessibility Services
We allow up to 500ms to collect the static results,
and then an additional 150ms for each subsequent
loader. In my quick tests, the static results take
about 20-30ms to load. The longest loader is installed
apps which takes roughly 50-60ms seconds (note that
this will be improved with dynamic result caching).
To handle the ranking in DatabaseResultLoader,
we start a Future to collect the dynamic ranking before
we start the SQL queries. When the SQL is done, we
wait the same timeout as before. Then we merge the
results, as before.
For now we have not changed how the Dynamic results
are collected, but eventually they will be a cache
of dynamic results.
Bug: 33577327
Bug: 67360547
Test: robotests
Change-Id: I91fb03f9fd059672a970f48bea21c8d655007fa3
- Renamed AppProgressPreference to AppPreference to handle most app
related prefs
- Add ed AppSwitchPreference - the same layout as AppPreference except
it's a SwitchPreference
- Use above 2 prefs in most app related pages.
- Everything under special access pages
- Recent app list in App & notifications
- App data usage detail page
- Default app picker pages
Bug: 65182905
Test: robotests
Change-Id: I96c980ba1db49e36dabe25b5eade1197215aad11
- Rewrite preference_app.xml to have a small icon
- Update ApplicationViewHolder to hide/show summary row dynamically
- but only do this for notification settings - this UI has empty
summary for most row. For other UI, just keep the empty summary row
until summary comes in. If we also hide/show summary row there will
be a height change animation which is janky.
Bug : 65182905
Fixes: 63582851
Test: robotests
Change-Id: Ice67324f08c67e014a018dfc51e00fe4449036dd
- Remove additional_system_update pref device_info page, we don't need
it.
- Update keys in xml and Preference controller, and search index
provider.
- Clean up in ScreenZoomPreference, it's anti-pattern to set fragment in
constructor.
- Whitelist 2 that are super hard to remove.
Change-Id: Ibab6e2cb074513042a2ae007d9085aa64046eec8
Fixes: 67852637
Test: uniquePreferenceTest
- Add synchronization locks to data structures in
SettingsShadowResources to avoid ConcurrentModificationException
- Make temporary variables final variables
Change-Id: I39a894c67d0b5e5b21bc0b9aa89180ba6989f01d
Fixes: 67850343
Test: make RunSettingsRoboTests -j40
Remove the the indexing check for the
index data's locale to match the locale of
the device. We don't require locale for
indexables, and we reindex on locale change.
It had introduced a bug where when locale
changed, the default us-en results would
not be added to the db.
Change-Id: I43a4284f5c23bc51ee3efdfcabe511eac2d3317d
Fixes: 66916397
Fixes: 68380443
Test: robotests
- change it back to launch the fragment instead of intent activity.
- update the test case to launch special app access from Apps &
notifications page instead of directly launching it.
Change-Id: I61289ba0fa6cc4585c87cf337aa2007fb578450f
Fixes: 68397751
Test: visual, make SettingsUnitTests
- functionality for hiding portions of the preferences in the preference
screen is added to the support lib. So, changing the settings
implementation to use the feature from the support lib instead.
- remove ProgressiveDisclosureMixin and the related code
Fixes: 63985174
Test: make RunSettingsRoboTests
Change-Id: Ib1d39b2db93d78a56c7adf90abcae5226f9564c2
- Automatic zen rules have their own page like in N
- Minor string changes to page and add rule dialog
- Zen mode visual effects was moved into behavior settings
Bug: 63077372
Test: $ make SettingsUnitTests -j40
$ adb install -r ${OUT}/data/app/SettingsUnitTests/SettingsUnitTests.apk
$ adb shell am instrument -w com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
Change-Id: I9635f8f7969b76d036bc06ec44705815e540777a
Normalize Hiragana and Katakana in Settings search.
Fixes: 28410478
Test: manual - set the device language to Japanese
and search in Settings.
Test: manual
Change-Id: Iee76da6a895ea006959c23f4eb64f62af0917c34
When calculating how many uses exists, we shouldn't count the
managedProfile since this is not the normal user.
Bug: 37681923
Test: RunSettingsRoboTests
Change-Id: Ic24e98f8e8696530d534bc9e1d8f675ad6ad5063
1. Move getPreferenceScreenResId() from individual subclass to
InstrumentedPreferenceFragment.
2. Removed InstrumentedPreferenceFragment.getTitle() and let the
preference fragments that do not have preference screen set the activity
title directly instead.
3. Removed OptionsMenuFragment as all it does is call
setHasOptionMenu().
- changed subclasses of OptionsMenuFragment to extend from
InstrumentedPreferenceFragment directly.
- none of the exisitng subclasses actually implements the option menu
related methods to provide any option menu. So, the setHasOptionMenu()
call is not added to the subclasses.
4. Update Languages preference title.
- launch the fragment from the preference controller instead of from the
default handling, as we need the title res id at launch time to get it
work properly when retrieving the title from back stack.
Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Ibecdcab32cbaed8bf604ec5ebe0a926b4e489a7d
Replace the "vivid" mode setting with a new 3 choice screen:
- Natural (sRGB)
- Boosted (sRGB + 10% saturation)
- Saturated (unmanaged, colors are assigned the native color space)
The "Colors" setting that replaces "Vivid" only appears on devices
that support wide gamut rendering and color management. Changing
the color mode has an immediate effect and triggers a configuration
change in running application so that applications that request
wide color gamut rendering can react properly (since they lose
that ability).
Bug: 68159303
Test: make RunSettingsRoboTests
Merged-In: I7009723e11ee164c93719f0e42fed9d1b3cf6e01
Change-Id: I7009723e11ee164c93719f0e42fed9d1b3cf6e01
(cherry picked from commit 05fa18f847)
This cl contains the moving about:
1. Several methods in Bluetooth/Utils.java
2. Bluetooth icon drawables
3. Bluetooth strings
4. Tests
Bug: 65488978
Test: RunSettingslibRoboTests
Change-Id: I682daa3eeb5022beb90a95763c70d19d32d54915
- Add missing title to preference screen xml so that they will be used to
set the activity title when the fragment is launched.
- Also updated some incorrect preference screen titles.
- Overrides getTitle() in preference fragments that do not use the
preference screen xml.
Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Id72d5ddf18f0962bc484de8bbd847a2e55d6371e
- Use a hard-coded preference instead of injecting
so that search can index the preference
- Create a preference controller to update the summary
Change-Id: Idf822ccbb7a58a9ec561d5c2c2948dbc3272544f
fixes: 36463051
Test: Manual using settings app
Replace the "vivid" mode setting with a new 3 choice screen:
- Natural (sRGB)
- Boosted (sRGB + 10% saturation)
- Saturated (unmanaged, colors are assigned the native color space)
The "Colors" setting that replaces "Vivid" only appears on devices
that support wide gamut rendering and color management. Changing
the color mode has an immediate effect and triggers a configuration
change in running application so that applications that request
wide color gamut rendering can react properly (since they lose
that ability).
Bug: 68159303
Test: make RunSettingsRoboTests
Change-Id: I7009723e11ee164c93719f0e42fed9d1b3cf6e01