Commit Graph

16 Commits

Author SHA1 Message Date
Behnam Heydarshahi
3ac6aaf796 Add notification volume controller in settings
Separate notification and ring controllers based on the ring/volume
stream alias boolean in config.xml.

For both ring and volume controller: Not show vibrate icon when vibration is not supported on device. Show
silent icon instead.

Known issue: Add the notification volume slider only in Settings, and
not in VolumePanelDialog. When the alias is set to false and the streams
separated, the ring volume slider in VolumePanelDialog keeps its title
of "Ring & notification volume" instead of changing to "Ring volume".

Bug: b/38477228

Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=NotificationVolumePreferenceControllerTest RunSettingsRoboTests -j40
      make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=RingVolumePreferenceControllerTest RunSettingsRoboTests -j40
      make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=SoundSettingsTest RunSettingsRoboTests

Change-Id: Id17523f49b291a5cf612b90f93c3b2ab6486c62f
2022-10-10 14:42:56 +00:00
Bonian Chen
9750adc741 [Settings] Ignore failed test case
Ignore failed test case.

Bug: 201021324
Test: build pass
Change-Id: Iba66fa293ad38b1e6aff45acff0605afeefded7b
2021-09-24 12:48:38 +08:00
Alexander Dorokhine
46e85a2fad Migrate away from deprecated Truth APIs.
This is a transitional step towards truth 1.0.1, where these APIs have
been completely removed.

Bug: 168765701
Test: m checkbuild
Change-Id: I76f9c37cb699ce6ab8715ffe35d11668ccbceea1
2020-09-24 23:09:41 +00:00
timhypeng
716777d3ad Replace preference with remote media preference group in xml
-remove previous preference controller and its test cases
-update sound setting test case

Bug: 147395289
Test: make -j42 RunSettingsRoboTests
Change-Id: I9e383e11370a13868fdbcb76eafef5aedad895c5
2020-02-12 04:57:18 +00:00
Tajinder Gadh
eb1aa063ed If the ramping ringer adaptive volume is enabled then do not show
this setting. It will be injected from settings intelligence with
additional user options

Test: Build locally and validated
Change-Id: I6f79eea460e86d643d92c04e8ea126b99b9bed8b
2019-01-31 03:48:46 +00:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -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
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
jeffreyhuang
3683073561 Move notification test package to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: I2038667aa9fc6cd0b0d7f0f06fcf8d49121818ff
2017-11-30 15:27:02 -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
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
Andrew Sapperstein
9f1e911759 Refactor test runner to use static list of resource paths
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.

Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
2017-06-09 09:21:26 -07: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