Commit Graph

274 Commits

Author SHA1 Message Date
Fabrice Di Meglio
6f0739a3d9 Add Search to the Settings App (initial release)
- add basic UI for search
- build the search Index thru sqlite FTS4 (faster than FTS3)
- create the search Index on the fly depending on the locale
- re-index if there is a configuration change
- re-index too if the Android build version has changed (usefull
for an Android OTA or when a new Android version is pushed as
we need to recompute the Index)
- search thru "title" and "summary" Preference's data
- group results in the same order of the Settings categories
into the Drawer
- rewrite "title" and/or "summary" if they are containing
an hyphen "\u2011"
- add Preference Keywords (only for the Settings App) in the
Index and allow search on them (Wi-Fi network preference is
used as an example)

Known restrictions:

- we cannot yet search for "dynamic settings"
- ... nor we cannot search for settings coming from an external App
(like the Phone App and its related settings that are surfacing
into the Settings App).
- will need a few other CLs to add more keywords (and have them translated)

Change-Id: I017a4d6c433f28c257c08cacc1bed98c4c517039
2014-03-03 14:46:17 -08:00
Fabrice Di Meglio
6d534a1da5 Fix Drawer selection and initial Header
- now select the correct header when launching Settings shortcuts by
taking care of initial header
- also fix an issue when having to "double BACK" on the initial header
- some code cleaning (no need to test non null references)
- move code to group it by topics

Change-Id: Ifdf6dd7f5605e858b324d00165f0a5e8124efdfc
2014-03-03 20:18:43 +00:00
Fabrice Di Meglio
947d8143b9 Merge "Fix Fragment BackStack and Titles" 2014-03-03 18:01:19 +00:00
Matthew Xie
7f36c272c4 Merge "Update context on resume calls for BluetoothAdvertisingEnabler and BluetoothEnabler" 2014-03-01 22:20:34 +00:00
John Spurlock
7243806345 Zen mode configuration panel. (packages/apps/Settings)
Read-only version of the configuration screen for
Limited Interruptions.  Defaults to the logic implemented
for this mode, namely block notifications except for
Calls & Alarms.

This settings panel will serve as a target for the
configure affordance in SystemUI.

Change-Id: I33fd1e11ab76dbb7044bb94cb096cd892945947d
2014-02-28 17:44:40 -05:00
Fabrice Di Meglio
8eb3f0fbf2 Fix Fragment BackStack and Titles
Related to bug #12939786 and bug #13223838

- first use Fragment BreadCrumb for managing Titles and Back
- consider the first fragment as the initial one (both in the
normal case and in the shortcut one)
- fix usage of the Fragment BackStack so that in all cases we
are returning to the initial Fragment before exiting the App.

Change-Id: I96989d14f4e88688747b93ab9fadd96aea214a2c
2014-02-27 16:51:06 -08:00
Fabrice Di Meglio
0e2f949c90 Fix bug #13140648 Settings needs to support the new Quantum Paper theme
Second pass:

- use Theme Holo for the Drawer too
- add a temporary background for Drawer icons (so that they dont mix
with the Drawer background)
- remove the "More..." icon as it was not needed

This CL will show that there is a discrepancy into the Drawer icons
size (some are smaller than the standard size, some other bigger).

This issue will be fixed when the new set of Icons will be delivered
by the UX team.

Change-Id: I431882df9b98157e98a1b735f31d9e77ef846767
2014-02-25 14:26:27 -08:00
Fabrice Di Meglio
dca2806a23 Implement Holo Light Theme for Settings
... and use Holo (Dark) Theme for the Drawer as requested by UX

Also remove the Wi-Fi and Bluetooth switches in the Drawer per
following UX specification.

Change-Id: I4fc17481255b5db337a887033bc831ded0d2d701
2014-02-24 13:03:32 -08:00
Fabrice Di Meglio
74309ea53a Fix bug #13058470 Cannot add account -- Settings app crashes
- revert back to an Activity instead of a fragment. This
is a straight reverse of the changes introduced for trying
to have a Fragment.

Basically ChooseAccountActivity was previously an Activity for
choosing an account type. If the list of account types was containing
only one item, then the ChooseAccountActivity was just a pass thru
and was falling back to the only account authority available.

In the current reported bug, this was happening by disabling the
Email app and thus having only the GoogleAuthenticator as an
Authority.

Then in the onCreate() the ChooseAccountFragment was seeing that
there was only one account authenticator and issuing a BACK button
press. Too bad, this was done into a non finished Fragment transaction
and leading to a crash.

All in all, we NEED to have an Activity and cannot use a Fragment
in that case.

Change-Id: I4a867a25fe9580929ec50a6775105adac1f88c52
2014-02-20 16:21:14 -08:00
Fabrice Di Meglio
e611b8590d Merge "Fix bug #13084552 Correct list of accounts are not shown when tapping ...on type of accounts(corporate,google etc.,) in Settings under Accounts section" 2014-02-19 22:18:15 +00:00
Fabrice Di Meglio
61a77ab51d Fix bug #13084552 Correct list of accounts are not shown when tapping
...on type of accounts(corporate,google etc.,) in Settings under Accounts section

- allow Account Type (corporate and the others...) entries to work.

Basically as they are sharing the same fragment we could only hit it
only once (and the first hit was winning).

Change-Id: I16683fc7342564a8ed1a4853a576166ab4d91df9
2014-02-19 14:14:03 -08:00
Fabrice Di Meglio
2858b790ad Fix bug #13027956 For restricted user launching Settings app from all apps drawer
...by default opens wifi setting screen

- add the Dashboard to the list of restricted fragments

Change-Id: I7787ed7c9f2a53ea1047b6ab860ded50e4e5d840
2014-02-18 19:35:08 -08:00
Matthew Xie
a504c4dcdf Update context on resume calls for BluetoothAdvertisingEnabler and BluetoothEnabler
The saved context could be invalid if not updated
bug 12991455

Change-Id: I93abb8420d0fa53add1f0e843a5069d59743891c
2014-02-14 17:08:38 -08:00
Fabrice Di Meglio
a7ad619af4 Fix bug #12991557 User taken to previously closed setting option
- fix behavior when we are closing the Drawer. Now will not trigger twice the same action
- fix selection in the Drawer for "Add Account": it basically should never be selected
as it is more like a button
- fix also Titles stack when launching an Intent
- remove some dead code

Change-Id: I196ad9fcd0599703f2abb902b088fbda9b4690a0
2014-02-12 16:37:04 -08:00
Fabrice Di Meglio
de40d9ed2f Merge "Fix title when changing from portrait to landscape configuration" 2014-02-12 22:46:51 +00:00
Fabrice Di Meglio
5529d29f6c Fix title when changing from portrait to landscape configuration
- save the titles stack during onSaveInstanceState(...)
- set it back when creating the activity if there is a savedInstanceState
and restore the title to the last item in the stack

Change-Id: Ic6c2714f5474275c9f55cc4d6c70d14f6a8cd993
2014-02-12 12:38:07 -08:00
Fabrice Di Meglio
e6c9a5da01 Fix bug #12979102 Menu (Reset to default) and Add icon missing in APNs
- revert the changes on the ApnSettings to be again an Activity...

Change-Id: I7a12e25456f0a0df0f7618183f49fd8db10a5441
2014-02-11 19:03:27 -08:00
Fabrice Di Meglio
6502720566 Code cleaning
- remove duplicate reference to current header (mCurHeader) in favor of mCurrentHeader
- clean onSaveInstanceState()

Change-Id: Ia9322471f0b0d13d51e105c8fd625774d8867fdc
2014-02-11 15:27:00 -08:00
Fabrice Di Meglio
7ce7c40dac Fix bug #12957228 Java crash in com.android.settings: java.lang.IllegalStateException:
...Can not perform this action after onSaveInstanceState

- prevent a click on the Drawer's Headers when the App is paused / finished
- register / unregister the DrawerListener when needed

Change-Id: Ia270ef27b23c66d55565bbb73d4f6a6531b742d2
2014-02-11 13:31:39 -08:00
Fabrice Di Meglio
10afdb82ac There are several painful issues with the initial CL. Doing a revert for now and will rework this.
Revert "Fix bug #12939786 BACK should go back into the Fragments BackStack and finally to Overview ...and then exit the Settings App"

This reverts commit 4cc95a53c2.

Change-Id: Iaa21d4771d0b004eff3d8e68b91b546a633d8f23
2014-02-11 19:50:56 +00:00
Fabrice Di Meglio
4cc95a53c2 Fix bug #12939786 BACK should go back into the Fragments BackStack and finally to Overview
...and then exit the Settings App

- fix the way we manage the Fragment BackStack
- revert back ChooseLockGeneric to be a PreferenceActivity

Change-Id: I3c366b4be606e2e211facd0299b9a2de5cc6ea79
2014-02-10 16:07:50 -08:00
Fabrice Di Meglio
ca915668af Fix bug #12910775 Settings crash after tap on Access Point Names under Mobile networks
- ApnSettings is now a fragment so introduce a new ApnSettingsActivity
- ApsSettingsActivity will use the ApnSettings fragment
- move the getListView() call to onActivityCreated(...) as the ListView
needs to be created before this call can be done.
- add also an alias for the old activity name ".ApsSettings"

Change-Id: Id228722d7f34415d4b036282f0845e28546111df
2014-02-06 17:23:03 -08:00
Fabrice Di Meglio
dc77b738a7 Fix bug #12890490 Crash in Settings observed after tap on Preferred Engine settings and Cloud print option
- when setting the Fragment's title use the CharSequence when the titleRes ID is "0"

Change-Id: I54e5379172632acfc967b5ea401ba90f73b41748
2014-02-04 12:41:30 -08:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00