Commit Graph

255 Commits

Author SHA1 Message Date
Steve Kondik 7bf7c4b72e cmsdk: Allow services to conditionally start before decryption
* Essentially everything in CMSDK should remain silent when we
   are being prompted to enter a passcode for decrypting the
   device. Unfortunately, simply shutting off CMSDK entirely
   will cause crashes everywhere. We need to be somewhat
   selective about it.
 * Motivation for this was LiveDisplay kicking into night mode before
   decrypted due to location services failing.

Change-Id: I4d745debb2894776258343e8696ce5144f094404
2016-08-01 12:19:11 -07:00
inky@build01 fa227b12ed Automatic translation import
Change-Id: I00c456aff360d6e644953fb3eae8b16cc12147ad
Ticket: -
2016-07-31 19:00:52 -07:00
blinky@build01 92fdd2beb0 Automatic translation import
Change-Id: Ic16cd0e674aa927413f735ee10f07b231d8b641f
Ticket: -
2016-07-29 13:04:50 -07:00
inky@build01 544d324c82 Automatic translation import
Change-Id: Icb1bbff6a51a59f4309a40ecc7e06b4fce1b4ccf
Ticket: -
2016-07-28 12:34:47 -07:00
clyde@build01 8a3e6d3a8f Automatic translation import
Change-Id: Ibcf3f9e87a5b335ac709f7061f88144e6c16aba0
Ticket: -
2016-07-27 12:19:28 -07:00
inky@build01 7001c63425 Automatic translation import
Change-Id: Ib2786d6696fcc2ced57b50b65f9c746db342d8f5
Ticket: -
2016-07-26 11:28:05 -07:00
blinky@build01 f42db22083 Automatic translation import
Change-Id: I179df3f0aaad384a8c3ef780f7bdd26aa61a20f3
Ticket: -
2016-07-25 11:49:13 -07:00
Bharadwaj Narasimha 16f02268e8 ThemeService:Component id is being changed for multiple entries in mixnmatch.
When a theme with more that one wallpaper is installed(Hexo), when
we set the wallpaper in other themes to the second and third wallpapers
of Hexo while using mixnmatch, some other components like icons,ringtones
overlays would also change its Component_id to the corresponding Component_id
of the wallpaper changed.

Change-Id: I16a0b9a69a329308927cecbe2385f51184c8f0ee
TICKET: CYNGNOS-3220
2016-07-25 10:44:44 -07:00
Roman Birg 705716fc60 cmsdk: Broker out CMAudioService
Change-Id: Ia1205ad67d524ebf379085a6287993b8b82bc76f
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-07-25 08:44:46 -07:00
Steve Kondik 86cae92291 livedisplay: Add support for direct color balance control
* We currently use the DisplayColorCalibration API for setting display
   temperature which makes a lot of guesses about what temperature
   the display really is. Some devices will support the new ColorBalance
   API (via QDCM or other mechanism), which offers a calibrated
   alternative. Add support for this, which will supercede DCC if
   available.
 * Additionally, define the available color temperature range as a
   set of overlayable values so this can be specified per-device.
   This range will be mapped to balance values using the power curve
   calculations in the new MathUtils class.

Change-Id: I99608c09807b747d962680293c7b0cee8d669003
2016-07-20 10:07:31 -07:00
Adrian DC 25d7081418 cmsdk: Correct the useSegmentedBatteryLed details
* The power level is passed down as the alpha channel now,
    in order to preserve consistency and still pass down
    the color of the battery lights given to the liblights

Change-Id: Ia44cf1f73f09da6c96ac3b98e9387f1e3ec42249
2016-07-18 12:35:23 -07:00
inky@build01 c85073ff6c Automatic translation import
Change-Id: I5bcb7e0777a697f18d9d58440c6db7269cef4ed1
Ticket: -
2016-07-15 14:05:30 -07:00
pinky@build01 1a2589b3d4 Automatic translation import
Change-Id: Ibd2684df79c127cdebe35e3a0435d02f77e23eec
Ticket: -
2016-07-06 12:00:16 -07:00
Adnan Begovic b62a4550c3 cmsdk: Create brokerablecmsystemservice concept.
Extending the BrokerableCMSystemService allows a core
  system service to declare a delegate provider interface
  that can exist in another package, either in the same
  or an external process.

Change-Id: Idf8d170b1504528b0d3aafb23895951e26459c98
2016-07-01 10:41:53 -07:00
Adnan Begovic 551b377da9 cmsdk: Factor CMSystemServiceHelper to common.
Change-Id: I3984d64210b9a1be71d075a8eb8b8a2cfebde183
2016-07-01 10:40:46 -07:00
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
inky@build01 052af0a76d Automatic translation import
Change-Id: If564dc92bc80d6ddfeaec7606678d544591cc11d
2016-06-29 10:50:57 -07:00
d34d afcfb67696 Themes: Fix applying default theme
ThemeUtils has method for getting the default theme package name
which will return ThemeConfig.SYSTEM_DEFAULT if no default theme
package is defined in CMSettings.  Use this method rather than read
the setting directly.

Change-Id: I924f8ee116d97a8f3fcf4703214376608b31f297
2016-06-20 10:33:13 -07:00
inky@build01 ee2dc2db08 Automatic translation import
Change-Id: I1808f0cf7530364bdebdef8d530d49dbe7e4c8ad
2016-06-17 14:02:18 -07:00
Luis Vidal aa1f592e9f Ensures ProfileTrustAgent properly grants/revokes trust [2/2]
Notifies the ProfileTrustAgent when a WiFi/BT event was triggered even
if no new profile was selected so the trust agent can grant/revoke trust

Filters out the multiple network state change notifications to make sure
we notify the trust agent only when the event that the profile
is tracking actually happened

Change-Id: I047861a8b145762fff24568e341373a89ee01de9
TICKET: CYNGNOS-2719
2016-06-08 17:04:59 -07:00
Diogo Ferreira 19de84cd1b cmsdk: LiveDisplay: Enforce dump permission
Fixes android.security.cts.ServicePermissionsTest#testDumpProtected.

Change-Id: I5641b42c56d9783b1edb8fb397d51040cadb1467
2016-06-07 10:55:45 -07:00
inky@build01 c45e01b8ea Automatic translation import
Change-Id: I39e197f19ff2888207f0eae14e72b39a21241eca
2016-06-06 17:44:43 -07:00
clyde@build01 174f042ec7 Automatic translation import
Change-Id: I7cacb61ffe8817360907f7138555f466b9f2f060
2016-06-03 15:14:56 -07:00
d34d ee069f8c81 Themes: Use default audibles when pkgName is empty
Fixes an issue where audibles would be "unknown" causing them to
not play when phone rings, notifications arive or an alarm goes off

Change-Id: If279ed7e88784c025999822da7ee3a1a51d63bbd
TICKET: CYNGNOS-2728
2016-06-02 10:01:21 -07:00
inky@build01 af55f98056 Automatic translation import
Change-Id: I4c501ae6f8cf5bcdb2957ed920d081b3b8627e3d
2016-06-01 12:02:56 -07:00
Adnan Begovic b51572d697 cmsdk: Create CMSystemServer to handle our platform init.
Change-Id: I7b62978e2a284a3a1ec1ffc1d8c72545d7b0c939
2016-05-31 17:28:48 -07:00
Jessica Wagantall 970f0b6e95 Automatic translation import
Change-Id: I93bbea04f8764c0430597f295fef6972f632be1e
Ticket: RM-214
2016-05-26 18:58:18 -07:00
Jessica Wagantall 5e56748899 Automatic translation import
Change-Id: I46e5d915a803f1ef6813bdbdabe737863025e7ba
Ticket: RM-214
2016-05-20 17:23:32 -07:00
Abhisek Devkota 8f50ecda5d Automatic translation import
Change-Id: I806c87e9f036c65c25ec56c452fac23507cf643f
2016-05-17 22:12:50 +02:00
Abhisek Devkota 5cb275d8c1 Automatic translation import
Change-Id: I5728ee43d68ae83f6480664f19f8bafb7d3fcc10
2016-05-15 02:47:41 +02:00
Abhisek Devkota 638da93883 Automatic translation import
Change-Id: Ic62129d6a01476de1cee98a54e5d39e136f80701
2016-05-14 11:18:20 +02:00
Scott Mertz 6113701337 PerformanceManagerService: drop requests if system is not yet ready
There is a race condition between when onBootPhase(PHASE_SYSTEM_SERVICES_READY)
is handled and when clients request profiles, cpu boost, or launch boost.
Drop these requests in this condition.

OPO-702
Change-Id: I0860f824473767a4a4776e9febc7fb786b81f457
2016-05-12 15:29:27 -07:00
d34d 8c8601b9f3 LLS: Fix NPE when backing service dies
The mService member variable should not be used directly as this can
cause an NPE if the backing service has died.  Instead, use the
getServiceGuarded() method which will take care of re-establishing
a connection to the backing service.

Change-Id: I290e69c07a2e56644de7a394543d1e36fac1cbcc
TICKET: CYNGNOS-2779
2016-05-11 11:18:41 -07:00
Abhisek Devkota 5340c0e45b Automatic translation import
Change-Id: I08828c53b07a47fb169871c14b4d91641f88e3eb
Ticket: RM-232
2016-05-10 16:20:55 -07:00
Michael Bestas 69c9ab0f86 Automatic translation import
Change-Id: I415a05f9260dee22c61c2bd8cad035a424990fb6
2016-05-10 18:43:11 +03:00
Steve Kondik b77b8b5a70 cmsdk: Pass the process name and pid for launch boosts
* We need this for vendor perf tools.
 * This also adds a NativeHelper class which loads the JNI
   library on-demand, since we don't have an entry point.

Change-Id: If76ad8f952e86366978ae9cf9d1f107febccc28b
2016-05-06 22:25:21 -07:00
d34d e4886a668f QS: Make themes a first class citizen again
Change-Id: Icd397a2ddd730ae525233b66288fde9a6798c221
TICKET: CYNGNOS-2670
2016-05-05 14:00:21 -07:00
Pat Erley 9ff5ea9cea cmsdk: Fix CTS Failure due to testDumpProtected
Only dump CMAudio Service State for processes with dump permissions.

OPO-679
Change-Id: I28a501851a76e6d82f5726c13ac1fac74f47a8f1
2016-05-05 12:14:58 -07:00
d34d 8770189b8d cmsdk: Add allowViaWhitelist to LLS_MANAGER_ACCESS_PRIVATE
Change-Id: Idee5bd602047c01f8e13cd7d5ddbe6fb151215a2
TICKET: CYNGNOS-2378
2016-05-04 17:42:28 -07:00
Steve Kondik 462be9bc62 cmsdk: Add support for segmented LEDs
* For devices with segmented LEDs which can function as a range bar.

Change-Id: I346576b705635b60f9fd8716937e86b23bc7aa30
2016-05-03 18:54:07 -07:00
Steve Kondik a4ab6bd2c1 cmsdk: Fix warning from 64-bit clang
Change-Id: I2e45d0b1a8a552331d2691d6bc6d72a3b48a8467
2016-04-30 20:16:44 -07:00
Michael Bestas 76ff069e49 Automatic translation import
Change-Id: I9bc4a483af682783e5f0ee215daf8b7334fe5431
2016-04-29 00:47:58 +03:00
Steve Kondik bf3c0cf948 cmsdk: Add CMAudioManager
* This is a rework of the session callback API which previously
   lived in the framework due to JNI usage. This has been split out
   and cleaned up for CMSDK.
 * The JNI library lives on the server side, and the app-level
   callback has been changed to a protected broadcast. This allows
   us to wake up registered services when these events occur.
 * Additionally, we support listing all active audio sessions.
 * Also brings some JNI love/hate over to CMSDK.

Change-Id: I31c293943474419e3db088bb7ffab75f7440ac0f
2016-04-27 22:13:36 -07:00
Steve Kondik 153bd2287c livedisplay: Fix another transition issue
* If the screen is off during the entire transition period,
   when we turn the display back on it is not updated with
   the correct color temperature.
 * The code here is trying to be Mr. Smarty Pants and avoid
   extra updates, but it's totally pointless and also broken.
   There's no ill effects from writing to the hardware when
   the screen comes on, and updateColorTemperature already
   has all the other conditionals we need.
 * Just call updateColorTemperature every time, regardless.
   The LiveDisplayService ensures the callbacks run on the
   handler thread and all this crap can be removed.

Change-Id: Ib9560e13870a5c6bbe9c5a26fad40f5ec1cefa83
2016-04-26 22:36:52 -07:00
Steve Kondik 35315d3c0f cmsdk: Fix crash when getting LiveDisplay config
* If capabilities is empty, BitSet.toLongArray returns an empty array.

Change-Id: I17476438995b581050feda346d0348228519ff44
2016-04-26 01:17:30 -07:00
Ethan Chen c68b38ac3a livedisplay: Connect display modes to CMHW
REF: CRACKLING-1069
Change-Id: I5be5cabf316d9bd02ab4ffc169d458ab8d1b46d4
2016-04-25 17:44:53 -07:00
Steve Kondik e41c2924cb livedisplay: Fix three bugs
* Fix issue with color adjustments not being applied at bootup.
 * Fix issue where hardware was always updated twice.
 * Check the display state inside the color animator- this was
   occasionally racing and triggering kernel bugs on some devices.

Change-Id: Ieb9845e6b0f1c7ca979cbfa35c0b9b688ef1a8cf
2016-04-24 01:43:55 -07:00
Steve Kondik 7a4fed9640 livedisplay: Always check for transition
* If the device is started in the middle of a transition period,
   the transition would not occur. Always check for this condition
   instead of only firing it when TwilightService updates.

Change-Id: Ibe6cfa69506ffc6a9bf6390ee7e13863f275ec2a
2016-04-21 20:45:32 -07:00
Steve Kondik b00c945e35 livedisplay: Bugfixes and cleanups
* Simplify the code and callback mechanisms
 * Fix bug where settings weren't applied at startup
 * Make stuff immutable where possible
 * Corrected the sunrise calculation to start on time
 * Fix issue where tile state could become out of sync
 * Don't spam the hardware on screen on/off
 * Stop trying to cache values in so many places, they get out of sync
   too easily.
 * Move the animator to the general display adjustments
 * Clean up outdoor mode state on screen toggle

Change-Id: Ic14425e5294d78698b9280dfb1237b222bb706cc
2016-04-21 00:26:40 -07:00
Adnan Begovic 18aa2f52eb cmsdk: Fix definition of live display tile, as its now dynamic.
Change-Id: I468e42b91996aad348fa0a1c85e0bc66597cf440
2016-04-18 12:27:47 -07:00
Michael Bestas 380d31c00c Automatic translation import
Change-Id: Ic3958966b87da56246142a98957d9cfe820b4066
2016-04-16 17:52:35 +03:00
Danesh M b62448a59b Revert "CmSdk : Add deprecated THIRD_PARTY_KEYGUARD permission"
This reverts commit 0918427452.

Change-Id: I5c81b9b38360c8f87b072416352f32079ad6deb4
2016-04-15 15:13:35 -07:00
Danesh M 0918427452 CmSdk : Add deprecated THIRD_PARTY_KEYGUARD permission
We need this for older apps to still function.

Change-Id: I8c0f37bab9ad82d2915884eb9c4f6ccdd9ba3c1a
2016-04-15 13:20:48 -07:00
Danny Baumann 842344a358 livedisplay: Fix endless loop for devices that don't support outdoor
mode.

There was a logic mistake that caused _all_ modes to be skipped if
outdoor mode isn't supported. In order to avoid such mistakes in the
future, also simplify the logic and make it more easily understandable.

Change-Id: I5fe8edbb3c4d2dd05fc4b4a7f94ca05d4ecd408b
2016-04-15 12:48:07 +02:00
Steve Kondik 7cd7f79c75 livedisplay: Fix bad state after bootup
* Make sure all modules are updated, and clean up a little code.

Change-Id: Id02ddb1558deea4451783fbe27f495d63f63c910
2016-04-15 03:15:28 -07:00
Steve Kondik 0ec60c69a0 livedisplay: Don't explode if no modes are available
* Don't create the mode observer or try to publish tiles if none
   of the adaptive modes are supported.

Change-Id: Iee6fe8131b0614e10f35b5a03d65fb44c71c0da9
2016-04-15 02:38:42 -07:00
Steve Kondik 712426f249 livedisplay: Publish our own damn tile!
Change-Id: If765cb1fe1cbc34c857dc6237cd25a1fb27f848e
2016-04-14 20:35:15 -07:00
Michael Bestas 14190e4f00 Fix LiveDisplay string
Change-Id: Ic7e03a1284bc51ef91ad9e7d8d2572aec405ee14
2016-04-14 15:10:48 -07:00
Luis Vidal fe1812fd38 Weather API: Delegate the responsability of rejecting back to back requests [1/2]
The Weather Manager Service should not impose rules regarding how
a weather provide service wants to react to back to back weather
update requests, nor impose the time a caller should wait before
a new request can be submitted. These constraints vary between
weather services, so it's up the each implementation to enforce
these constraints.

With this patch, the Weather manager service will pass the requests
as they come from the requester and it will be up to the active service
provider decide whether process or reject the request.

Changes to API:
- Moved the request statuses to new inner class RequestStatus in
 CMWeatherManager
- Pass status arg to onLookupCityRequestCompleted()
- Added reject(int) method to ServiceRequest

Change-Id: I3512490688255e25395e955d506fe42ed52f8fe0
TICKET: CYNGNOS-2430
2016-04-13 15:22:40 -07:00
d34d 10da08aa5e cmsdk: correct naming of THIRD_PARTY_KEYGUARD perm
Change-Id: If2d062a90db340f8415d12897b16667fc834a848
TICKET: CYNGNOS-1705
2016-04-13 12:21:24 -07:00
Luis Vidal ad0d8c53a0 Weather API: Return ID rather than RequestInfo [1/2]
Instead of exposing the RequestInfo object created by the WeatherMgr
return an ID to identify the request. This ID can be later used to
cancel the request if needed. The WeatherProviderService base class
keeps track of the ongoing requests and can map this ID to the
corresponding request

This patch also include the following minor changes:
- Use List instead of ArrayList in API
- Update javadoc to public methods to reflect API changes
- Use UUID random generator in immutable classes to generate the
  hashcode rather than relying solely in the hashcode of the builder
  object.

Change-Id: Ib88dd0ecddd6fdb016b77ac29709fbae092dea29
TICKET: CYNGNOS-2425
TICKET: CYNGNOS-2423
2016-04-13 11:57:38 -07:00
Steve Kondik 1dab5a0ca9 cmsdk: Refactoring LiveDisplay
* Moving LiveDisplay to CMSDK!
 * Completely redesigned the feature for future expansion.
 * No new features in this patch, but a proper API is being
   designed.

Change-Id: Ic8f55678f9141bf3386b2a1cf2fd1e8b3916c278
2016-04-13 01:37:08 -07:00
d34d 8a35e126a7 Themes: Clear out bootanimation if pkgName empty
An empty string for the package name implies the given component
should be cleared out, so make sure updateBootAnim respects that.

Change-Id: I07c7fc64970546c2d73a610d9c0b71f1e757657d
TICKET: CRACKLING-1043
2016-04-12 13:27:58 -07:00
Luis Vidal 34bf4866db Fix nomenclature for RequestInfo types [1/2]
- Renamed TYPE_GEO_LOCATION_REQ to TYPE_WEATHER_BY_GEO_LOCATION_REQ
  and TYPE_WEATHER_LOCATION_REQ to TYPE_WEATHER_BY_WEATHER_LCATION_REQ
- Prevent null argument on setter methods. Documentation updated to
  warn user of IllegalArgumentException if null is passed

Change-Id: I6ba8fb7fb3a10d8c964414b58e00d9ce77a74e84
TICKET: CYNGNOS-2377
2016-04-08 13:19:48 -07:00
Luis Vidal baaf4a1baf Refactor WeatherInfo class
- Builder constructor takes now 3 args: city name, temp and temp
  unit. This is the minimun data that a weather service should
  provide when a weather update request is processed.
- Float members have been changed to double. Setter/getter methods
  updated.
- New setter/getter methods have been added to set current day high
  and low temp. Forecast list should be used only to provide weather
  forecast for upcoming days (this has been clearly documented).
  WeatherContract was updated to include these 2 new columns
- Added javadoc to all public methods
- Timestamp is not longer required in constructor. A new method
  setTimestamp has been added

Change-Id: Ia1edcfef0e2268f3881fed076c6ad74a81ca7334
TICKET: CYNGNOS-2365
TICKET: CYNGNOS-2382
TICKET: CYNGNOS-2356
TICKET: CYNGNOS-2360
2016-04-08 11:17:22 -07:00
Michael W 81268bd12c LLS: Fix (possible) NPE
getBroadcastItem is only valid if beginBroadcast is called
RemoteCallbackList.java:
"Retrieve an item in the active broadcast that was previously started
     * with {@link #beginBroadcast}"

Fix logic to do so

TICKET: CYNGNOS-2397
Change-Id: Iec787a088ae3999e5024776ad50143249c434084
2016-04-08 10:36:34 -07:00
Luis Vidal 343245f4e6 Add API to cancel an active weather request
Add new API cancelRequest to CMWeatherManager. This will allow
clients to cancel a request that was previuosly submitted to
the weather service.

As part of this change, requestWeatherUpdate(weatherLocation),
requestWeatherUpdate(Location) and lookupCity(cityName) will
now return the RequestInfo object created if the request
was successfully submitted to the weather manager service

TICKET: CYNGNOS-2383
TICKET: CYNGNOS-2385

Change-Id: Ic122f91e0ea8a24d81dbed48741ef1e33567b56c
2016-04-07 22:42:43 -07:00
Luis Vidal 2eddb5f7c7 Reset timer when a new weather service provider is selected
If a new weather service provider is selected, reset the timer so
the newly selected provider can process the weather update requests

Change-Id: I2d16000b0eb987c6d0985b465af3259a3619d8ef
TICKET: CYNGNOS-2364
2016-04-06 17:07:09 -07:00
Michael Bestas f1b172d392 Automatic translation import
Change-Id: I14df405ee407ce9b9b32507255ab8a7fa57ef40a
2016-04-06 01:25:07 +03:00
Michael Bestas 45f1e04519 cmsdk: Improve data usage strings
Change-Id: Iea97226f3a1a7bfc1d79e90f046e5a634d9fedf7
2016-04-04 19:03:17 +03:00
gkipnis 1ee5f204cc Added READ_DATAUSAGE and WRITE_DATAUSAGE permissions
These permissions are used to control access to the DataUsageProvider

Change-Id: I3c0df3900c964d274081fe3bd9038705334819c8
2016-04-01 12:11:03 -07:00
Michael Bestas 42a1a85427 cmsdk: Minor weather provider string updates
Change-Id: Ic565daa23ad520484b1c5b802ab6f8d83f6653a8
2016-04-01 17:09:50 +03:00
Luis Vidal 4195a1cf89 Add Weather Content Provider [4/5]
Introduce CM Weather Manager and Weather Provider Services API.
The CM Weather Manager can be used by apps to request weather
updates.

The Weather Provider Services API allows a third party developer to
implement a weather service to process weather update requests and
update the CM Weather Content Provider data which can be consumed by
any other app holding the required permission.

Change-Id: Idcc80712ba92715109d3577d120f7fea85d6c996
2016-03-31 17:36:53 -07:00
d34d c99582205e LLS: Don't build LlsInfo when defComponent is empty
Unflattening an empty string will result in a null ComponentName
which will cause an IllegalArgumentException when building the
LiveLockScreenInfo.

Change-Id: I0bafddb48a47ef67d9833cd12bff7eb34369425e
2016-03-31 09:49:42 -07:00
d34d bfa500dd15 LLS: Add live lock screen service [1/4]
The live lock screen service is resposonsible for deciding what
LLS should be displayed at any given time.  Live lock screens can
be swapped out using a priority based system.

Change-Id: Ifba73e839b749fe78a9e4ee347dd20eea6bf0a22
2016-03-29 15:02:45 -07:00
Michael Bestas 3f42978e6f Automatic translation import
Change-Id: I2c8633db25b85efc83b1539c8c20b9146fb220d5
2016-03-28 08:01:18 -07:00
Michael Bestas 374a17e295 Fix: "cmsdk: Mandate partner feature xml's for service implementation."
* CMContextConstants.Features.PERFORMANCE was mistakely used
  instead of CMContextConstants.Features.PARTNER

Change-Id: I4582b2faac23b0a3d34a5c6396cffa56c6177556
2016-03-28 14:26:12 +02: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 ccdb292eec cmsdk: Mandate themes 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: I67b16a0725ed89d5ddbc973b09337d6227087e4d
TICKET: CYNGNOS-2295
2016-03-25 11:19:46 -07:00
Adnan Begovic c406211045 cmsdk: Mandate telephony 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: Ib8e41130f143f784088b4566589a4ddc58aa2ace
TICKET: CYNGNOS-2291
2016-03-24 17:34:54 -07:00
Adnan Begovic fe7fd1d489 cmsdk: Mandate app suggest 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: Icda71efc084cf91bd358dba24eee4704179be90e
TICKET: CYNGNOS-2290
2016-03-24 17:25:13 -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
d34d b05ce12eab Themes: Check theme api level in onBootPhase
This check should be done once the system has reached the
PHASE_ACTIVITY_MANAGER_READY otherwise we can end up getting
a boot failure within the ThemeManagerService

Change-Id: If3e9c8885d8718224cf7d8fed0c0fb82ebe0fcab
TICKET: CYNGNOS-2230
2016-03-21 09:16:33 -07:00
Michael Bestas 948e399b5d Automatic translation import
Change-Id: Iedea6c96b80f72ad83b9bb38069c069982ca5fce
2016-03-18 16:01:14 -07:00
Adnan Begovic 80f56517fd cmsdk: Introduce externalCMServices array to cmres.
Change-Id: I29427524e69327f79e0adae16ccd800fbd712646
2016-03-15 15:54:06 -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
Michael Bestas 9f124658e6 cmsdk: Minor string improvement
* permdesc strings should end with a dot

Change-Id: I948ab86ee7548507da1a8cd3bd260637a1e927b7
2016-03-11 20:09:28 +02:00
Adnan Begovic f8d4978149 cmsdk: Fix resource name.
Change-Id: I20b28bcfb801cd9ba9051f9c97e79ac1119e6fb7
2016-03-08 12:59:17 -08: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
Michael Bestas a4efc11d74 Automatic translation import
Change-Id: Ie18403b1b7f026c986e327c28050123f52352084
2016-03-04 16:25:29 -08:00
d34d b3ea2859fd Themes: Refactor themes to CMSDK [2/6]
First attempt at moving as much as possible out of F/B
and into cmsdk

Change-Id: I9e53d1c32e01e88fc3918663dabe0001df922bc2
TICKET: CYNGNOS-2126
2016-03-04 13:59:33 -08:00
Michael Bestas 8a259437af cmsdk: Add device-specific strings
* Reduce duplicate strings between device-specific setting extensions

Change-Id: I5691a68ba0ce031e2b8e3f9686997b155e04faff
2016-03-01 10:41:05 -08:00
Roman Birg e3c966861f cmsdk: send intent to intialize CMHW
Ref: OPO-513

Change-Id: Iedd88bfad12b8f257bb792bf024d8eefa92b321c
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-02-25 09:00:18 -08:00
Matt Garnes c2efaa7794 Uncomment out getHotwordPackageNameInternal impl
This was mistakenly commented out and causes the API to not function.

Fixes FOR-205.

Change-Id: I3c76d9c3665e35e2d13bed00cba1e742e4c0fb07
2016-02-24 10:27:22 -08:00
Danesh M 61afdc1fd7 PerformanceManager : Ensure we clear calling identity
When going from perfmanager -> powermanager we need to clear the calling
identity otherwise you get :

Bad call: specified package android under uid 10031 but it is really 1000

CYNGNOS-786

Change-Id: Iacd310f56d6538b0f7a4779f89b4451f6a203c5b
2016-02-23 14:28:24 -08:00
Michael Bestas 6c1aa2f115 Automatic translation import
Change-Id: I86ecc76f33b4cc3db62be2939ae501cd10f1634c
2016-02-22 05:17:42 +02:00
Roman Birg 6ad5263eb3 cmsdk: add common action for launching camera from screen gesture
Ref: OPO-427

Change-Id: If97b2ebc864687a53c4ef8253f5d2d0bafc1e996
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-02-18 12:25:41 -08:00
Danesh M 34ff00c8a4 PerformanceManager : Keep in sync with low power mode
Fix edge cases such as :

1) Toggling to power save when plugged in (Should reject)
2) Plugging in to power while in power save should toggle to
   balanced.
3) Toggling from power save to anything else should disable
   low power mode (Orange system bars...etc)

CYNGNOS-786

Change-Id: If6a4c08843673a6d02c38c94ed44d36230c0cb81
2016-02-15 10:59:01 -08:00