Commit Graph

51 Commits

Author SHA1 Message Date
Julia Reynolds
c35d9b613e Link to dnd settings from notification settings
Test: make -j20 RunSettingsRoboTests
Change-Id: Idf70155134b2e78bd410468497cabe8faf1557ce
Fixes: 74319354
2018-03-16 13:14:03 -04:00
Fan Zhang
f7843adabd More renaming in DashboardFragment
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936

Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
2018-02-23 16:56:30 -08:00
Fan Zhang
aed8994f6f Rename Indexable::getAllPreferenceControllers.
To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).

Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
2018-02-23 16:37:28 -08:00
Beverly
036d7e0bd9 DND ixD changes
- Subtext in Settings > Sound updated
- new icons for automatic dnd rules
- no toast when toggling on/off dnd rules
- dnd dialog has a warning if dnd will cause user to miss next alarm

Test: make ROBOTEST_FILTER=ZenModePreferenceControllerTest RunSettingsRoboTests -j40
Fixes: 72494029
Fixes: 72655216
Fixes: 72655609
Change-Id: I9d86d82529079f35e362f93e10914f0a60229cd8
2018-02-06 14:15:40 +00:00
Fan Zhang
33d5a76c6f Remove "emergency alert" from Sound settings
It's already in "App & notification" page

Change-Id: I858999f8e097d5712eee1b8d34f47e0e900bf859
Fixes: 71813931
Test: rebuild/visual/atest UniquePreferenceTest
2018-01-16 14:04:18 -08:00
Ben Lin
921e3d14b8 Add ability to show/hide individual settings in Sounds page.
This adds the following 7 new boolean flags:
config_show_alarm_volume
config_show_charging_sounds
config_show_media_volume
config_show_notification_ringtone
config_show_notification_volume
config_show_screen_locking_sounds
config_show_touch_sounds

Which when set to false, will hide the respective preferences in Sounds
page.

Bug: 69813881
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.notification all pass.

Change-Id: I84a2ce66b07c00d658422ce1a0eacaf9a01fae8a
2018-01-10 13:58:58 -08:00
Fan Zhang
e0b0e9f902 Refactor help menu stuff into a controller
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.

Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
2017-11-29 15:51:04 -08:00
Doris Ling
8b14a1a7a6 Change to use the expand button in support lib.
- functionality for hiding portions of the preferences in the preference
screen is added to the support lib. So, changing the settings
implementation to use the feature from the support lib instead.
- remove ProgressiveDisclosureMixin and the related code

Fixes: 63985174
Test: make RunSettingsRoboTests
Change-Id: Ib1d39b2db93d78a56c7adf90abcae5226f9564c2
2017-10-27 13:16:38 -07:00
Beverly
4359d4b9c9 Moved zenMode visual effects + automatic rule page
- Automatic zen rules have their own page like in N
- Minor string changes to page and add rule dialog
- Zen mode visual effects was moved into behavior settings

Bug: 63077372
Test: $ make SettingsUnitTests -j40
$ adb install -r ${OUT}/data/app/SettingsUnitTests/SettingsUnitTests.apk
$ adb shell am instrument -w com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner

Change-Id: I9635f8f7969b76d036bc06ec44705815e540777a
2017-10-27 09:49:04 -04:00
Doris Ling
4930065f3a Update tile limit for Sound settings. am: 893bdba206
am: 15d06244d3

Change-Id: Ib307fc04adea4b7371f5234fa0c5c0813ff7b41e
2017-10-15 05:33:47 +00:00
Doris Ling
893bdba206 Update tile limit for Sound settings.
Pull the notification and alarm ringtone out of the preference category
and update the tile limit to 1, so that only the first preference
category will be displayed initially.

Change-Id: I9ae7669fb2b688560a3fc228274ea44f225b262f
Fixes: 67750626
Test: visual
2017-10-13 11:45:30 -07:00
Doris Ling
6f60cddc9e Add a new feature flag for the expand button in support lib.
- check the feature flag to determine whether to use the existing
progressive disclosure mixin or use the expand button in the support
library.
- add corresponding preference xml files that add the new preference
group attribute to use with the expand button in the support lib.

Bug: 63985174
Test: make RunSettingsRoboTests
Change-Id: Ida6eb6182a8066ad1413b7f6142512345fd914d0
2017-09-15 11:56:31 -07:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
Matthew Fritze
c838e959f7 Merge "Remove duplicates from sound settings" into oc-dev am: 3abeba07d3
am: a939959838

Change-Id: I0260cf2a7dd9d54b700387d0d82f58a7c6a3263c
2017-05-17 19:07:45 +00:00
Matthew Fritze
06976317cb Remove duplicates from sound settings
Duplicates include:
- Do not disturb preferences
- Block Visual Disturbances
- Emergency broadcasts

Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: I3de430b80fd11d7937d3bec908fbbaa6a176e785
2017-05-16 15:58:54 -07:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.

Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
     && make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
2017-05-12 11:10:46 -07:00
Fan Zhang
0335cd1e9b Fix crash when there is no emergencybroadcast app on device
Some devices do not have emergencybroadcast app installed, so we should
not show the preference item for it. Add the preference controller into
AppAndNotificationFragment properly hides it.

Change-Id: Ic39ba24da9bd8f3200a5e44232a5489e35c48c0a
Fix: 37945069
Test: make RunSettingsRoboTests
2017-05-05 17:42:25 -07:00
Fan Zhang
540023608d Skip "null" string when building advanced button summary
- Also added help string to SoundSettings as a side fix.

Change-Id: Ia81a46c6e199b72b52ae1fa9d996c094193b506c
Fix: 37933524
Test: robotests
2017-05-03 15:05:22 -07:00
Tony Mak
007dc1abe6 Show RingtonePickerActivity in work user instead
Test: make RunSettingsRoboTests
Test: Try to import custom ringtone in work profile, no crash observed
Test: Set the custom ringtone as default. Tested both work gmail and
      calendar can play that ringtone.
Test: Try to import the peresonal ringtone, it is still working.

Bug: 37197930
Change-Id: I2b662247d7e70b59bae08e082e9682d74d797484
2017-04-12 15:12:44 +01:00
Fan Zhang
dc9a82f5b0 Fix a crash when resuming sound setting with AfW on Ryu
Also renamed a few xmls

Change-Id: I8ff5a778a39ea45471a27048be4ea2f21075872a
Fix: 36357493
Test: make RunSettingsRoboTests
2017-03-16 11:26:33 -07:00
Fan Zhang
b00811da64 Let fragment and indexProvider share prefControllers
Bug: 35812240
Test: make RunSettingsRoboTests
Change-Id: Ifd96f935836a52e0a56f170f3cdf9b9ddf7c499a
2017-03-01 12:56:58 -08:00
Doris Ling
4731167500 Remove old code from SoundSettings not used in new IA.
- remove the old sound settings xml
- merge Sound Dashboard metadata into SiybdSettingsActivity instead
and remove Sound Dashboard.
- remove OtherSoundSettings

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: I25bb94b375cfe0277b3c961e4bee6fec9a14fb98
2017-02-28 14:02:54 -08:00
Doris Ling
a10ff3b109 Move Ringtones out of Advanced.
Increase the tile limit in Settings->Sound so that Ringtones is not
hidden inside the Advances options.

Fix: 35318739
Test: Visual

Change-Id: I08db7b79127226bb6ef8ce8f147e5a90f5939d79
2017-02-14 14:14:09 -08:00
Fan Zhang
7520e81ab5 Update top level menu items summary text.
- Use static summary for most items
- Move summary for user setting to user&account setting

Bug: 34975053
Test: RunSettingsRoboTests
Change-Id: I9bf87267778dc5933f97f5d3b9ae0f4f0b8da1a8
2017-02-09 15:22:47 -08:00
Fan Zhang
7e6df837ee Remove getCategoryKey() from DashboardFragment children.
Use the centralized registry to look up category key instead.

Bug: 32936784
Test: make RunSettingsRoboTests -j40
Change-Id: I0b8c72d70f93e4b5c58871ac90de41f69ad15653
2017-01-24 14:51:15 -08:00
Doris Ling
3ca367757b Add items in Other Sound directly into Sound settings.
- In new IA, Other Sound no longer is a separate preference screen, but
individual preferences are put directly under SoundSettings.

- Add controllers for each other sounds preference.

- Remove Cast settings from Soundsettings in new IA.

Change-Id: I75d771674ffabfecbd66079bc86844b2ff098b71
Fix: 33944294
Test: make RunSettingsRoboTests
2017-01-11 18:07:15 -08:00
Fan Zhang
b1ddde17d2 Only show first 5 items in sound setting until click More.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: Ib9449b70e2f2a003b3c6a810d0cc03016d025edb
2017-01-07 11:21:11 -08:00
jackqdyulei
d2c0eef222 Add suppressor text in SummaryProvider of Sound when it exists.
When suppressor exists for the sound effect, the sound summary
should show "muted by ...", not the "Ring volume at ..."

Bug: 31461022
Test: make -j40 RunSettingsRoboTests
Change-Id: I5d6895a7a330c993aac40bdca3bb1c79f8b7fbfe
2017-01-03 09:32:18 -08:00
Doris Ling
2adb6ea4ec Refactor Work sounds in SoundSettings.
- final round of refactoring SoundSettings to use preference
  controller.
- add work sound controller to control all the work profile sound
  settings.

Change-Id: Ifa9f9c1f717ca292576f077311fe284325e12651
Fixes: 32276590
Test: make RunSettingsRoboTests
2016-12-15 14:53:27 -08:00
Doris Ling
6c2cf0dbc5 Refactor SoundSettings to use more preference controller.
- second round of refactoring SoundSettings to use preference
  controller.
- add controller for Emergency broadcast, Vibrate when ring, Phone
  ringtone, Alarm ringtone, and Notification ringtone.

Bug: 32276590
Test: make RunSettingsRoboTests
Change-Id: Iaff48ecb27bf156a5c8995de20ce7a440b094cdb
2016-12-07 14:33:13 -08:00
Doris Ling
1b3ec04748 Update SoundSettings to extend DashboardFragment.
- initial round of refactoring SoundSettings to use DashboardFragment.
- add controller for Cast, Do not disturb, Alarm volume, Media volume,
  Ring volume and Notification volume.

Bug: 32276590
Test: make RunSettingsRoboTests
Change-Id: I5c02a344bff5117bfce93d7ccac650fccc82d2b0
2016-12-01 17:24:05 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
1e516287bd Add visibility metrics to dialogs.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Change-Id: I199d2e1b2cb8588a562b46bb8128d8ece24952f0
2016-09-19 17:34:12 -07:00
Salvador Martinez
923534f641 resolve merge conflicts of 8ec7028 to master
Change-Id: I02767dea7e2fd8e6dfdfe495af1c28587b080630
2016-09-07 10:24:03 -07:00
Salvador Martinez
b706d4e956 Fixed Sound Settings summary text
The summary for Sound settings was not
descriptive enough when the volume was set
to 0% so additional strings were added. Now
it will change let you know the status
of the ringer and vibration settings when
at 0% volume. Espresso tests added to test
that text is properly updated in each of
these states.

Test: make SettingsTests
Bug: 31099179
Change-Id: Id49e2d0c4b7ac0f17efcdaf31de48d5eb678ca46
2016-09-06 17:23:50 -07:00
TreeHugger Robot
1355d03287 Merge "[Settings App] Get ringtone titles from Ringtone" 2016-09-06 00:27:39 +00:00
Robin Lee
e51fc163c2 Cut work sound prefs when personal ones are gone
For example when:
 - voice calls aren't supported, we hide phone ringtone.
 - audio is single stream, we hide everything.

Bug: 30658854
Change-Id: I8b2ad2fa08b35fa93f10447ef718a767fa389417
2016-09-02 17:28:00 +01:00
Andre Lago
7b92e281a7 [Settings App] Get ringtone titles from Ringtone
Instead of using custom code to get ringtone titles, use the Ringtone
API which already returns 'None' if the Uri is null

Bug: 31084929
Change-Id: Ifff3eaa3591e90020a2ac108a5916e19fb71e0bd
2016-08-25 16:27:46 +00:00
André Lago
6ecc414e77 Merge "[Settings] Set different ringtones at work profile" 2016-08-19 17:02:03 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Andre Lago
3e398c87f2 [Settings] Set different ringtones at work profile
Updated the Settings app to allow setting different default system
ringtones for work profile apps

Bug: 30658854
Change-Id: I7461be070bd4e8d86bf1fd724039e53d500094ad
2016-08-15 11:11:56 +01:00
Muyuan Li
5a48c8493f Only shows music stream when using master stream.
Bug: 29446492
Change-Id: I52b686daa21499d0b054f762251c544c263fdec4
(cherry picked from commit ec88e104befb872c0bde99871eec73bf5d705369)
2016-06-28 20:51:32 +00:00
Julia Reynolds
c736efcb61 Fix ringtone persistance after device rotation.
Bug: 26122624
Change-Id: I187fe673dea250e93c6e9603239f01845ed378a3
2016-04-04 15:20:11 -04:00
Jason Monk
3e19fc5600 Move temporary metrics constants to proto
Change-Id: I8fb3ac22df7bdc52039dd640f7696ebd32281f0b
2016-03-08 14:18:30 -05:00
Andy Hung
f892e21696 Remove mono audio from SoundSettings
Mono audio will move to AccessibilitySettings only.
This reverts commit 0863ea40cd.

Bug: 15283594
Change-Id: I2cc744c96a9f6a6454b0bf533a44bb2eb56b745a
2016-02-26 14:17:29 -08:00
Sudheer Shanka
29737ad910 Part2 - Don't add padlock if the restriction is not set by admin.
Bug: 26687435
Change-Id: I85ef42e1ff1216791d1393a975e8559191b3781f
2016-02-19 19:24:34 +00:00
Sudheer Shanka
682a916836 Add padlocks to preferences that can be disabled by policy.
Change-Id: I43b6b5954ef6ec65b86d99321cabab9f49df842d
2016-01-20 17:48:27 +00:00
Julia Reynolds
193e7b044d Add default alarm ringtone to sound settings.
Bug: 25957833
Change-Id: I68d6747894665c97853eabac7edb0f751d1fdcc1
2016-01-20 11:10:49 -05:00
Andy Hung
0863ea40cd Add mono audio to SoundSettings
Bug: 15283594
Bug: 22700363
Change-Id: Ic4571dee4567a94265bbcf11d08108b19687b284
2016-01-06 16:01:19 -08:00
Julia Reynolds
3b7936fb43 Hide cell broadcast settings link if needed.
Bug: 25939664
Change-Id: Iccf7d17267aecadff0d18f9fb4f464f3597e4c3e
2015-12-02 11:11:30 -05:00