Commit Graph

26 Commits

Author SHA1 Message Date
Tony Mantler
bff7116ff0 Move DreamBackend to SettingsLib
Change-Id: Ia3f3f68e7182c74f4db6e00635fa0c928032a8fc
2015-10-09 14:37:16 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04: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
28ffbd3ba7 Fix bug #15086008 NPE observed after user setup device daydream followed by device orientation
- get the Switch reference when the fragment activity has been created
and thus into onActivityCreated(Bundle)

Change-Id: I16c8e42ff225db029d017c392f4273a1fe277a21
2014-05-19 17:30:23 -07:00
Fabrice Di Meglio
c2e2f77739 Use SwitchBar for Daydream Settings - a better way
- follow up CL to 4193776698

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

Change-Id: Ia8392f367ae956a2f805719971e0e1772f9234cd
2014-05-15 15:20:12 -07:00
Fabrice Di Meglio
c32b0eff71 Use SwitchBar for Daydream Settings
- follow up CL to 4193776698

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

Change-Id: I89d1c6a5b74a8916d579f73e7b716ec7d41ed2d4
2014-05-15 15:11:43 -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
ede1435518 Make all the Settings Switches appear again
- use the ActionBar Theme context when creating the Switch for
getting the correct Theming

Change-Id: Ic3701c53662b0f245c7149b119de8bb5cbaae232
2014-04-18 16:49:35 -07:00
Fabrice Di Meglio
e2b9e07e5f Fix bug #13880310 Toggle On/Off buttons disappear on hitting Search...
... and back button in sub-settings

- move code managing the Switch from onCreate(...) to onStart()

Change-Id: I747180bea3880e84635134373bf4c681378f3ec8
2014-04-08 14:27:08 -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
Per Allard
6251d707b1 'When to daydream' dialog does not follow the JB dialog design guide
The dialog is a single selection popup and according to the
dialogs design guide the popup should close when the user
has make his/her choice, but in this case it does not.

Change-Id: Iac6bc19146a88236d3253d2d846212ce09b4925b
2014-01-23 18:15:56 +09:00
Chris Wren
797805909b allow daydream settings to be keyboard driven.
Bug: 8339092
Change-Id: I9ef93a6633cdaee9bb823da424cd422efffd2475
2013-03-12 16:32:40 -04: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
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
Daniel Sandler
c825bc8e17 More descriptive summary for "Sleep Mode" pref.
It will either show "Off" or the name of the selected dream.

Also, move "When to sleep" out onto the visible part of the
action bar if there's room, making it much easier to discover.

Bug: 7320701
Change-Id: I1d4e2c17b764b8ee054dbb17c23f559d735e3450
2012-10-18 11:38:28 -04:00
Chris Wren
63707af94a show the dream enable switch in all conditions.
Bug: 7229905
Change-Id: I3fc3b2e8ce1e8bb08c72daed9c5d33ce5ff343c6
2012-09-26 14:53:45 -04:00
John Spurlock
0abbc1ede1 Dream Settings: Disable settings icon if not selected.
Bug:7129176
Change-Id: I6ceb6b7bd37032197ab3777901156c9424cbc301
2012-09-10 15:17:10 -04:00
John Spurlock
1537e8b3e8 Dream settings: list items back to constant height
Expanding/collapsing items removed, settings icon shown on right
with divider if applicable.

New "Start" action on the action bar to start dreaming.  This is
no longer in preview/test mode, but a call to .dream().

Bug: 7010260
Change-Id: Ia1d8b9a70218dcc598bf62befbf545f572bbc6b1
2012-09-05 10:28:49 -04:00
John Spurlock
7af2aa52ac More traditional list item style for dreams settings.
Other improvements:
 - remove "Start dreaming now", promote "When to dream" to action bar
 - added logging
 - hide dream settings button if n/a
 - new flat style for settings/preview + dividers
 - refresh dreams list when packages are installed/uninstalled
 - added placeholder for help url

Bug:7010260
Change-Id: Ia443b4f76678eaf1a52b907d50aefb0d8f7e4748
2012-08-30 16:28:29 -04:00
John Spurlock
6df18e2713 New dream settings - first cut
First draft implementation of mocks for dream settings.

Want to merge for the weekly build, so a few things remain, namely:
  - flat style for preview/settings buttons + dividers
  - animation between dream row expanded/collapsed state
  - wire up the help url
  - possibly ditch the non-standard style
  - add logging
  - refresh when packages are installed/uninstalled

Bug:7010260
Change-Id: I96e3ab944170925bd76edf7b8b1127adfffc6262
2012-08-29 16:41:01 -04:00
John Spurlock
e5a84b2ea1 Settings: Minimal refactor to support new dreams api.
Fix breaking changes to the dreams api.  Master toggle
and multiple dreams support in Settings will be done in
a subsequent change.

Bug:7028665
Change-Id: Ia56dd00ec50323fbba06473b1747e5015a3f1898
2012-08-23 10:21:50 -04:00
John Spurlock
d541b6fd1c Re-enable dreams: Settings
Re-arrange settings and captions for dreams.  Activation on sleep
and activation on dock now independent. Sleep activation defaults to off,
dock activation defaults to on (replacing dock mode).

Also use dream manager service for testing dream preference, and properly
disable preferences if both dream activations are disabled.

Change-Id: I76f5ba115c7678826a09077dd393acc55c2bca26
Bug: 6921930
2012-08-02 16:49:23 -04: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
Daniel Sandler
c949ef6e64 Show screen saver toggle on tablets.
Bug: 5669263
Change-Id: I16ca00ff96b17cc367c4f6fa4260da5a08480ac0
2011-11-29 16:10:41 -05:00
Daniel Sandler
6f0ea441e4 Settings changes for Android Dreams (now Screen Candy).
- new preference design
- remove candy-specific timeout
- use new settings keys

Requires Change I31f31b3

Bug: 5591015
Change-Id: I45cb6ea5c68f9932c6d4e65e2b219331d48a62d6
2011-11-17 21:06:29 -08:00
Daniel Sandler
2943cfa606 Dream (screensaver) settings.
Depends on change Ied691856 for
Settings.Secure.DREAM_TIMEOUT and
Settings.Secure.DREAM_COMPONENT.

Change-Id: Ib6f74b74036e12637efb891b97e459a4e33444e7
2011-05-26 11:32:06 -04:00