Commit Graph

95 Commits

Author SHA1 Message Date
Fabrice Di Meglio
0d643fd182 Fix Up and Search affordances
- UP is also shown for a SubSettings of a Shortcut
- Search is never shown for a Shortcut (SubSettings or not)

Change-Id: I5b87cf773ea0266a0f5dd090613bbbba905be330
2014-06-16 20:18:05 -07:00
Fabrice Di Meglio
1c3203e83e Merge "Update Settings redlines per UX request" into lmp-preview-dev 2014-06-10 22:18:15 +00:00
Fabrice Di Meglio
da8babaedf Update Settings redlines per UX request
See bug: #15384992 Setting Dashboard - padding updates

Change-Id: Ie95b6cee701847d7f76f2e2a72aaf8fc64bc4dd9
2014-06-10 19:36:26 -07:00
John Spurlock
c7f8e8ce69 Settings: Battery saver settings sub-page.
New battery saver settings page, accessed via
the power usage settings overflow menu.

The settings page has a master switch to toggle
battery saver mode, feature disclosure text,
and a preference to configure the automatic
trigger level.

Remove developer checkbox now that this option
has a real home.

NO_SQ: multi project change
Bug:13329308
Change-Id: Iac54238f3406439711b44a3c17f220ac5e370a37
2014-06-10 17:26:47 -04:00
Fabrice Di Meglio
a9e77993d1 Fix bug #14499324 Label of the "Language & input " page doesn't get updated
...as per the newly selected language

- use also title resource id when possible

Change-Id: Ibeb95d605cd79910c18f4529b749645c9ed0fc17
2014-06-09 13:01:39 -07:00
Fabrice Di Meglio
c9548c1747 Merge "Fix bug #15460001 "Cell broadcasts" setting search suggested in wifi only device though setting is not present" into lmp-preview-dev 2014-06-06 23:38:11 +00:00
Fabrice Di Meglio
dba577f8f0 Fix bug #15460001 "Cell broadcasts" setting search suggested in wifi only device though setting is not present
- implement a BaseSearchIndexProvider for WirelessSettings
- fix Context passed to the Index: now use an ApplicationContext
- also use the correct Context when dealing with Settings SearchIndexProvider
- also makes impossible a rogue BaseSearchIndexProvider to crash Settings
if not well behaving
- last, fix icon used for "NFC & more" search results

Change-Id: I8b5cc999fa57a9e1977ee57394801d54cf3dbabb
2014-06-06 16:35:41 -07:00
Amith Yamasani
4093e40e18 Show user management UI if a managed profile exists
Show UI even if flags to show multiuser UI are off, if there's a
second user on the device. This way there's an affordance to remove
the user.

Don't show the "Add user" item though.

Bug: 15447068
Change-Id: I40273005d6d8d66aed486328615acdab71d51fa4
2014-06-06 14:31:37 -07:00
Fabrice Di Meglio
3d35ec7292 Fix bug #15469483 Search menu should not be present when Settings is launched as a Shortcut
- create the Search menu only for non shortcut launch

Change-Id: I8f83fb6c199509f2b2215a20b19f92e3d736b733
2014-06-06 12:13:29 -07:00
Fabrice Di Meglio
bb05178dba Fix bug #15434475 Developer Options do not show immediately after activating them
- allow Dashboard categories reloading

Change-Id: I02d9f1e8ed4d8b8b670835a8d717c6c08b49fe05
2014-06-04 17:33:25 -07:00
John Spurlock
4e4cdeffdb Settings: Remove sound settings.
- Move the remaining conditional preferences into
  the combined Sound & Notifications screen.
- Refactor the "Other sounds" sub-settings screen to
  provide a home for the new preferences.
- Migrate docking sounds, conditional on config.
- Migrate docking media, conditional on config.
- Migrate emergency tones, conditional on CDMA.
- Move all boilerplate preference <-> setting plumbing into
  a separate helper.
- Since some preferences in Other sounds are now conditional,
  create a special indexer for searching.
- Remove SoundSettings (and xml), create aliases in the manifest
  to avoid breaking shortcuts.

Bug:15279526
Change-Id: I5ae3ecda2f899b1948f7908bd217a799326c2c56
2014-05-28 16:37:43 -04:00
Fabrice Di Meglio
42c4b0abe5 DO NOT MERGE: Optimize Dashboard loading
- prevent loading categories twice
- add some logging to see the time taken for building the Dashboard titles

Change-Id: I31724c0e66fe3b453a87f12476f58db84c73423f
(cherry picked from commit b644f29313)
2014-05-27 20:58:43 +00:00
Fabrice Di Meglio
59a4055cbb Make smooth transition between Search fragment and the others
- use TransitionManager.beginDelayedTransition() and
getFragmentManager().executePendingTransactions()

Change-Id: I5d583916afb8b87dfe2b17b4e685ef5384c5fbd2
2014-05-23 16:46:50 -07:00
Fabrice Di Meglio
7e4855e8f6 Update Search recents behavior
- per UX request
- Search recents show now by defaults with the recent searches
when the SearchView is empty
- when we press on a Serach recent, we are showing the Search results
and the recents are disappearing
- when keying text in the SearchView, we hide the recents and start
showing the results
- we still save the Search query when hitting on a result

Change-Id: I6c2be21660a30f6973dea27d4852b2068a05963d
2014-05-23 16:09:53 -07:00
Fabrice Di Meglio
680b064b29 Optimize categories loading and refresh
See bug: #15091992 Opening sub activities in settings is very slow

Change-Id: I6e2e7a07fed72f35850da0614adaafde94618a4e
2014-05-20 15:19:29 -07:00
Fabrice Di Meglio
d2b64f339a Fix bug #15001610 Java crash in settings is observed while adding Google account on wiped device
- update Settings main layout to be able to show the Buttons
- make WifiPickerActivity a SettingsActivity and remove dead code
- fix reference to Buttons for using the Settings IDs instead
of the Framework ones

Change-Id: I23bfd1b8290fc007e6e80aa9a6297e55e7f6004e
2014-05-20 14:23:56 -07:00
Fabrice Di Meglio
d8aec08fa9 Fix potential NPE with ActionBar and SwitchBar references
- in some rare cases (SetupWizard and select WiFi during account
creation) there is no ActionBar nor SwitchBar. Prevent any NPE
coming from them.

Change-Id: If52b9cdee8730c90c5da3067a1a35ebdd0255470
2014-05-20 10:53:04 -07:00
Fabrice Di Meglio
5f995727cc Fix bug #15080198 Enabling developer options requires restart of settings to enter
- fix Dashboard categories refresh issue

Change-Id: I5bb7fc4a1410df8f5c2d2d13f7625a1ccc8893c3
2014-05-19 19:51:31 -07:00
Fabrice Di Meglio
4193776698 Introduce SwitchBar widget
- SwitchBar is a LinearLayout that containts a TextView and a Switch and
is intended to replace all Switches that are put in the ActionBar as a
custom view
- use the new SwitchBar for WifiSetting only for now (a later CL will
take care of all the other Setting that are using a Switch in the
ActionBar)

Related to bug #14898161 On/Off switches must move down from Action Bar

Change-Id: I5e98dbe995bba8f440d08459e09ca3ac09d3464b
2014-05-14 16:42:06 -07:00
Fabrice Di Meglio
35062d6983 Make more room in the ActionBar
See bug #14898161

- allow Search Option Menu only on the Dashboard (and no more
in the Settings screens)
- push the "Start Now" Day Dream Option Menu to be a real Menu
so that we can see the "Day Dream" title

Change-Id: I4a7c21fb3599ada8efc82bd5bd8c9f5049937ceb
2014-05-13 14:39:41 -07:00
Fabrice Di Meglio
15826d4ea1 Mode code cleaning: remove obsolete references to EXTRA_NO_HEADERS
- the EXTRA_NO_HEADERS flag as no more meaning as we are showing
the Tiles (previously named "Headers") only in the Dashboard
(which is the main Settings screen)

Change-Id: I55656de0d28ca9c84adbe6647d870838b4ac230b
2014-05-13 13:10:34 -07:00
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