Commit Graph

5903 Commits

Author SHA1 Message Date
Fabrice Di Meglio
8f5c65fd01 Search results - just show the first item of ListPreference entries
- need to increment the database model version to force re-indexing
- change entries separator from SPACE to PIPE
- just show the first entries value in the Search results

Change-Id: I747218ff3528c3231c0209f8870c12f65e036070
2014-04-15 14:09:25 -07:00
Fabrice Di Meglio
7a6bfd132c Update DynamicIndexableContentMonitor
- use factory for creating Intents
- add missing case in handlePackageUnavailable() for IMEs
- move DynamicIndexableContentMonitor to the "search" package

Change-Id: I8d74b28fb9183827db50c6de4b4543b4ff21acc0
2014-04-15 13:31:38 -07:00
Alexandra Gherghina
a044235272 Wiring for displaying managed profiles
Bug: 13756871
Change-Id: I81898e3b32baa0bc9ec72258b3bd470102d42b68
2014-04-15 14:54:01 +01:00
Fabrice Di Meglio
71a2ef3e7c Update UI for Search results
- put the icon on the left
- just use the "summaryOn" ellipsized instead of the list
of values

Change-Id: I7250ff5b7c882b873cfe6bb0ec550a8eaf052d16
2014-04-14 19:44:31 -07:00
Jeff Davidson
b9558d91df Refactor SmsListPreference into AppListPreference.
This generalizes the pattern of needing to offer a selection among a
list of candidate applications.

Also move some reusable logic around querying PackageManager for icons
into AppListPreference, and remove some unnecessary update logic: the
preference will update itself when onPreferenceChange returns true,
and we can set the summary to '%s' to automatically use the entry as
the summary without having to reset it each time.

Change-Id: I007b9ed58359302f93b367a4b86354e93613bf3e
2014-04-14 19:24:15 -07:00
Svetoslav
990159abaa Adding search for dynamic accessibility settings.
The language and input settings are highly dynamic and this change adds search
support for that. This category depends on installed IMEs, input devices, user
dictionary configuration, etc. We not only compute the right preferences to be
indexed but also track related system state in the settings app to rebuild the
index if needed.

bug:14066763

Change-Id: Ia89d9e35bd79abf8d74614691aedf4ca9b11b6f2
2014-04-14 17:31:23 -07:00
Svetoslav
853e47181d Rebuild search index if dynamic setting packages change.
We have some settings that are dynamically generated based on what packages are
installed. For example, accessibility services, etc. We now update the index when
the relevant installed packages change.

bug:14056852

Change-Id: I6143382bf2c7399d3c80abea0835d717935a9200
2014-04-14 17:13:02 -07:00
Fabrice Di Meglio
09e13da6a7 Some code cleaning
- use MatrixCursor var as in the other cases

Change-Id: Iba1163a851e62de9a0dd6e7c1c5d28f06452bdba
2014-04-14 17:01:02 -07:00
Fabrice Di Meglio
490099b135 Allow partial Index rebuilding thru updateFromClassNameResource(...)
- add a new boolean parameter to ask for Index rebuilding:
passing "true" will delete first all the data corresponding to the
"className" and then apply the update.

Change-Id: Ifc42fc560a14f5470b466cf6982915d9207fa3c7
2014-04-14 13:31:14 -07:00
Fabrice Di Meglio
724b702a86 Search - add support for deleting all preferences for a class name
- modify SQL delete query for passing any column in the DELETE statement
- modify deleteIndexableData(...) for passing a SearchIndexableData

Change-Id: I4c58e38422e67b1d464b0e51201520ce8717a14d
2014-04-14 11:24:16 -07:00
Fabrice Di Meglio
df278aa959 Update SettingsSearchIndexablesProvider for supporting queryNonIndexableKeys(...)
- add the new requested method "queryNonIndexableKeys" from the contract

Change-Id: I72be47851a7e19e3f14960f4e2b60c3e952f1fac
2014-04-14 10:54:58 -07:00
Fabrice Di Meglio
210bb8694a Merge "Search - add indexing of SecuritySettings" 2014-04-12 00:54:55 +00:00
Fabrice Di Meglio
d1d2f02224 Search - add indexing of SecuritySettings
- implement a SearchIndexProvider for providing the data to index
- some code refactoring to extract some helper methods

Change-Id: Ia8818c17d1bead7306b528d242cdc24c863c17eb
2014-04-11 17:53:41 -07:00
Svetoslav
c0a51758bd Merge "Adding search for dynamic print settings." 2014-04-12 00:36:46 +00:00
Svetoslav
d78d44d32a Adding search for dynamic print settings.
The print service list is dynamically constructed, therefore we need
a local provider that will emit print service data to be indexed.

bug:13929163

Change-Id: I51d5ae40c00edc6be7b212dc8aa08fd7ebfbf349
2014-04-11 17:22:57 -07:00
Svetoslav
c9d4c6aef4 Merge "Adding search for dynamic accessibility settings." 2014-04-12 00:19:27 +00:00
Svetoslav
b4b30828e9 Adding search for dynamic accessibility settings.
The accessibility service list is dynamically constructed, therefore we
need a local provider that will emit accessibility service data to be
indexed.

bug:13928519

Change-Id: Idd29cd1698f36b54fabf013dfa36029412bbb8a9
2014-04-11 17:15:34 -07:00
Svetoslav
2719da25d8 Merge "Fallback to the default values when indexing from local resource." 2014-04-11 23:38:10 +00:00
Svetoslav
caa0b54cbc Fallback to the default values when indexing from local resource.
If we are indexing from a local resource and the indexable resource does
not provide icon or class name or rank we fall back to the defaults.

Change-Id: Ibbed8b2a92e28799c26f5f80b3f058737535739d
2014-04-11 16:06:41 -07:00
Fabrice Di Meglio
fa46de5c68 Search - fix remembered Bluetooth devices indexing
We were indexing the remembered device names but we were missing the
informations for launching the correct Activity from the Search result.

- add the missing information: className and iconResId

Change-Id: Ib6781d4c492c296e822da1b5a8a2a76c92ecd586
2014-04-11 14:03:28 -07:00
Fabrice Di Meglio
e241ad1867 Merge "Add Indexable.SearchIndexProvider.getNonIndexableKeys(Context)" 2014-04-11 18:18:09 +00:00
Fabrice Di Meglio
45f754e506 Add Indexable.SearchIndexProvider.getNonIndexableKeys(Context)
- getNonIndexableKeys(Context) allow a SearchIndexProvider to tell which data
he does not want to index by providing a list of the data keys
- use this new API for SoundSettings and removing KEY_EMERGENCY_TONE related
settings if the device is not CDMA
- add a BaseSearchIndexProvider for code simplification

Change-Id: I23633ace1d7e390ee05fac0a5458a33e04e72d8d
2014-04-11 11:16:33 -07:00
Fabrice Di Meglio
2f1b4e2fd9 Merge "Some code refactoring" 2014-04-11 01:00:52 +00:00
Fabrice Di Meglio
a9d37050cb Some code refactoring
- use SearchIndexableResources.NO_DATA_RES_ID
- extract code for getting a SearchIndexProvider

Change-Id: I3d31cc58f70b9b0abfa6684d9d20b19534ec5e45
2014-04-10 17:58:27 -07:00
Fabrice Di Meglio
2631b8c245 Merge "Fix bug #13962001 Search - need to finish indexing "Data usage" Settings" 2014-04-10 21:46:25 +00:00
Fabrice Di Meglio
758c3ff8e9 Fix bug #13962001 Search - need to finish indexing "Data usage" Settings
- index missing strings

Change-Id: I015452b58bf7dc576bce8fee03b55b38c0094097
2014-04-10 14:45:18 -07:00
Andres Morales
ef7a40a0d6 Write wifi config to NFC tag
Configured networks expose the option to
write config to an NFC tag. This tag can be
then tapped to another device to configure
the same network. Implemented according to
WiFi Alliance WPS spec.

Change-Id: I33a1be1610aab71cf1ab864418d494027370ebca
2014-04-10 10:25:50 -07:00
Paul Lawrence
1231a89e5e Merge "Allow encryption when keyguard is set to pattern or no protection" 2014-04-10 14:31:03 +00:00
Fabrice Di Meglio
981efd1778 Code cleaning for the SettingsSearchIndexablesProvider
- use the real constants SearchIndexablesContract.COLUMN_INDEX_XML_RES_XXX
for the colum names

Change-Id: I820ce9d3b048345365639fe049aedccaf3f203d8
2014-04-09 19:33:47 -07:00
Fabrice Di Meglio
063e7cfd78 Code cleaning for DataUsageSummary
- remove unused import
- remove dead code

Change-Id: I4e8f24e57fc4ca6d731e68da93ac7f748e709c26
2014-04-09 19:02:54 -07:00
Fabrice Di Meglio
b1648e6c54 Fix bug3 13933442 Search - for security reasons only index data...
...from wellknown SearchIndexablesProvider

Check if the SearchIndexablesProvider is:

- having the correct android.permission.READ_SEARCH_INDEXABLES
read/write permissions
- a privileged one (like Settings App, Phone App)

Change-Id: I5fd1fef46716cca0e439196e24b607ff5506495c
2014-04-09 16:24:10 -07:00
Fabrice Di Meglio
b914322590 Code cleaning for Search Remote Provider queries
- use colums indices that are now defined into SearchIndexablesContract
- ... and at the same time fix an issue with some wrong column indices
that were used

Change-Id: If72ddc7d7171329ca533cb2763431902099769b9
2014-04-09 13:30:50 -07:00
Fabrice Di Meglio
7d39310c8d Fix bug #13928293 Search - remove "switchTextOn" / "switchTextOff" from indexing
- remove all related code
- update the Index database schema and its version

Change-Id: Iaa5219b77efe5db3a404708663fdf82f10d043d3
2014-04-09 12:09:42 -07:00
Fabrice Di Meglio
82de8707af Fix Switch button creation for PrintService
- setup the ActionBar switch in the onStart()

Change-Id: I92d8bb34dd7925da79a10fe01790131d22f7d0d8
2014-04-08 18:58:33 -07:00
Fabrice Di Meglio
3b22695670 Fix issue about at which time Bluetooth devices name are indexed
- remembered devices name were only indexed when BT was turned on/off
- allow the same when they are paired
- remove device name from the Index if it is un-paired

Change-Id: I1206a591b0132789c3b003e52c7ffac630e80758
2014-04-08 17:49:01 -07:00
Fabrice Di Meglio
e2b9e07e5f Fix bug #13880310 Toggle On/Off buttons disappear on hitting Search...
... and back button in sub-settings

- move code managing the Switch from onCreate(...) to onStart()

Change-Id: I747180bea3880e84635134373bf4c681378f3ec8
2014-04-08 14:27:08 -07:00
Fabrice Di Meglio
821a0729ad Fix bug #13883976 Settings crash on long-tapping and swiping in Language & Input screen
- fix potential NPE

Change-Id: I12045f420d5b2a4f349e59a04141153cd2e46378
2014-04-08 13:56:06 -07:00
Fabrice Di Meglio
e5687b1b32 Fix bug #13744434 Stability: ISE in Settings: Can't switch to header...
..that has no Fragment nor Intent at SettingsActivity.onHeaderClick(SettingsActivity.java:654)

- satisfy the Monkeys has they were able to click on "WIRELESS &
NETWORK" header which is a Category and normally non clickable...
(so probably a race condition)

Change-Id: Ia33d2b6e55e910409a566e5f05c1e3bae8008807
2014-04-08 13:35:06 -07:00
Fabrice Di Meglio
c1457323d2 Add support for saving and using the Preference's key value
- modify the SQlite data model
- update Index code for managing the key value
- pass the key when launching a Fragment or and Activity
- implement a small animation for highlighting the Preference
from a Search result

Change-Id: I617643a4e5e3b752ece8f45ce7d5429037e479da
2014-04-08 13:08:44 -07:00
Jaewan Kim
ac6a3c3cb3 Merge "Revert "Refactor IpConfiguration from WifiConfiguration"" 2014-04-07 08:59:27 +00:00
Jaewan Kim
34dcbefe5c Revert "Refactor IpConfiguration from WifiConfiguration"
This reverts commit 16ff27d3f7.

Change-Id: Ide9c9af358f63a6e73bb2172111929c2022f862b
2014-04-07 08:55:02 +00:00
Jaewan Kim
1af4788f06 Merge "Refactor IpConfiguration from WifiConfiguration" 2014-04-07 04:40:47 +00:00
Fabrice Di Meglio
911fb2ad90 Fix bug #13817456 User not take to previous sub setting screen when Home
...affordance is tapped from second level sub settings page

- start an Activity instead of switch Fragments

Change-Id: I0e47d6539a3a048d7aa25bdb125c4c99031f9e85
2014-04-04 17:55:57 -07:00
Fabrice Di Meglio
6068967fd9 Re-enable the switch into Location Settings
- get rid of that onIsHidingHeaders()

Change-Id: If0b3fc6900f70cb6dfb54094d1b46b44aba6290f
2014-04-04 17:02:46 -07:00
Fabrice Di Meglio
bb16fd836a Fix bug #13813608 Launcher back button does not take you to previous...
... settings after orientation change

- gasp, there were some issues in the way we were tracking if
a search result fragment was opened. Simplified that code.

Change-Id: I7f8efb3a5aab1a275193f7de15ac50ca33bdad16
2014-04-04 15:08:39 -07:00
Fabrice Di Meglio
7f111811e0 Fix bug #13758772 Crash when hitting back after clicking on add a restricted...
... profile under Users

- no need to show the dialog again when we have pressed on BACK

Change-Id: I76f155a488512689c5af40ff35b80ce034da4ffe
2014-04-04 11:35:55 -07:00
Fabrice Di Meglio
45d3c5130f Merge "Add more logging for onHeaderClick(...)" 2014-04-04 17:18:22 +00:00
Fabrice Di Meglio
bbdada8fab Add more logging for onHeaderClick(...)
- log Header title and position

Change-Id: I07f7e8c50613b97609a3ea462b7a8e8fcc415f70
2014-04-04 10:16:59 -07:00
Paul Lawrence
2b664e0713 Merge "Show OwnerInfo on CryptKeeper screen" 2014-04-04 14:06:09 +00:00
Fabrice Di Meglio
1800a9f3e7 Fix bug #13735413 Particular settings name changing on device orientation changes
- restore the title correctly when we are restoring the Settings App

Change-Id: Ibd56c52b703620e3d2b8e524e6b3caf35f3c8980
2014-04-03 19:31:07 -07:00