Commit Graph

75 Commits

Author SHA1 Message Date
Fan Zhang
af32e726e6 Allow activity to delegate onActivityResult to fragments
Change-Id: Iac388f1726269239313d666f3123f28348e0c90a
Fixes: 111531567
Test: rototests
2018-07-17 10:59:02 -07:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
Fan Zhang
44931d1e96 Properly suppress zen mode entry from soundsetting page.
Change-Id: If2c033232b05753f3ba52bb986dd6c85cab6e452
Fixes: 72748524
Test: robotests
2018-06-05 15:10:45 -07:00
Fan Zhang
7d6539d09b Merge "Support Vibrate for calls in Settings Slices" 2018-05-16 17:22:29 +00:00
hughchen
acb6e89c52 Update DialogFragment UI when BT device is add/remove/rename
* For fix the "Automatic merge failed" in pi-dev, cherry pick the ag/3937781 in
  master. Change android.support.* to androidx.*
* Add AudioSwitchCallback() in AudioSwitchPreferenceController.
  This callback is used to notify SoudSettings to update the dialogFragment UI.
* Add UpdatableListPreferenceDialogFragment that updates the available
  options when dialog is shown
* Add test to verify the adapter count when
  onListPreferenceUpdated() is called.

Bug: 77783217
Test: make -j50 RunSettingsRoboTests
Change-Id: I8cac1b30ec50df026f4b7722dd1cd2f69e77a4cb
2018-05-16 22:13:24 +08:00
joeshih
5d772136e1 Support Vibrate for calls in Settings Slices
Use TogglePreferenceController instead of AbstractPreferenceController
for VibrateWhenRingPreferenceControllr

Bug:74915140
Test: make RunSettingsRoboTests
Change-Id: I501a1470da7dc1ff582c2a90b5235b25036caefc
2018-05-15 12:03:35 +08:00
Ryan Lin
18aa25ea47 Merge "Add call volume in sound settings" into pi-dev am: b46389a588
am: 71b333f162

Change-Id: If69203fa5c4158f609484e6c3bbc0ca5bd6e0f58
2018-05-11 15:44:53 -07:00
ryanywlin
156fd91fbd Add call volume in sound settings
* Add call volume slider
* move "Take call" controller from "Ring volume" to "Call volume"

Bug: 77254162
Test: make -j50 RunSettingsRoboTests

Change-Id: I3443021c1557f42293e9b7772fe9072e5a966cf8
2018-05-11 17:56:16 +08:00
android-build-team Robot
bf9c07cb59 Merge "Revert "Get rid of charging sounds toggle"" into pi-dev am: 8e55299f98
am: 72cedc72a4

Change-Id: Ib15d341f90072be2fbe3d6b5cb1bfd9c4fcbb938
2018-04-30 14:29:58 -07:00
android-build-team Robot
8e55299f98 Merge "Revert "Get rid of charging sounds toggle"" into pi-dev 2018-04-30 21:08:51 +00:00
Beverly Tai
6761acdd33 Revert "Get rid of charging sounds toggle"
Bug: 77912907
This reverts commit fbe721b1b3.

Reason for revert: negative dogfood feedback

Change-Id: I8485a379eafee0a4fcd599e9b1c47aee7dd3c6ad
2018-04-30 20:01:40 +00:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Beverly
b74e635270 Merge "Get rid of charging sounds toggle" into pi-dev am: adec029f70
am: cbc6bd837d

Change-Id: Icbbcc62572671aab98a97fb7f28cd4a72a6875ba
2018-04-17 13:59:34 -07:00
TreeHugger Robot
adec029f70 Merge "Get rid of charging sounds toggle" into pi-dev 2018-04-17 19:13:11 +00:00
Julia Reynolds
7d5f0bb018 Merge "Show suppression msg under ringer slider" into pi-dev am: 68f331d452
am: 1351e761c8

Change-Id: I71b7a1ce25f3754ef2041419f2ddde33d48fa7e7
2018-04-17 11:22:04 -07:00
Julia Reynolds
0ddba4c119 Show suppression msg under ringer slider
Instead of replacing the rigner slider, because the stream
isn't actually muted.

Change-Id: Id2c60d6c570084ed8febcaeb3b096a487f572312
Fixes: 77641315
Test: robotests
2018-04-17 10:46:47 -04:00
Beverly
fbe721b1b3 Get rid of charging sounds toggle
Users can no longer toggle on/off the charging sound.

Test: manual
Bug: 77912907
Change-Id: Ie050acab3972cb1fa6716c70afb6403db4d9c887
2018-04-16 12:35:59 -04:00
Julia Reynolds
61478b7049 Merge "Make volume sliders sliceable" into pi-dev am: 4ef7b5f97b
am: 3fa5b4fad4

Change-Id: Idcbc7acf0343ff74f198ea960b8e6ca3d2e16a20
2018-04-06 15:09:22 -07:00
Julia Reynolds
4ef7b5f97b Merge "Make volume sliders sliceable" into pi-dev 2018-04-06 20:48:31 +00:00
Julia Reynolds
560637970f Make volume sliders sliceable
Test: make -j RunSettingsRoboTests
Change-Id: I8495770792dfdada54174ca61937f336e4fc219c
Fixes: 67997207
2018-04-05 14:47:44 -04:00
Doris Ling
a658391502 Merge "Fix issue in ring volume sample not always being played." into pi-dev am: 1b899f2a0a
am: 284d10d112

Change-Id: I52f03ddd0686125263bc0c5e59bcc2355b7cca72
2018-04-05 11:16:42 -07:00
Doris Ling
de08eaf437 Fix issue in ring volume sample not always being played.
- when we adjust the sound volme in Sound settings, we only re-post the
stop sample message when we receive the onSampleStarting callback.
However, if we change the volume while a sample is still playing,
onSampleStarting will not be called as it's already started. This
results in shortened sample duration, which in extreme case, the new
sample will not be played at all if the new volume change is made almost
towards the end of the previous sample period. So, everytime user change
the volume, we should re-post the stop sample message, so that the
sample playing duration would be extended properly.

- also removed the original calls to the onStreamValueChanged() during
init, as the original implementation is empty, and during init, we do
not need any handling to start/stop the sample.

Change-Id: I9f35ddfb6d809eeb83b1a732a09362286ff6ed77
Fixes: 77514234
Test: make RunSettingsRoboTests
2018-04-04 17:35:41 -07:00
Tony Mantler
0fcd6cbaa8 Autogenerate SearchIndexableResources subclass
Bug: 77148954
Test: RunSettingsLibRoboTests RunSettingsRoboTests RunSettingsGoogleRoboTests RunArcSettingsRoboTests
Change-Id: I842c42c55014c3310070ef22bd4f0d9a70dfd804
2018-04-03 10:26:55 -07:00
Fan Zhang
b5c651c939 Register most app info related controllers in xml
Bug: 77216595
Test: robotests
Change-Id: I79afa38820b7518d8b3112148802797ebcf6d184
2018-03-29 17:55:41 -07:00
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