Commit Graph

255 Commits

Author SHA1 Message Date
John Spurlock
b47b2c3f6a Zen: Move zen mode preference to switch bar.
- Add summary line support to SwitchBar.
 - Remove obsolete strings.
 - Wire up switchbar to zen mode w/ dialog prompt.
 - Remove obsolete callback pref helper.

Bug: 20064962
Change-Id: Ifede00b5d43d441ccd94db96bd2796bc57d1a990
2015-04-04 15:47:43 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Jason Monk
f2982a9ba1 Move isolatable bluetooth code to SettingsLib
Move the non-ui bluetooth control/tracking code to SettingsLib so
that it can be shared with others.

Mostly just move classes to frameworks/base/packages/SettingsLib,
however a few things had to move around.
 - Dock handling had to move back to code still in settings
 - Local preference related code had to be moved back to settings
 - Added an error flow from SettingsLib to Settings

Depends on I69fd888362c6dbb325f6113b32c4b15cc6a23a41
Bug: 19180466
Change-Id: Ie57fe26a27bbb0adc2ef69e042a05c7290c6a52a
2015-02-05 10:43:57 -05:00
Maurice Lam
d531a08702 [WifiSetup] Add shadow below header
Added shadow for phone portrait and landscape layouts

Bug: 17136887
Change-Id: I65dc01d7387812681bbc99d5cc9440714a72ff60
2014-08-29 15:17:42 -07:00
Maurice Lam
62c15e38d1 [WifiSetup] Update illustration
Update the illustration assets and make the tablet illustration
always 256dp height according to mock.

Bug: 17133710
Change-Id: I6d84bbb25a9f443e4eb6bf4c1002d8a1438029ef
2014-08-27 16:27:10 -07:00
Lifu Tang
b18e242366 Set switch to the correct enabling state
- Fix b/16951708

Change-Id: I4f9a2a374a771fd353fca436a0d34644f9bc8320
2014-08-18 16:46:48 -07:00
Maurice Lam
8d449a0e36 [WifiSetup] Use framework AutoMirrored
Use framework autoMirrored and override onResolveDrawables to
propagate the layout direction to the drawables.

Bug: 17047609
Change-Id: Ic4a764510e3a89c897d4e243f8fa2a690ac71899
2014-08-15 12:54:33 -07:00
Maurice Lam
d650726b44 [WifiSetup] Update illustrations
Update illustration assets and support for auto-mirroring for RTL
languages.

Bug: 16888091
Change-Id: I828a13558aff42f2ddb12b9afe123f463c4c1522
2014-08-14 17:48:08 -07:00
Maurice Lam
56d781b32b Merge "[WifiSetup] Tablet landscape layout" into lmp-dev 2014-07-23 18:56:15 +00:00
Maurice Lam
068354a1bb [WifiSetup] Tablet landscape layout
Created setup_preference for sw600dp-land, modeled after
template_with_header in Setup Wizard. Copied over wide illustration,
which is again a placeholder and needs real graphics from UX.
Renamed SetupWizardHeader to SetupWizardIllustration. Added
aspectRatio attribute to SetupWizardIllustration that, will set the
aspect ratio of the top padding. If 0 or not specified, padding will
not be set.

Bug: 16349429
Change-Id: Ic2623ee0c0ee8864383d22da006b418b8c371bf0
2014-07-23 14:10:46 -07:00
Jeff Sharkey
b654846300 Data Usage, materialized!
Asset drop so Data Usage matches new Material spec.  Removes time
dimension sweeps, so we now summarize the entire visible axis.  Fix
time axis labels to not draw outside clip bounds.  Remove pie chart.

No more checkboxes in menus.  Telephony items like roaming are moved
back to cellular settings.  Start wiring up multi-SIM support.

Bug: 15760500, 16019700, 16289924, 16303795
Change-Id: Ie8f4821962319bb82ff4bc2f13f1f66ba1bdfe65
2014-07-22 16:24:37 -07:00
Alan Viverette
09be4b3c87 Stop using framework-private switch asset
BUG: 16467249
Change-Id: I0829c3dea522cf59e0f92046ea7c6092d416ad4c
2014-07-22 16:11:01 -07:00
Fabrice Di Meglio
1b18665dbc Fix bug #16319697 ACTION_DEVICE_INFO_SETTINGS intent causes Settings app to crash
- fix the way we are passing switchBarMarginStart / switchBarMarginEnd

Change-Id: Ic6e67643be10877a74ae68075460fa5fd4cc5da1
2014-07-15 18:52:37 -07:00
Maurice Lam
588e61aa05 [WifiSetup] L layout update
Changed the layout based on the new design mocks. Copied over
StickyHeaderListView and SetupWizardHeader. Currently using the
generic illustration but will update to Wifi setup specific version
once we get them.

Change-Id: I22bdef8c9860d419be55938e1e4a6a682db5b7e8
2014-07-09 19:33:28 -07:00
Fabrice Di Meglio
006b2cca13 Fix bug #15897505 Talk back state shows "off" while the talk back is still enabled.
- we were missing the update of the TextView from the SwitchBar so provide a new
setCheckedInternal() method that is doing the TextView and Switch update at the
same time

Change-Id: I6dd9c472a386bb534a58fbf5cf82d9d01fa74f6c
2014-06-27 19:13:19 -07:00
Fabrice Di Meglio
d2b1e441b7 Fix bug #15939648 "Use TalkBack ?" is shown after orientation change even if it was OFF before
- prevent onSaveInstanceState() on the ToggleSwitch
- fix missing setOnCheckedChangeListener() when restoring the SwitchBar state

Change-Id: I818577004f142be46fa378389f264c7f37cfd7b8
2014-06-27 19:01:38 -07:00
Fabrice Di Meglio
204521626f resolved conflicts for merge of f9360dbc to master
Change-Id: I2e468d83a7ce5200c59f63b4362e7bee10d0a2eb
2014-06-12 15:46:41 -07:00
Fabrice Di Meglio
138ff8c045 Make the SwitchBar appear immediately
- change the way the SwitchBar is shown and hidden
- save its state
- remove the delay transition code

Change-Id: I07260430e6709b42517ca011f6d3c3446a626731
2014-06-12 11:13:23 -07:00
Fabrice Di Meglio
475f5b73c2 am 6ba7075a: Merge "Entire Switch bar should be a touch state" into lmp-preview-dev
* commit '6ba7075ae8afb1edc5cb7864bc71121c9992903f':
  Entire Switch bar should be a touch state
2014-06-04 18:08:32 +00:00
Fabrice Di Meglio
e9cb75c636 Entire Switch bar should be a touch state
- add click listener for toggling the Switch and its text
- add Ripple background to the SwitchBar to make a nice Ripple
when there is a click/touch

See bug #15385724 Entire Switch bar should be a touch state

Change-Id: I26ef77ace596029e9c3e1e17b153b54df4a9110e
2014-06-02 16:29:18 -07:00
Russell Brenner
d3446c5708 Refactor setup wizard-related code
Extracted setup-related code from WifiSettings, putting it into a new
derived class, WifiSettingsForSetupWizard.

Set taskAffinity to com.android.wizard, for alignment with other
setup wizard-related tasks.

Change-Id: If371f219dac5d3eff8f7899c16cc6f9475be47cf
2014-05-30 16:16:30 -07:00
Fabrice Di Meglio
00b5e6b247 This CL is not working (even after careful testing) but when I tried I was not completely ToT.
Revert "Fix bug #15170508 When I initially load settings, all on/off toggles start in off position then move to on after pane loads"

This reverts commit 1e52db8063.

Change-Id: I73bdfeba4a4b3e993e37cdae1e3733ffe272b9eb
2014-05-28 17:36:37 +00:00
Fabrice Di Meglio
1e52db8063 Fix bug #15170508 When I initially load settings, all on/off toggles start in off position then move to on after pane loads
- refactor all the code that was using the Switch to control it thru the SwitchBar
- start the Switch as View.GONE and make it View.VISIBLE when it is set
as "enabled" or "checked" so that you dont see the Switch transition (it shows
only with it final state)

Change-Id: I382076bf3c819c530b5b2c06ca2429dfb2cdc6bf
2014-05-27 17:01:10 -07:00
Fabrice Di Meglio
6220275d6d Use SwitchBar for Accessibility Settings
Deals with Talkback / Captions / Magnification Gestures

- follow up CL to 4193776698

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

Change-Id: Ibda0ed05b399f1b2b4464c5b22a3e9fd3d378867
2014-05-15 17:44:26 -07:00
Fabrice Di Meglio
5160536df9 Code refactoring
- move ToggleSwitch to the widget package

Change-Id: Id277fc11c78363bf7d7b229ef9ae91c1ec5d6774
2014-05-15 15:55:33 -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
Kenny Root
7440dde808 Use java.util.Objects instead of internal API
Change-Id: Ib0d797b3e7f2e4f831f52832776b64c0973880b3
2013-12-13 13:28:33 -08:00
David Christie
587e6bf3fc Update power widget icons and fix location behavior
Bug: 11242129

Change-Id: I29f5b4cf914ece4b0991229f384012eb66ba3820
2013-11-07 11:20:35 -08:00
Tom O'Neill
4af6514c78 Switch to receiving LocationManager.MODE_CHANGED_ACTION
- From LocationManager.PROVIDERS_CHANGED

- Part of fix for b/10409275

Change-Id: I4030c8df4db942777d6035266a8ed7f18e458fb5
2013-09-03 07:56:53 -07:00
Lifu Tang
3d0bee59b8 Fixed the widget location toggle button
- Fix b/10531669

Change-Id: Iba08d515119c42e5c4de4ee02d6dd8aea404fc69
2013-08-28 17:01:43 -07:00
Tom O'Neill
93259c14f3 Switch to new location mode API recommended by API council
- Part of b/10461763 fix

Change-Id: I202ce4c817f24a1682796e92fed9cc3efcc31a81
2013-08-26 14:40:54 -07:00
David Christie
5eed792a76 Update power widget to represent gps instead of location master.
Change-Id: I62f701b612db2e31f9ad8b016dbf37ed7fd4ef26
2013-08-21 17:18:51 -07:00
David Christie
512183ea8e Switch location Settings and Power widget to use new Settings api.
Change-Id: I06b7a2e21876a18d9ad42fda2a6c6d4c7b6add48
2013-08-20 15:24:21 -07:00
David Christie
681f799007 Modify Power Widget Gps Icon To Represent Location.
Instead of directly controlling gps on/off, it will
control master location switch on/off.

Change-Id: I12a20fb77c12b5099172167821ff7ed00ba9ea7c
2013-08-08 19:35:31 +00:00
Maggie Benthall
0c5a401a58 Respect user restrictions about adding/removing accounts, sideloading
Hide or disable options in the settings app when the user is restricted from
making changes.

Remove "Add account" button from Settings menu, and "remove account" option from menu in AccountSyncSettings.
Remove sideloading checkbox in SecuritySettings.

Also handle replacement of UserManager.isShareLocationToggleAllowed() with hasUserRestriction, which takes a restriction key string.

Change-Id: I34c74fd5aed8956ba00f92e3d3c657b608454dfe
2013-03-27 18:12:44 -04:00
Jeff Sharkey
e6c5003278 Remove guava dependency to speed up build.
Change-Id: I4cee4b6324e72e94c1241e10f3cdc507d65512cd
2013-03-06 11:47:26 -08:00
Maggie Benthall
ea6260d887 Respect user restriction against toggling location sharing settings.
Change-Id: I1e629129fc9b3b224d4f4402b56d904df9edc43f
2013-02-25 16:49:32 -05:00
Jeff Sharkey
1d6bf8d46b Follow API changes.
Bug: 7333397
Change-Id: I72a27dbe02be376ec1c781955e930e87ea59b5a0
2012-12-11 09:51:02 -08:00
Adam Cohen
2078b6916d Addressing issue where power control widget disappears issue 7205586
Change-Id: I6eea146d3819d3b35f1420e59d4ebdbc66041a9e
2012-09-21 18:52:24 -07:00
alanv
b9062f2678 Add content descriptions to power control widget.
Bug: 6361285
Change-Id: I4fd7ed519de9a5b7e50e6905550695fad02bcc42
2012-08-30 17:08:01 -07:00
Jeff Brown
748ba16a04 Use new power manager API.
Change-Id: If0c58a9bee05ec0de434879e78cd95299e54e3fe
2012-08-14 14:38:12 -07:00
Fabrice Di Meglio
79d8e80a30 Make Settings app aware of layout direction
- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: I696c0f66a16640af767da3c05b5d300fd2284ecb
2012-07-24 15:02:12 -07:00
Jeff Brown
defcb0060d Update references to PowerManager constants that have moved.
Bug: 6435382
Change-Id: Ieea857644dc0cf758e0ff4fd595c6a0115457df0
2012-05-11 18:40:27 -07:00
Gilles Debunne
a478a1e506 Removed the no longer needed font size span flag fix
Related to bug 6448052

A text replacement (as opposed to a deletion) should (and will) not removei
the EXCLUSIVE_EXCLUSIVE spans that have limits identical to the replaced
range of charcters.

Change-Id: Iefaeab9e5119e7223ef6800c55ff0c741976e138
2012-05-04 16:26:11 -07:00
Gilles Debunne
58a904ad2e Data usage limit label font size fixed
Bug 6326750

The font size around the text was removed when its content is replaced.
This is WAI since the spans created from <font> html tags have a
SPAN_EXCLUSIVE_EXCLUSIVE flag. These are removed when their length
becomes 0. The bug came from a recent enforcement of this constraint.

The fix is to change the flags of these AbsoluteSizeSpan spans.

This CL also changes the code to avoid the creation of the int[] array.

Change-Id: Ib58270bb9d1cf0c7609ba1e36d6c0cca841300db
2012-04-17 18:39:26 -07:00
Jeff Sharkey
76c5ed4f35 Migrate to @Override to remove warnings.
Bug: 6303344

Change-Id: I8f17edc3b12d50cedab2c5f555c63bc07d85bca2
2012-04-09 10:57:29 -07:00
Jeff Sharkey
a8106f248c Auto grid lines, lower minimum, disable estimates.
Show automatic grid lines with power-of-two spacing, avoiding ANR
when trying to render thousands of gridlines.  Lower minimum chart
height to 50MB to give better view of linear data.  Also disable
estimates rendering.

Bug: 5500204, 6005240
Change-Id: Iacfed11b32c0095c9c2d08bee6a1b5e29637de98
2012-03-15 18:38:36 -07:00
Jeff Sharkey
e5223a0577 Save timezone when setting data cycle reset date.
Bug: 5938567
Change-Id: I9df8da9d030169952098efc04cfde79e3e42e1f8
2012-03-09 18:24:01 -08:00
Dianne Hackborn
7d09187e41 Use a component name that actually exists when enabling/disabling.
Change-Id: Id6422a0039060bce3dc1bdc39551f04a4e4adbe6
2012-03-05 18:37:54 -08:00
Jeff Sharkey
f3871fb2b2 Linear bytes scale, time ticks on first week day.
Move bytes to linear instead of logarithmic scale.  Also render time
ticks on first week day based on locale.  Also enable testing of
specific IMSI through setprop.

Bug: 5452612, 5829693
Change-Id: I13200cf58a39bfe0ac343e1f83165e899867641b
2012-02-03 19:29:15 -08:00