Commit Graph

274 Commits

Author SHA1 Message Date
Fabrice Di Meglio
e9326d2761 Code cleaning: remove all remaining references to the old Header class
- goodbye Header(s) !

Change-Id: Ied27f1f01dbed9c51cc74d28800d9ca7cab47d5a
2014-05-13 12:49:14 -07:00
Fabrice Di Meglio
488cae39da Remove Print Settings if the device if not supporting Printing
- remove the Print tile if the device does not have support for
Printing

Change-Id: Ia484eac6202324ed2b92c1c2f6162ed867b2619d
2014-05-13 11:26:34 -07:00
Fabrice Di Meglio
eab58139f4 Merge "Fix bug #14323469 Settings crash on selecting keyword from recent searches ... after changing orientation" 2014-05-13 02:39:12 +00:00
Fabrice Di Meglio
8c3b0ce712 Fix bug #14323469 Settings crash on selecting keyword from recent searches
... after changing orientation

- set the SearchView for the SearchResultsFragment when the SearchView is
instantiated in the onCreateOptionsMenu(Menu)

- take care of the correct showing of the Recent Searched (suggestions)

Change-Id: Idfa17436d4a2436e0947ce1e1692355def3821a3
2014-05-12 19:35:38 -07:00
Alan Viverette
02d1aec286 Simplify accessibility display adjustments
BUG: 14680114
Change-Id: Ifd66256f4a8301d4c159f62a4211a2fbaaa6111a
2014-05-12 15:13:54 -07:00
Fabrice Di Meglio
7cae7f43e9 Fix bug #14392376 ActionBar icon / title is focusable when it doesn't do anything
- set ActionBar.setHomeButtonEnabled(boolean) as it should be

Change-Id: I93adcdf91cafd5b7a6fea88ec917f12a39be64bc
2014-05-09 16:48:36 -07:00
Fabrice Di Meglio
a7e8b27a85 Merge "Fix bug #14302110 Settings crash on hitting back key from Wifi recent searches page" 2014-05-09 22:04:30 +00:00
Fabrice Di Meglio
3d5aeb766b Fix bug #14302110 Settings crash on hitting back key from Wifi recent searches page
- prevent NPE on mSearchResultsFragment

Change-Id: I063ff17e3936be7e608a37bd6a787946b4a310fe
2014-05-09 15:03:33 -07:00
Julia Reynolds
6c088cb221 Settings user restriction changes: debugging features.
Replacing restriction pin with a user restriction for developer options.
Bug: 14081992

Change-Id: I9a71c256fbd20428b4bd2ae12939c9a50d7b5f11
2014-05-09 14:16:00 -04:00
Amith Yamasani
37fe059e79 Merge "Fix crash on settings launch in secondary user." 2014-04-30 18:03:03 +00:00
Amith Yamasani
a97089d389 Fix crash on settings launch in secondary user.
Bug: 14403545

Make sure the tile wasn't already removed for other reasons.

Change-Id: Ia2b5528c01dbfba4919afaf8352e45db9ef345c3
2014-04-30 10:58:09 -07:00
John Spurlock
c9afadb04b Add condition provider access to settings.
Pull NotificationAccessSettings out into a reusable base class
and reuse all of it for a new condition providers settings page.

As with notification listeners, the entire section is hidden if
no apps provide conditions.

Change-Id: Ib5273f3362e392d99647347c23a514e4590f7ac9
2014-04-29 20:21:08 -04:00
Fabrice Di Meglio
769630c895 Settings new dashboard - part 2
Introduce the new Dashboard (a grid like presentation of
Settings top categories) per UX specification.

- the Dashboard is composed of "categories" and in each of them
you have "tiles"
- implement a new layout for showing top categories
(DashboardContainerView). This layout basically acts like a
grid
- depending on the device configuration make the grid with 1
column in portrait / 2 colums in landscape (phones) OR 2 columns
in portrait and 3 in landscape (tablets)
- take care of Accounts adding and removing (as it changes the
number of tiles to show)

Also remove all the old code related to Headers

Change-Id: Ie29944132c1b4c3f7b073d5a7d4453b8f5ec19a7
2014-04-25 17:24:18 -07:00
Fabrice Di Meglio
63bbb8e4fe Settings new dashboard - part 1
- make the Settings dashboard definition be hierarchical (non flat) and use
categories and tiles
- code cleaning: remove mHeaderIndexMap

Change-Id: I16581a736ac5c8388a182d83159161fe3bb04f4b
2014-04-24 10:04:36 -07:00
Fabrice Di Meglio
d297a58402 Add saved Search queries feature
- update SearchResultsSummary fragment to have two lists:
one for Search suggestions (saved queries) and one for
Search results
- a tap on a saved query will launch that Search query
- show the list of saved queries when tapping on the SearchView
- do some fancy hidding / unhidding of the saved queries list
and results list

Change-Id: If15055ab78b0ec5eef4e543173dc7b866bd08e27
2014-04-23 10:35:10 -07:00
Fabrice Di Meglio
42aacb1f50 Merge "Fix bug #14158603 Stability: NPE in Settings: Attempt to invoke... ...interface method 'boolean android.view.MenuItem.collapseActionView()' ...on a null object reference" 2014-04-21 19:46:39 +00:00
Fabrice Di Meglio
23ae00c1d8 Fix bug #14158603 Stability: NPE in Settings: Attempt to invoke...
...interface method 'boolean android.view.MenuItem.collapseActionView()'
...on a null object reference

- fix cases where mSearchMenuItem or mSearchView could be null

Change-Id: I2b0256fe2c8c1b426d4e0799881dd2f13480a00a
2014-04-21 12:43:20 -07:00
Fabrice Di Meglio
a5c0c17304 Merge "Remove non needed code for HeaderAdapter" 2014-04-21 17:52:56 +00:00
Fabrice Di Meglio
f2dee29d66 Remove non needed code for HeaderAdapter
- before, we were showing a Swich for WiFi and Bluetooth entries
in the Headers. As this is no more the case, remove the code
that is no more usefull.

- as a side effect, we are also removing the call to update the
Search Index that was running when the Settings app was resuming
or pausing.

Change-Id: I26b40df5c7a664d196a249840638d89909b6bc24
2014-04-21 10:52:34 -07:00
Fabrice Di Meglio
d33b04ff06 Merge "Search - optimize when updating the Index is done - part 2" 2014-04-21 17:15:51 +00:00
Fabrice Di Meglio
5cda21b449 Search - optimize when updating the Index is done - part 2
- well, fix a regression when launching WiFi / Bluetooth settings
from the Quick Settings: we can only get the Intent properties
after the call to super.onCreate(...)

Change-Id: I21abbee610ad53dd0022c645268e55a6ba31a7b0
2014-04-21 10:14:28 -07:00
Fabrice Di Meglio
d4d829ff9b Merge "Search - optimize when updating the Index is done" 2014-04-21 16:43:21 +00:00
Fabrice Di Meglio
5ebabfcd35 Search - optimize when updating the Index is done
- we should only try to update the index when the Settings app is launched

Change-Id: I0543d518ea3e06804ce6fb09c987ea722bcc87cd
2014-04-21 09:42:41 -07:00
John Spurlock
4a35051565 App-level notification configuration settings page.
New sub-page off of notification settings to ban/unban
apps and navigate to an app's notification configuration
activity (if configured).

Centralized all notification settings artifacts under a new
settings subpackage.

Bug: 13935172
Change-Id: I53b75c02f0091900734d17dc9217035d0df9b466
2014-04-21 12:19:14 -04:00
Fabrice Di Meglio
a32707664f Search - add "live" search results
- now it is possible to have Search results directly when
you are typing (and not only when you press on the Search button
in the IME)
- implement onQueryTextChange(...)
- take care about re-runnin the saved query when the app is resumed

Change-Id: I021c8a9a95b50dce69ab6dace81eecb2fb188f18
2014-04-16 16:54:56 -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
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
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
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
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
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
bbdada8fab Add more logging for onHeaderClick(...)
- log Header title and position

Change-Id: I07f7e8c50613b97609a3ea462b7a8e8fcc415f70
2014-04-04 10:16:59 -07: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
Fabrice Di Meglio
b731dd0554 Fix Up affordance when restoring Settings app state
- save the state of the Up affordance and restore it

Change-Id: Ia00e929b1bbcdaa51280f9b2bb9322f8594c5a37
2014-04-03 19:18:37 -07:00
Fabrice Di Meglio
086c76791f Code cleaning
- remove dead code and some constants that were no more used

Change-Id: I32d19d74e5b271f9e7c8938e4b3c79175bdf69ee
2014-04-03 18:11:37 -07:00
Fabrice Di Meglio
d6985df419 Fix bug #13794200 Settings crash when screen is locked and Power Usage...
...Settings is launched with an Intent

- fix the NPE by checking if mSearchMenuItem / mSearchView references are null

Change-Id: I7518c8360af88a20df780be8cb89360a26cdb8d0
2014-04-03 16:43:26 -07:00
Fabrice Di Meglio
a41707200b Add indexing for ListPreferences
- now support ListPreferences and save the "entries" attribute
- update Index database schema (and increment its version)
- do some clever stuff when showing Search results: if there is
a "$s" or "%s" in the summary (replacement strings), just use
the entries instead

Change-Id: If36595c3816706b6349faff7d3c2e725d3ea33f4
2014-04-02 19:05:45 -07:00
Fabrice Di Meglio
9593782d15 Add indexing for Notifications preferences
- also add indexing of CheckBoxPreferences
- also some code cleaning

Change-Id: I2943caaec3d64fb2a6be85168454fc76fe572afe
2014-04-01 13:21:01 -07:00
Fabrice Di Meglio
d25314d330 Settings - update for new UI (no more Drawer)
- follow the UX spec by no more using a Drawer
- the Dashboard is now a Fragment that contains the list of Headers
- the search results are also put into a Fragment that is replacing
the initial one (Dashboard or other) when expanding the SearchView
- use a SearchView for query input
- when tapping on a Header or a Search Result, re-launch Settings as
an Activity so that we are benefiting from the Activity stack for
UP affordance and BACK button
- manage UP affordance to show it only when needed
- move some Actions to the Menu in the ActionBar for allowing space
to the Search action and removing some clutter
- fix an issue with the Index and WiFiEnabler and their cached Context
that was not updated when there was a Configuration change
- simplify the SettingsActivity code by extracting some inner classes

Change-Id: I50b5f77bb44a7fade1886114dbbc820609a5e63d
2014-03-28 15:51:29 -07:00
Fabrice Di Meglio
fa7dc240e9 Add external Preferences indexing
- define SettingsSearchIndexablesProvider as an internal
SearchIndexablesProvider
- protect access thru using android.permission.READ_SEARCH_INDEXABLES
- update WallpaperTypeSettings and WifiSettings for taking care of
the new model
- update the Dashboard for taking care about external Icons for the
search result
- update sqlite model/version for taking care about Intents
(enable launching external applications for showing the settings)

Change-Id: I2e38599327e6480f1754f52666becce0884cee9d
2014-03-19 14:56:09 -07:00
Fabrice Di Meglio
8dcea48d71 Fix bug #13440372 More option is displayed with Email/Gmail icon after...
scrolling through settings options

- force the image and background to null when needed in the Adapter

Change-Id: If4c1769dcd1651b683a34001dcd922c6554252c0
2014-03-13 21:17:07 +00:00
Fabrice Di Meglio
7cacc12009 Code cleaning - class names
- use class names instead of their static string representation

Change-Id: I82ebfc087bc2bbadb9076c5750265bf400ff4224
2014-03-12 13:19:34 -07:00
Fabrice Di Meglio
b8dfbf1409 Add dynamic Preferences indexing
- introduce a new private interface "Indexable".
- refactor Wallpaper and Wi-Fi settings to support this new
interface.
- only index saved/remembered Wi-Fi networks
- also add the capability to remove some data from the Index.

Fragments that want to publish some dynamic indexable data should
implement the "Indexable" interface and provide a static final field
named "INDEX_DATA_PROVIDER" with is the Indexable.IndexDataProvider
interface for providing the data for indexing.

Thru this interface the Index can ask what are the data chuncks to
index.

Change-Id: I31e7212c87b8218efe1a8f3028147cb19e119be6
2014-03-12 11:34:59 -07:00
Fabrice Di Meglio
b643cbf6d6 Fix bug #13394626 Settings app crashes on changing orientation to landscape mode
- fix NPE on mInitialHeader.id

Change-Id: Ic1017f5a8a20755bf7f36b1f3406d45dcc80ae8f
2014-03-10 12:18:39 -07:00
Fabrice Di Meglio
75eabc20b9 Fix Drawer selection when using BACK
- select the initial Header if needed

Change-Id: I2d884fbab9a49cc3385dbe1b311f9e0853d027d3
2014-03-07 18:17:03 -08:00
Fabrice Di Meglio
c95be4fbb3 Close the Drawer on BACK button if the Drawer is opened
- otherwise (if Drawer is closed), BACK should work as BACK
into the Fragments BackStack

Change-Id: Ic7f500eb77f35e2142a40e6c9e34c4e7f0ec6428
2014-03-07 12:57:38 -08:00
Fabrice Di Meglio
832e546185 Fix bug #13322417 stability-sys: Java crash in com.android.settings:
...java.lang.NullPointerException: Attempt to read from field
... 'long com.android.settings.SettingsActivity$Header.id' on a null object reference

- fix the AndroidManifest for missing meta data
- fix NPE causes in getHeaderTitle()
- update how we are putting Fragments on the BackStack

Change-Id: Ifc0bba744c3b2a0603c2f11f711ef493cbacc9d2
2014-03-07 11:18:36 -08:00