Commit Graph

14 Commits

Author SHA1 Message Date
Luis Vidal 50571ba8bb Apply active profile if user enables system profiles
Ensures the active profile is applied when user enables
system profiles. The profile will be automatically applied
upon activation if:

- No triggers are defined (i.e the profile does not respond
  to events)
- A ON_CONNECT WiFi/BT trigger is defined and the device is
  currently connected to such network/device

If system profiles are already enabled and a WiFi/BT event
is fired, apply the profile overrides

Change-Id: I362893151e52d35636d2ac05ab35e986d1f7237e
TICKET: CYNGNOS-3104
2016-06-30 16:39:58 -07:00
Adnan Begovic b51572d697 cmsdk: Create CMSystemServer to handle our platform init.
Change-Id: I7b62978e2a284a3a1ec1ffc1d8c72545d7b0c939
2016-05-31 17:28:48 -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 7bdcaa59f4 cmsdk: Fixup stub generation.
Change-Id: I1b033ff646dbbdafa5d0efcaf110b76ca48980e3
2015-12-22 11:10:24 -08:00
Roman Birg 2ba238bf7a ProfileManagerService: fix broadcasting crash
Ref: CYNGNOS-1478
Change-Id: If4952c4513063ea4b2cf2105514183731175ad72
Signed-off-by: Roman Birg <roman@cyngn.com>
2015-12-22 08:50:29 -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 052391135b cmsdk: Enforce cyanogenmod.permission.MODIFY_PROFILES for profiles.
Change-Id: Id14bfd9b214b4f53960c55d8abab2764f990b1b6
2015-09-01 15:40:58 -07:00
Steve Kondik 435e2f3b17 profiles: Don't bind the keyguard until ActivityManager is up
Change-Id: I2f349d00c197cf5c4a492fb0892b3edd71479ea4
2015-08-19 05:29:16 -07:00
Roman Birg 307941c0fd cmsdk: fix enabling/disabling keyguard
We cannot create a new WindowManagerPolicy every time since the method
isn't called from the main thread every time, which could lead to
exceptions being thrown when trying to create PhoneWindowManager.

Instead of creating a new policy, bind to the keyguard service on bind,
and then pass it to the profile to operate on.

Ref: NIGHTLIES-1640

Change-Id: I3ac58bfa534755eaa73890cc5ddf05987a7d0d8c
Signed-off-by: Roman Birg <roman@cyngn.com>
2015-08-13 10:49:17 -07:00
Adnan Begovic c9295fb9cc cmsdk: Clear calling identity when resetAll is called.
Change-Id: Id39eb18165d12a792c141dc44840a122d509dece
2015-07-14 13:42:41 -07:00
Jorge Ruesga 63524972a3 cmsdk: fix cannot create handler
Change-Id: I34153f6199d46b7fa9a914efa38552b8d66c0c99
JIRA: NIGHTLIES-1532
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-07-13 16:58:16 -07:00
Adnan Begovic 6e46829eb7 CMSDK: Introduce factored out resources from framework.
Change-Id: I4193db99f3f883260354cde98366f94c608f6163
2015-07-09 20:05:29 -07:00
Adnan Begovic cc979035e7 CMSDK: Make sure to initialize ProfileTriggerHelper.
OSS-JIRA: NIGHTLIES-1480

Change-Id: I48fbb350d96424b593858aca1b2343a79f298b0c
2015-07-01 01:04:29 -07:00
Adnan Begovic 4334b3d969 CMSDK: Introduce Profiles API from frameworks.
Refactor to create a system service in secondary
  CM framework.

Change-Id: Ic69da01d941bbd09271c260429d744f8e79ab7b9
2015-06-25 17:35:48 -07:00