Commit Graph

63 Commits

Author SHA1 Message Date
Luis Vidal ab3916fd2a Add Weather API test coverage
Test coverage for:
- DayForecast.Builder
- ServiceRequestResult.Builder
- WeatherInfo.Builder
- WeatherLocation.Builder

Change-Id: I66e716fa7a768b095e4b72011eda359b06a55f2e
TICKET: CYNGNOS-2491
2016-04-20 10:27:10 -07:00
d34d ea7d71200d cmsdk: Add test coverage for parceling LiveLockScreenInfo
Change-Id: I75898014f211075bdec06a00289837e1df6f3a84
2016-04-01 15:12:50 -07:00
d34d 3757686b93 cmsdk: Add test coverage for LiveLockScreenInfo.Builder
Change-Id: If802d3fcb5b1941d641d08beabbec9882c8ea451
2016-04-01 15:12:09 -07:00
Adnan Begovic 3726f6bcb9 cmsdk: Add test coverage for parceling of ThemeChangeRequests.
Change-Id: Id0cb15133de1ab5c202417837b7b72e3d3937958
TICKET: CYNGNOS-2307
2016-03-31 17:58:35 -07:00
Adnan Begovic 3916ed759c cmsdk: Add test coverage for ThemeChangeRequestBuilder and object.
Change-Id: I24894d50c6e28939e5f5c3497e0279dbb45ca851
TICKET: CYNGNOS-2307
2016-03-31 17:58:30 -07:00
Adnan Begovic 22859efbfd cmsdk: Add preliminary ThemeManager test coverage.
TICKET: CYNGNOS-2307
Change-Id: Ie94ae3cd55678ecb2c631dc10d2335fb5d7362a7
2016-03-31 17:58:24 -07:00
Adnan Begovic eafcdbd229 cmsdk: Create Concierge parcel handler concept.
Simply, Concierge handles your parcels and makes sure they
  get marshalled and unmarshalled correctly when cross IPC
  boundaries even when there is a version mismatch between the client
  sdk level and the framework implementation.

 On incoming parcel (to be unmarshalled):
     ParcelInfo incomingParcelInfo = Concierge.receiveParcel(incomingParcel);
     int parcelableVersion = incomingParcelInfo.getParcelVersion();

     // Do unmarshalling steps here iterating over every plausible version

     // Complete the process
     incomingParcelInfo.complete();

 On outgoing parcel (to be marshalled):
     ParcelInfo outgoingParcelInfo = Concierge.prepareParcel(incomingParcel);

     // Do marshalling steps here iterating over every plausible version

     // Complete the process
     outgoingParcelInfo.complete();

Change-Id: I0096851e08ce25908e19e39e6bc4af344e85725e
2016-03-31 17:58:11 -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 279ce42664 cmsdk: Mandate performance 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: I50f5993ff9c5107fdeaa9a5aa95377235eb3ac02
TICKET: CYNGNOS-2294
2016-03-25 14:14:14 -07:00
Adnan Begovic 21a567428d cmsdk: Mandate profile 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.

TICKET: CYNGNOS-2288
Change-Id: Id0adcc1eaa4a0512faf25f11057c45dc2ac733e0
2016-03-24 16:50:56 -07:00
Adnan Begovic cdf85adde1 cmsdk: Mandate cm sb 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.

TICKET: CYNGNOS-2289
Change-Id: Ice0ae7c45aecbb34e0ea667128b040906c46d7e7
2016-03-24 16:50:40 -07:00
Adnan Begovic a335ba39c2 cmsdk: Mandate cmhw feature xml's for service implementation.
The features 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: I41f4ac60af076743909c6090fd50c3ad045bc9e1
2016-03-15 14:09:04 -07:00
Adnan Begovic b4eafda7de cmsdk: Add PerformanceManager tests, Change target permission.
Since PerformanceManager is strictly a CyanogenMod construct,
  it doesn't make sense to enforce the interfaces with an android
  specific permission (even though the implementation is delegated
  to power manager). To keep consistency with the other api's,
  modify the enforcing permission to a cm specific declaration.

  Also add test cases for the PerformanceManager public interfaces.

Change-Id: I430b69dbee73bf94bb60932d1942ab97e3ba193e
2016-03-08 09:24:34 -08:00
Adnan Begovic 9c902f898e cmsdk: Update binder transaction tests for new interfaces.
Change-Id: I79352dc36a4934f9821c5b487df0fb19a7ebc693
2016-02-22 14:39:15 -08:00
Adnan Begovic eb17396831 cmsdk: Add concept of parameterized BinderIdTransactionTest.
To avoid any future release having offset binder transaction
  call ids, create a means to validate binder transaction ids
  within a parameterized environment based off of prior releases.

  This requires utilizing the new android testing support library
  for junit4 support.

Change-Id: Iefe3c183de2bdfa127ea53dcf21c8223f0355c34
2016-02-05 13:52:31 -08: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
Matt Wagantall eb82dbf050 cmsdk: cmhw: Add UniqueDeviceId support
It's sometimes useful to know what physical device you're using.

CMHW SerialNumber and an "ro.serialno" property already exists, but
are not guaranteed to be unique. Different OEM may use overlapping
numbering schemes, and sometimes placeholder like "012345ABCDE" are
used.

Attempt to work around these shortcomings by defining a new
UniqueDeviceId class that provides a globally unique device ID that
is both deterministic for a given device and designed not to overlap
with IDs of any other devices.

Change-Id: I3f426972558394ba8e78261273ac8521aa603327
2016-02-02 16:37:59 -08:00
Khalid Zubair a3c05bf3ff Revert "cmsdk: Add example service test."
This reverts commit 33e300e32d.

CYNGNOS-1677

Change-Id: Ia4a9d192fde03152d308f7a93f3fe6525cb57c7d
2016-01-26 11:00:27 -08:00
Scott Mertz 62579b157a cmsdk: add invalid input checking for persistent storage APIs
Some of this exists in the PersistentStorage implementation, but it
was never formally documented in the APIs.  Inherit the cmhw implementation
error checking & move it into the service.

Add tests to validate the new restrictions & a test that was previously
failing.

Change-Id: I3ecda29fdd28bbc4e6d8ccce7511c4644065ea46
2016-01-22 16:24:33 -08:00
Scott Mertz 7fb0a06ada cmsdk: change persistent storage test cases to void return type
InstrumentationTestRunner only picks up methods with "public void test*"
in the method signature.

Change-Id: I382114c9bd12ef954f65a54f101438d1207b5d69
2016-01-22 10:57:24 -08:00
Adnan Begovic 80001bff72 cmsdk: Fix BuildTests. Bump parcelable version.
Change-Id: I3084acfa25ca6bd6f5a058995906a050e243a4c9
2016-01-19 13:43:16 -08:00
Roman Birg 8d4920022f CustomTiles: add a custom long press PendingIntent
Ref: CYNGNOS-1602
Change-Id: Id0cca88fabb091dcf0fbad2ae24416fa1c0af83e
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-01-18 10:31:08 -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
Adnan Begovic 33e300e32d cmsdk: Add example service test.
Change-Id: I52972bc4d32505ba7fd2f7278efdb9441c39b82a
2016-01-05 17:37:14 -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
Adnan Begovic 8a79ddbd0c cmsdk: Clean up some provider tests.
Change-Id: I1b09f17a194054bfd0d35da843d0af1405fa4e21
2015-12-21 12:25:15 -08:00
Roman Birg cb4a990216 Profiles: add isEnabled(); send state changes
Ref: CYNGNOS-1461
Change-Id: Idee9417a2f0b181c8d15cd763859c0a0e581dce6
Signed-off-by: Roman Birg <roman@cyngn.com>
2015-12-21 10:30:15 -08:00
Adnan Begovic 241e559538 cmsdk: Remove systemserverclasspath test.
The jars all have oat files now, so iterating them and seeing
  if they're "clean" is pointless since they're not part of the
  processes runtime libraries on zygote fork.

Change-Id: I8c0e0ce16a84c423e68f8c1749f3676c3bd2931f
2015-10-29 17:37:32 -07:00
Adnan Begovic 4e53461e71 cmsdk: API level 4 for M release.
Change-Id: Ieed8ebf256e91515b6921186487b83462910bca9
2015-10-07 11:32:41 -07:00
Adnan Begovic 38e8b11ea7 cmsdk: Create api level 3, cantaloupe.
Change-Id: I5cefacf1196261b071ce2c3561f18ebaf74de604
2015-09-29 11:40:29 -07:00
Yvonne Wong 05d0129478 Add way to migrate CM specific settings to CMSettingsProvider
issue-id: CYNGNOS-829

Change-Id: I08743ebf9ffd3846ae501ed41e396b1556dc41cf
2015-09-25 13:17:19 -07:00
Adnan Begovic 8fc6affd38 cmsdk: Add classpathtests.
Change-Id: I78f21934046a8a8917dc59f5423986a7077f4531
2015-09-25 01:08:16 -07:00
Steve Kondik 7cef6f6945 cmsdk: Add persistent properties API
* Add support for reading and writing values from/to persistent
   storage. Requires the MANAGE_PERSISTENT_STORAGE permission, which
   should not be available for general use by applications.

Change-Id: I8a793396d207f23fcda851c172372f2073778eec
2015-09-09 15:43:32 -07: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
Adnan Begovic 88bc9965e9 cmsdk: Fix toast in CMHardwareTest.
Change-Id: Ia565607b9b43ad57923c07830a3373c73060ea5d
2015-09-01 14:59:21 -07:00
Adnan Begovic c0c27a6f94 cmsdk: Add preliminary hardware manager tests.
Change-Id: Ic01898fc9c1ae4d9c3b52ade8737ec6ab8388670
2015-09-01 14:13:03 -07:00
Jorge Ruesga 95dadd837c cmsdk: allow custom tiles to set the new qstile's sensitive data flag
Requires: topic:hide-qs-tiles

Change-Id: I71c85a00ae5797f1e142073b4d6a3a4c3274007b
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-08-31 16:41:09 -07:00
Yvonne Wong 0eb2999091 Add CMSettingsProvider and CMDatabaseHelper
issue-id: CYNGNOS-828

Change-Id: I01c08c0e432d6a941950a565e5ab6664664e2a7f
2015-08-31 13:52:27 -07:00
Adnan Begovic 4c28bc5463 cmsdk: Provide quick manual functional telephony api tests.
Change-Id: Idda7db6a4961d45f038176e478418123d8758073
2015-08-06 20:36:32 -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 9e6ec9e8ba Add AlarmClock support for CM DeskClock manipulation.
- In order to externalize the AlarmClock provider within DeskClock, move
    the database contract, ClockContract, into the SDK so that interested parties can
    reference it.
  - Add CyanogenModAlarmClock to add new utilities for turning existing
    alarms on/off and creating new alarms.

Change-Id: I1f11ccc3988bdef10d721e2038b2c7d69a4ae598
2015-08-06 14:52:57 -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
Adnan Begovic fa82ebb308 cmsdk: Support deleteIntent and remove tiles when packages change.
Change-Id: I488410296c7579870406ea8fe289cf0b2158ea80
2015-07-31 16:27:15 -07:00
Roman Birg e84d6568ab Profiles: add LockModeSettings
Splits out the lockmode into its own LockSettings, primarly so it has its
own processOverride() - so it will respect the LockMode.DEFAULT setting.

Ref: CYNGNOS-620
Change-Id: I6183492facebed37133e84d45a6bb2f91f76d5ea
Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Adnan Begovic <adnan@cyngn.com>
2015-07-31 14:09:33 -07:00
Adnan Begovic bd5230afe0 cmsdk: Add support for remote views in expanded styles
Change-Id: Ifa4e7f09df60c65fe476c5b9d332da0cb460e098
2015-07-31 13:06:26 -07:00
Adnan Begovic 25daf555d2 cmsdk: Add functional manual and unit tests for new setIcon
Change-Id: Ia0f83c76429f80a7b7a4216e0cdf7d71844b9b64
2015-07-31 13:05:32 -07:00
Adnan Begovic e29548da25 cmsdk: Update tests for recent builder changes.
Change-Id: Icb949ff79044c60a4f70ba0ca2432b463c541e78
2015-07-28 11:31:01 -07:00
Adnan Begovic d2bc093117 cmsdk: Update manual functional tests for shouldCollapsePanel.
Change-Id: I45028879e3cc259549b4ed43b9af15e062b07697
2015-07-27 13:16:38 -07:00
Adnan Begovic 5aa4db2e90 cmsdk: Add unit tests for shouldCollapsePanel
Change-Id: If9997c1be005f962dc628888f1090cb973588bb4
2015-07-27 13:16:38 -07:00
Adnan Begovic dbed0bfc68 cmsdk: Add tests for StatusBarPanelCustomTile parceling.
Change-Id: I10058517992cff27de86914c30e41a4b58958723
2015-07-20 22:07:15 -07:00