Commit Graph

10 Commits

Author SHA1 Message Date
Michael W c50ddc2104 CMSDK: Tests: AIRPLANE_MODE_ON has moved
* Lives in "Global" now

Change-Id: Ib0a53e07af5f6ef2de735a818a5f505906f9d4d4
(cherry picked from commit a7e8c17e827abbed8c8bf9299f4c1440c8ae7d04)
2017-03-05 15:40:06 +00:00
Adnan Begovic 3251a4506f cmsdk: Increase flaky test tolerance on zenmode tests.
Change-Id: Iff5522913a518b403bf580152d4890ed1e4d275e
TICKET: CYNGNOS-3014
2016-06-16 14:07:26 -07:00
Adnan Begovic 0b76a46515 cmsdk: Provide test coverage for remainder PartnerInterface's.
TICKET: CYNGNOS-3051

Change-Id: I1c15516dc03d3c0897cdd35f22281b25eedb84de
2016-06-16 13:54:13 -07:00
Adnan Begovic b271dcf279 cmsdk: Mandate partner feature xml's for service implementation.
The feature xml plays two roles:

      1) To allow sdk interface (constructor) to throw when system
      service is unavailable. This allows for clearer platform
      development debugging.

      2) To allow for simpler disambiguation of what services to
      instrument in a modular environment.

Change-Id: Ic980225df9c115e97f7147cf043cf92bbb225f01
TICKET: CYNGNOS-2293
2016-03-25 14:16:35 -07:00
Adnan Begovic a6ce9b8325 cmsdk: Annotate a few zenmode tests as flaky.
This allows them to rerun without consequence to
  the entire suite on first failure case.

Change-Id: Ia16b3dc433a7b9c83d36f8039b53052fda91c4b7
2016-02-03 16:49:18 -08:00
Janet Sun 3dffa871e4 cmsdk: Add unit test for PartnerInterface
Created the AndroidTestCase unit test
Added functional testing for airplane mode, which can be restored
without contaminating other tests.
Also added setZenMode testing, which currently contaminates other
tests. But we will allow for lack of a better way

FOR-156

Change-Id: I2ab5642c60f41266d9de8aab897e4852e872ad38
2016-01-06 17:49:18 -08:00
Janet Sun 57dc3b3240 CMSDK: add duration for priority/quiet mode
Add setZenModeWithDuration API call with long durationMills
Use NotificationManager.setZenMode with Condition URI
specifying end time.
Update settings/CMPartnerInterfaceTest
TODO: unit test to be added in:
tests/src/org/cyanogenmod/tests/settings/unit.

FOR-156

Change-Id: I18dd661fc07419a7019b6372e81df430a70f86e9
2015-12-23 11:05:45 -08:00
Matt Garnes eabd575721 Add Broadcast action and query API for AudioSource.HOTWORD.
- Add ACTION_HOTWORD_INPUT_CHANGED broadcast action and related extras.
- Add getCurrentHotwordPackageName() API to SettingsManager to query the
  current package name of the application that controls the HOTWORD
  input.
- Rename SettingsManager to PartnerInterface.

Change-Id: I5987499cd32908c47a7e8e95d644c483dc32914c
2015-09-08 17:28:20 -07:00
Matt Garnes 51c39ba2d7 Add API to SettingsManager to set zen mode.
- Add a new permission cyanogenmod.permission.MODIFY_SOUND_SETTINGS.
- Only allowed when the caller holds
  cyanogenmod.permission.MODIFY_SOUND_SETTINGS.
- Allows the user to set zen mode to the off, priority interruptions
  only, or no interruptions modes.
- For each mode change, the end condition will be set to null so that
  the mode remains active indefinitely.

Change-Id: Id465509a8cc8d98953bf8cbe06cacff02b9f75a0
2015-08-06 16:18:50 -07:00
Matt Garnes 0cdb1d513c Add SettingsManager.
Add new APIs for changing a subset of system settings.

Protected by cyanogenmod.permission.MODIFY_NETWORK_SETTINGS:
    - Add ability to toggle airplane mode on/off.
    - Add ability to toggle mobile data on/off.

Protected by android.permission.REBOOT:
    - Add ability to shutdown or reboot the device.

Change-Id: I5e943be11260c58afa664f1702c0ecb4413528fe
2015-08-06 11:35:00 -07:00