Commit Graph

76 Commits

Author SHA1 Message Date
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
7ed4fcaf8e cmsdk: Keep generated java classes from aidl interfaces.
Keep any classes extending IInterface so we can have
  the BinderTransactionTest run successfully.

Change-Id: Ic49794017e472499cbbf351dfa12732854ceea8d
TICKET: CYNGNOS-2189
2016-03-08 09:24:32 -08:00
Adnan Begovic
c0bd6d0882 cmsdk: Clean up proguard flags.
-dontskipnonpubliclibraryclasses and class members covers
  the processing of external libraries which makes the -injars
  option defunct.

  Also keep more android support related classes for when we expand
  the test package for more coverage.

TICKET: CYNGNOS-2189
Change-Id: I37b66acdac86400f41d1f7f1e6610d1d9ca480b3
2016-03-08 09:24:31 -08:00
Adnan Begovic
873364cfca cmsdk: Remove debugging from proguard.
TICKET: CYNGNOS-2189
Change-Id: Ia45f1e31bc23dcffc5a7f9923e268f9ad513df2a
2016-03-04 16:08:15 -08:00
Adnan Begovic
ba01275cb4 cmsdk: Strip unused cmsdk members for codecoverage.
Change-Id: Id5437b11168d0dfd222cfc4abef2fc03629a17ca
TICKET: CYNGNOS-2189
2016-03-04 15:24:26 -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
Khalid Zubair
25a71471ae Revert "cmsdk/tests: Temp hack to fix mka builds."
This reverts commit 969cda0807.

CYNGNOS-1677

Change-Id: Ic814b7af9e9d1aef725b310af9f3b0383701eec7
2016-01-26 10:59:09 -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
Adnan Begovic
31962b2226 cmsdk/tests: Fix zenmode tests.
TICKET: CYNGNOS-1667

Change-Id: Ic9b819d6680ea26039089013f552a199df81c0f7
2016-01-22 12:07:37 -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
Adnan Begovic
969cda0807 cmsdk/tests: Temp hack to fix mka builds.
Change-Id: I7d08765c6661f3c4bba6574c9bc89ba36af9632b
2016-01-15 11:21:53 -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
7107e06911 cmsdk: Update iconography.
Yes it bothers me that much.

Change-Id: Idabccbf584b23d6550c079cab2c1a1427ae6ab9b
2016-01-06 11:45:15 -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
Chris Sarbora
b9d7733a67 External views for cm13
Initial ExternalViewProvider

Change-Id: Ib35d79d3ae01d2e1a98020c5e65e4fbe50d2d322

Fill out methods and run everything on main thread

Change-Id: I05dd1bce5c24057101cd85656d28b01e6681434a

Fix aidl

Change-Id: Ie4b9a4463fdea37a0c5d657ffbc8796d51b57303

Add sample provider

Change-Id: I51b73302f85927aba2e9ea30ce47d6958af8e451

Create window and view earlier and only once

Change-Id: I60264b3c2de302f6f628320f436ac2aeb39de42c

visibility

Change-Id: I6ed2d6431c5aec9d4959a51828c42a700aabbd22

Add logging

Change-Id: I224587bcdfd1ff08673a618c5e45fef384041b8b

Add external view

Change-Id: Ic7f1ba96857239ac0fa43777f7d637716b7aead7

Resource fixes

Change-Id: I75324900d36a465575338c8b0ec9cc568ea50b9a

Add view host

Change-Id: Ief57371563feca707f420a509827c78c48bedf9c

Such hacks :\

Change-Id: I11ff460e7e7fed9cb14531ec3fb4699a37021ee0

Use a real window

Change-Id: Ie79f8188beaa871c6b8c96303c3221cdd7352fc6

Make api able to handle multiple instances of provided views

Change-Id: I185a8950aa577f920eaf7582c53f3316b88765c8

Ensure attribute set is passed to constructor

Change-Id: I9ebb4e8b0f7538ea5d0e7da179b1f1df812532b1

Add clip rect support

Change-Id: I23ac08b9e9e1e07e72bbf761ede1de87f4e4b084

Use final clipRect, instead of member

Change-Id: I2fa5f6ff30adf30fc0fe10f9fac1869ab4c03904
2015-12-18 16:13:51 -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
04569c79bf cmsdk: Update tests for new ALARM permissions.
Change-Id: I51e8b503af22b23584a8f8bd552825a9cf0786a4
2015-09-01 17:22:33 -07:00
Adnan Begovic
052391135b cmsdk: Enforce cyanogenmod.permission.MODIFY_PROFILES for profiles.
Change-Id: Id14bfd9b214b4f53960c55d8abab2764f990b1b6
2015-09-01 15:40:58 -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