Commit Graph

40 Commits

Author SHA1 Message Date
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
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
Fabrice Di Meglio
ad38a88b95 More code cleaning
- remove some dead code
- better variable naming
- add debug log for exception
- clean some unused imports

Change-Id: Iec4239a7e75f29d860f286ab089e748e8a672281
2014-01-14 14:04:04 -08:00
Lorenzo Colitti
6eb6a90821 Cache preferences and services in status dialog.
Currently, the status dialog fetches the preferences and system
services that it uses to display connectivity information (e.g.,
IP and MAC addresses) only when the dialog is first opened. This
is fine because the connectivity information is only filled in
once and never updated.

In order to have this information update dynamically (like the
rest of the dialog), fetch and cache these objects in onCreate.
The next change will actually make this information update on
network changes.

Bug: 10232006
Change-Id: Ib4072674543e517cf6935e3e03f35090e728090a
2013-11-15 02:38:35 +09:00
Lorenzo Colitti
b75f10305d Merge "Display all link IP addresses, on different lines" 2013-08-07 00:32:44 +00:00
Amith Yamasani
56f51a8927 Single pane for 10" Settings
Change-Id: I960e4be3cfb19ffec4100f8766742d6fb17dda4a
2013-08-06 16:23:37 -07:00
Lorenzo Colitti
769f069a47 Display all link IP addresses, on different lines
Currently, the "IP address" field in the status page of the
settings app displays only the IP addesses on the base link.
Make it display the stacked link IP addresses as well.

Also, separate IP addresses via newlines instead of commas.
For example, display:

2a00:f40:e000:11c:cf93:ee9:5ad3:6686
192.0.0.4

instead of:

2a00:f40:e000:11c:cf93:ee9:5ad3:6686, 192.0.0.4

Change-Id: Ie78da142fea87735139adcefcfed7154b4f7fefb
2013-08-01 21:45:09 +09:00
Jaewan Kim
a3fe77b2e4 Remove Battery settings if battery is not present
Bug: 8051556
Change-Id: I044b24e26dc3d6351c19168a2fcd085a1e761796
2013-06-07 14:32:02 +09:00
Fabrice Di Meglio
b27223f139 Fix Switches padding for Settings app
- use setPaddingRelative() instead of setPadding()

Change-Id: Ifd14193a5f60d303035b394616dc65a70e1ef5f9
2013-01-15 18:54:11 -08:00
Amith Yamasani
004970da50 am 0df6a277: Merge "Grey out settings icon when it is in disabled state"
* commit '0df6a2771d92e355e122195d3dceaf9a2b264ee5':
  Grey out settings icon when it is in disabled state
2012-12-12 09:55:56 -08:00
Jeff Sharkey
97d07fa3ae Push scrollbars to screen edges.
Push scrollbar to screen edges on custom ListView and ScrollViews to
match Preferences framework behavior.

Bug: 7633165
Change-Id: Ideecd0e243c7de7bf977caef2b1585e707a00ca4
2012-11-30 16:15:09 -08:00
Dianne Hackborn
79d42bb622 Be quiet!
Change-Id: Ifcce5bf4b2fca35fe50a2684983dc726534c3d0c
2012-11-28 18:05:00 -08:00
Shuhrat Dehkanov
96577681a2 Grey out settings icon when it is in disabled state
If engine is not active, its settings icon is disabled in
Settings > Language & input > Text-to-speech output screen.
Currently, settings icons for all TTS engines are shown at
the same opacity. This fix dims settings icons of not-selected
engines.
Make sure that more than one TTS engine are installed on the
target, for e.g., Google Text-to-speech Engine and Classic
Text To Speech Engine (SVOX Classic TTS).

Additionally, since setAlpha() is used in multiple places within
Settings package, moved DISABLED_ALPHA declaration to Utils.java
in order to have single point of reference.

Change-Id: Ifa7de79814a2f4a4aa021cd8621cbfab41655680
Signed-off-by: Shuhrat Dehkanov <uzbmaster@gmail.com>
2012-11-28 23:45:35 +09:00
Amith Yamasani
8d40fac706 Use given name instead of full name for the initial population of User name.
Bug: 7406217

Change-Id: I5006039ef146369f569445d0fcbaf82fd163343e
2012-10-24 10:30:51 -07:00
Amith Yamasani
9627a8ea15 Show more settings and add restrictions/dialogs for secondary users
Bug: 7213029 crash in About>Status
Bug: 7212495 hide System updates for second user
Bug: 7212230 nickname editor should select the text
Bug: 7160487 TTS settings
Bug: 7129411 Settings needs visibility changes for secondary users

Change-Id: Ia2d1229c08b392edfa6b671fce4a382410405b14
2012-09-23 18:43:31 -07:00
Amith Yamasani
f34a85d5d5 Use Bitmap instead of ParcelFileDescriptor to get the user's icon.
Change-Id: I1dd7261b47ba98a2a0834dbfb8c22de369e6cc58
2012-09-17 22:47:37 -07:00
Amith Yamasani
e940dac47a Use UserManager.getUserIcon() to get the user's avatar.
Change-Id: I035a5e2a518eb827a2e44910471ed04923921aa3
2012-09-17 12:39:41 -07:00
Amith Yamasani
ae47ef43fa More user management ui work
Show setup dialog after adding user.
Write user profile to nickname on setup.
Remove self.
Correct dialog text for user creation.

Bug: 7104261
Bug: 7174751
Bug: 7174685

Change-Id: I0ecd688f3edaef61332f974012454ceb87762e9f
2012-09-16 23:15:42 -07:00
Brian Muramatsu
0bd54a65d6 display wireless charging status
- show "Charging (wireless)" when using wireless charger
- change "Discharging" to "Not charging"

bug: 6879638

Change-Id: I20e78f2bde7a526667510b82a030f5952d9dda75
2012-08-14 15:30:22 -07:00
Amith Yamasani
929f04e28e am 8ad7abbc: Merge "Corrected return value for updatePreferenceToSpecificActivityOrRemove method"
* commit '8ad7abbcf64076b4df8ff3e724815c2e7940be8e':
  Corrected return value for updatePreferenceToSpecificActivityOrRemove method
2012-05-25 07:19:56 -07:00
Amith Yamasani
f0b05de3e0 Apps tabs align to title on 2-pane settings.
Pad the lists in Apps screen.
Pad the color bar to align with the list.

Bug: 6449489

Change-Id: I28c39e2aae04a1fe36c6b7dc447ae19da575edaf
2012-05-09 12:05:17 -07:00
Shuhrat Dehkanov
7dc567af05 Corrected return value for updatePreferenceToSpecificActivityOrRemove method
Returned value should be false if preference is removed or was already deleted/missing.

Change-Id: I2a48bd8e0f5a82b76b60b2d11fac2305f0e27eed
Signed-off-by: Shuhrat Dehkanov <uzbmaster@gmail.com>
2012-04-23 01:59:56 +09:00
Amith Yamasani
6822b749bb Show IP address of current active link instead of just the WiFi IP address.
Bug: 5359194

Show "Unavailable" only if there's no active link.

Change-Id: I82ba6bda3a08ea84080a8d8cda331f22d7c7a2bd
2011-10-17 16:55:54 -07:00
Amith Yamasani
ae69755aa8 Disable USB connection type when monkeys are running.
Bug: 5375336

Also use the correct API for testing if monkeys are running.
(ActivityManager.isUserAMonkey())

Bug: 5375910
Change-Id: I2bf8e061ee5977d521de197d3a92095c1a98218d
2011-09-27 11:33:17 -07:00
Jeff Sharkey
a83a24f48a Surface tethering stats in data usage.
Bug: 5244846
Change-Id: Ib4ac03ab634278714576a66ef8d6fdbc6d15c82a
2011-09-16 18:28:39 -07:00
Jeff Sharkey
5d70679c02 Larger touch targets, snap to persisted value.
Extend ListView content to screen edges, and use InsetBoundsDrawable
to draw separator and divider with expected padding.  Sweep touch
targets are now much larger.

Snap sweep to persisted value, and fix NFE when parsing label value.

Bug: 5274249
Bug: 5262865
Bug: 5242857
Change-Id: Ifa0f3e622767d5b4dc85a73d6340207e6038a429
2011-09-08 19:02:31 -07:00
Robert Greenwalt
8af88fb838 Use the new isNetworkSupported api for wifi-only
Didn't have an API for this before so people used a hacked system property (ro.carrier)
to determine if the device supported mobile data.  Added new API and switching callsites.

bug:5087537
Change-Id: Ibd799559be102a9e2fd552d1a23d1afbcf8f4614
2011-08-31 16:45:39 -07:00
Jeff Sharkey
b654cbb896 More TabWidget and padding tweaks to match spec.
Also fix NPE in UserDictionarySettings.

Bug: 5184822
Change-Id: I082981c3bcf9b1e6575dcf9f42495a17f0ec8672
2011-08-18 15:30:17 -07:00
Amith Yamasani
a4379d6b38 Use a different wallpaper fragment title from the preference item.
Change wallpaper list ordering to alphabetic.
Display battery level and charging status in Battery settings.

Change-Id: I8ead0fb0f018c79ed258bd1c1ca3f8ecaf32da83
2011-07-25 14:09:57 -07:00
Jean Chalard
71ad1f4e3e Change the interface for user dictionary multiple locales.
The user dictionary interface now works the following way:
* Locale gathering
- The current locale is always considered as present, even if
there are no words for it in the user dictionary.
- Any locale for which at least one word is registered is
considered present.
- A null locale is considered a valid locale meaning "all
languages".
- If no words are present at all, since the current locale is
always considered present, the system will consider there is
exactly one locale present - and allow editing this user
dictionary.

* Options display
- If only one locale is present, the interface is the same as
for Honeycomb: display a "User dictionary" PreferenceScreen
that brings up the dictionary editor interface.
- If there are several locales present, then the user
dictionary option will jump to a screen that will display a
list of available locales.

* Word insertion
- Inserting a word will always use the locale of the currently
displayed dictionary. If it is the "all languages" null
pseudo-locale, that will still hold and the word will be added
to this pseudo-locale.

It is worthy to note that the "All languages" locale is only
accessible if for some reason there are already words with a
null locale in the database before this is installed. For
example, if an application has inserted some words that way,
or if the user inserted words with a previous version of the
settings application.
On a freshly flashed device, barring the use of third-party
application that would add such words, it is not possible to
access the "all languages" locale any more because there is
no interface to do it, though it works if such words are
inside.

Bug: 3479738
Change-Id: Iba323e5aeb3f4f575896903a4e8bef6ffb3ea306
2011-05-18 12:54:20 +09:00
Amith Yamasani
c06d4c48a9 Remove more entries not relevant to wifi-only devices.
Bug: 3488384
Bug: 3487976
Bug: 3488381

Removed Cell standby entry from Battery use screen.
Removed Mobile signal strength from BatteryHistory screen.
Added wifi IP address to About->Status
Remove auto-timezone checkbox in Settings->Date & time

Change-Id: I228721a3613b1aeb600026e42274337886552698
2011-03-01 12:03:24 -08:00
Amith Yamasani
0f85c48d6c Remove / re-word some settings for WiFi-only devices.
Bug: 3468248

1. Remove Wireless->Mobile networks
2. Remove Wireless->Tethering and WiFi hotspot
3. Remove Wireless->Wi-Fi Settings->Wi-Fi disconnect policy
4. Re-word Network location summary text to not include "mobile network"

Change-Id: I84a551a1b63591974731029b0d4b90a85e43a716
2011-02-24 10:53:29 -08:00
Amith Yamasani
02cf71a591 Use PreferenceActivity and FragmentBreadCrumbs as they offer the same capabilities now.
Also fix: 2997438 and a similar bug in Tether Settings
Show + menu item for User Dictionary
2010-09-21 15:48:52 -07:00
Daisuke Miyakawa
a2633d0232 Move ManageAccountsSettings into Settings.
- Add activity-alias for the Activity.
- Copy the Activity from AccountsAndSyncSettings.
- Fragmentize ManageAccountsSettings.
- Remove dependency toward AccountPreferenceBase, which is
  used in AccountsAndSyncSettings widely.
- Add missing implementation derived from AccountPrefernceBase.
- Copy dependent drawables.
- Copy dependent xmls
- Copy AccountPrefernce.java.
- Copy strings, adding CHAR LIMIT.
- Remove the logic which remove the preference when its destination
  Activity is missing. We already have the destination as
  Fragment, and it never disappear.

Change-Id: Id41c63d7064aebeaae31bcd84bf4fd20a5636dfe
2010-09-17 11:22:02 -07:00
Amith Yamasani
60133dd036 Conditionally remove settings that aren't required on the tablet.
Bug: 2985267

Changes not done : SD card related stuff, as we need some way still
to figure out if there is a real SD card in the device.

Change-Id: I21c41f18ebe6c050981918481a7f6d69f04b65d0
2010-09-11 14:58:01 -07:00
Anders Hammar1
b2dd90383b Settings: Add a hook for operator or vendor specific settings.
The Settings application now provides a hook that can be used by an
operator or a vendor specific application to add an activity of choice
in the settings menu.

Change-Id: Id55da9fd4262bbfc6a5abf863799c747b0d75b24
2010-06-11 14:27:29 +02:00
Ying Wang
a718832e28 Still use ro.monkey
http://b/issue?id=1681101
So just some refactoring.
2010-01-06 09:46:17 -08:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
de2d9f5f10 Initial Contribution 2008-10-21 07:00:00 -07:00