Commit Graph

255 Commits

Author SHA1 Message Date
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
Michael Bestas ba31b78d15 Automatic translation import
Change-Id: I5616066b18e84f59e040a0e73882a3831cdca35f
2016-02-14 16:29:34 +02:00
Roman Birg 06965d4dfe cmsdk: adjust default tile order
Ref: CYNGNOS-1861

Change-Id: I0f4ab58cb38fe0c9a2dba1b7d38de9020544bdc4
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-02-11 11:44:09 -08:00
Adnan Begovic 66f23d80ba cmsdk: Remove unused androidTest directory.
Change-Id: Id15cfc17d95f89aceb963a216ddd23295c21773a
2016-02-08 14:15:17 -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
Michael Bestas ee703e74fa Automatic translation import
Change-Id: I1893380ab4f7e3bb5ff31c72578aa28a932839a0
2016-02-02 07:04:22 +02:00
Keith Mok 3629a574b2 cmsdk: remove visualizer from default qs tile list
This fixes the following errors during bootup:
QSTileHost: Error creating tile for spec: visualizer
QSTileHost: java.lang.IllegalArgumentException: Bad tile spec: visualizer

CYNGNOS-1722

Change-Id: Idd45ef73beb004fb4afb310bb335f3cc85b08330
2016-01-26 13:22:40 -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
Michael Bestas 910648e8e2 Automatic translation import
Change-Id: I3777f8d3c8b2c83da6bfe734bfaa1554ae91b198
2016-01-25 19:42:32 +02: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
d34d f499009346 Change THIRD_PARTY_KEYGUARD permission to normal
Lower protection level of THIRD_PARTY_KEYGUARD permission from
signature|privileged to normal.

Change-Id: I464daba67a66e88efe6219cec2663a07d15ab3ed
TICKET: CYNGNOS-1689
2016-01-21 14:20:30 -08:00
Michael Bestas cc517bfc9b Automatic translation import
Change-Id: I39a0e63fa95fd9a37a79dc6cb52da8047c40c86f
2016-01-11 22:46:43 +02:00
Adnan Begovic 33e300e32d cmsdk: Add example service test.
Change-Id: I52972bc4d32505ba7fd2f7278efdb9441c39b82a
2016-01-05 17:37:14 -08:00
Michael Bestas 9f9759a89a Automatic translation import
Change-Id: I742c557747bbee9f821298497e2cef0e371bb0a2
2015-12-25 19:39:33 +02:00
Khalid Zubair c972c0e85e Add resources for WiFi customization
Add resources needed by WiFi service (see
If1613a8556908f372a70fbd859fa35e9315f9613)

Change-Id: I76b838354459e4482795c9812d37bb204df708c3
2015-12-23 16:28:09 -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 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
Michael Bestas 9a83dc6154 cm: Improve permission strings
Change-Id: I2fdf589967efc997d0b3f93ff73268ad57858a61
2015-12-18 18:11:04 -08:00
d34d 9691d4224c Keyguard: Introduce 3rd party keyguard perms and utils
For CM13, the third party keyguard permission is being added to
the cmsdk rather than frameworks/base.  This patch also introduces
CmLockPatternUtils, a subclass of LockPatternUtils, which allows us
to make use of the new third party keyguard permissions in cmsdk.

Change-Id: I91fadfaae79e3f146e9ae73929cea91294ef8d87
2015-12-18 15:04:07 -08:00
Steve Kondik 968127f532 cmsdk: Add CMHW method to check if SRE is self managed
Change-Id: Ia5f644ce0b964a965afa47ea08016167c8b20620
2015-12-09 21:02:54 -08:00
Adnan Begovic af4d676a93 cmsdk: Add QS utility classes.
Change-Id: I5644f6d9769614d72220ee68a08202e6c69037d9
2015-12-08 17:44:26 -08:00
Adnan Begovic 4ae9604b18 cmsdk: Reimplement helper methods for secondary telephony service.
Change-Id: If126936f788d398c53dca21297cd7d69f9d933b8
2015-11-29 14:55:36 -08:00
Adnan Begovic c221959167 cmsdk: Re-enable multiple profiles functions.
Change-Id: I1db0cba6cf107926a25a8e45952813d3c21eb470
2015-11-29 14:55:21 -08:00
Khalid Zubair 4a964c508e perf: Add PerformanceManager.getProfileHasAppProfiles API
Add an API to query PerformanceManager if a perf profile supports
app-profiles.

Change-Id: I51d958343624ab085de0352ac182cb05308e0da4
2015-11-25 12:52:40 -08:00
Khalid Zubair 37b590928f perf: fix perf profile change issues
Rework profile handling to address the following issues:

 - When app specific profiles are enabled, the perf service silently
   changes the profile to BALANCED when the user revisits settings.
   The service and Settings UI still show whatever pref the user had
   selected. The user is now unable to change the setting to BALANCED.
   The perf service ignores the change because the current profile
   (selected by app profiles) did not change.

 - When low power mode (battery saver) activates or deactivates, the
   user selected profile is overwritten.

All runtime decisions regarding active profiles have been consolidated
in to a single applyProfile() function that handles low power mode,
user and app-specific profile rules.

App specific profiles are applied only if the power profile is
BALANCED.

setPowerProfileInternal has been changed to save the user pref even if
the active pref is unchanged.

Fixes SAMBAR-1088

Change-Id: Iac658959130f08452f5e41ce3339fe4603ac474e
2015-11-25 12:52:23 -08:00
Vineet Patil 35fdbdab95 Protected apps components
Change-Id: I850d45e9aca6eff8221766830fce45468c8ca549
2015-11-24 12:12:37 -08:00
AdrianDC a63e78ba92 cmsdk: Move Notification LEDs settings to CMSettings
* Lights with Screen On
 * LEDs Brightness
 * Multiple LEDs

Change-Id: I8c3f3cae53c834d1d2798d9dece00e3253ccb1db
Signed-off-by: AdrianDC <radian.dc@gmail.com>
2015-11-13 14:13:09 +01:00
Adnan Begovic a09defa3c9 cmsdk: Move LiveDisplay settings and resources.
Change-Id: I6d0c3f8b645e2c8cca059ff343a774eab1933a9b
2015-11-10 18:10:54 -08:00
Adnan Begovic 3c42b723c3 cmsdk: Move proximitycheck to CMSettings.
Change-Id: If9e097c373404fe8983fd9160ebeb8405bd363d8
2015-11-09 18:00:32 -08:00
Danesh M b56f346814 CMSDK : Change protection level system to privileged
Change-Id: I8e5e8c17a9d7e2399155b34e63bdd55e19a59362
2015-11-05 15:14:19 -08:00
Steve Kondik ac36cbe559 perf: Remove logspam
Change-Id: Id7c54851950eedc77ab6bc085fe515b6e7aaaac5
2015-11-04 04:39:31 -08:00
Steve Kondik 620c35bd6b cmsdk: Refactor the PerformanceManager
* Remove all code and configuration into CMSDK.
 * Deprecate the properties-based API

Change-Id: Ib14ce5b8623cb368e6b545d1f82bc9c58580e13b
2015-11-03 17:59:44 -08:00
Adnan Begovic 99f872ffcf cmsdk: Make sure we're generating as 0x3F res id
Change-Id: I2a55e65d7b9746dfd005d04c39024490a5b1d2b1
2015-10-26 15:38:23 -07:00
Adnan Begovic ce2636010c cmsdk: Point at cmsettings for system profiles.
Change-Id: I61497111f1bf1873554c4185b4424662dcb8c7e5
2015-10-26 15:37:55 -07:00
Matt Garnes 9e69abb862 Improve several permission description Strings.
The MODIFY_NETWORK_SETTINGS and MODIFY_SOUND_SETTINGS permissions were
not descriptive enough. Improve the strings to enumerate exactly what
settings these permissions protect.

Fixes FOR-23.

Change-Id: Idd64738c21d879462a7e7e6c65ceefdc771f1bcd
2015-10-14 14:58:56 -07:00
Adnan Begovic fe7a368a69 cmsdk: Temporary build fixes
Change-Id: I18a1aa9ade95de63fe18eaaeca388b118c8ffe8c
2015-10-09 14:56:20 -07:00
Adnan Begovic a79a53b8ea cmsdk: mContext is private with SystemService now.
YOU MEAN WE HAVE SANE ABSTRACTION NOW?!

Change-Id: I5b37b656b2002013b368b43153927b796ec46e6a
2015-10-09 14:56:20 -07:00
Michael Bestas 7f34720a99 Automatic translation import
Change-Id: If46cee0ac3a60de651bcb20c54c19add9d2bbd3b
2015-10-03 00:23:59 +03:00
Danesh M b4ef25ab19 CMSdk : Initial thermal state to STATE_UNKNOWN
Change-Id: I37c7fe7441d7f0f09d1b96be001f046417ffff12
2015-09-24 18:18:56 -07:00
Michael Bestas ce92e371d0 Automatic translation import
Change-Id: I097602ee86881fcbd1d14ac9626f3f3119966df9
2015-09-24 13:47:57 -07:00
Danesh M b4f88faa26 CMSdk : Add thermal monitor service impl
Change-Id: I54c4473a5fdd026958bc6bf170b2e8953aaa64af
2015-09-24 11:44:14 -07:00
Adnan Begovic 3c456656b3 cmsdk: Make sure the ACCESS_APP_SUGGESTIONS perm is not hidden.
Change-Id: Ide2ce8de1db05a9ccbcb948429623cff481eec12
2015-09-14 17:39:51 -07:00
herriojr e78ca4d6fe Added Application Suggestions.
Added in custom Resolver to handle providing suggestions.

Added in Service to handle providing suggestions to custom resolver.

Added in ability to provider suggestions through a Proxy to another
application which must be installed during compile time if one is
to be used. This is a similar implementation to how the Location
Services work.

Change-Id: Id960260596b7bb6485caa1e1d07744e387a4c6e9
2015-09-14 14:29:43 -07:00
Michael Bestas 35df988aa5 Automatic translation import
Change-Id: I00f2ca510c5c449bc18ea5385510389e72efd539
2015-09-11 20:01:23 +03:00
Michael Bestas d39c839727 Update persistent storage permission string
Change-Id: Id32018b2e6db156eefb124b646b08205e0dcd635
2015-09-11 19:23:37 +03:00
Michael Bestas 44b9ae46d2 Correct permission string.
* Be consistent

Change-Id: I5201f1f2e7ddbf3639985036444935aac3835683
2015-09-11 19:01:43 +03: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
Matt Garnes a458122384 Allow whitelist for MODIFY_NETWORK_SETTINGS permission.
Change-Id: If4e8137bd782b43f5bd6bd08804a5130deb05359
2015-09-03 14:49:03 -07:00
Adnan Begovic bc2ea6b4a7 cmsdk: Update documentation for HAF permission.
Change-Id: I0b02f23335d13a95abef31bd4cbe6fac7c7b5519
2015-09-01 18:00:39 -07:00
Adnan Begovic 7f17704974 cmsdk: Add permissions for ALARMS.
Change-Id: Ibf8f8a51b97d4c90dcddb11f093e64d82b478f44
2015-09-01 17:14:11 -07:00
Adnan Begovic 052391135b cmsdk: Enforce cyanogenmod.permission.MODIFY_PROFILES for profiles.
Change-Id: Id14bfd9b214b4f53960c55d8abab2764f990b1b6
2015-09-01 15:40:58 -07:00
Michael Bestas 6850732052 Automatic translation import
Change-Id: I9dd6196fc0afa491fec0437e5a5d2fbe4d1ce4e2
2015-09-01 13:00:18 -07:00
Yvonne Wong 0eb2999091 Add CMSettingsProvider and CMDatabaseHelper
issue-id: CYNGNOS-828

Change-Id: I01c08c0e432d6a941950a565e5ab6664664e2a7f
2015-08-31 13:52:27 -07:00
Steve Kondik ba4db5ad36 cmhw: Add makeDefault arg to setDisplayMode
* Already supported by the HAL and is necessary to sync state with
   the server side.

Change-Id: I65148d5464dff8dbbee374387a01bcf13a945eb1
2015-08-20 23:58:47 -07:00
Tom Powell b23c1817b8 Automatic translation import
Change-Id: Idef5fa989b78aeecd9aef65c823ab9fda8bdb919
2015-08-20 20:51:28 -07:00
Tom Powell fd406e9e71 Automatic translation import
Change-Id: I17ad702060fc84c01e78013a05051ee3baf3bd43
2015-08-20 14:35:02 -07:00
Steve Kondik e18f6d8b1c cmsdk: Add initial DisplayMode and AutoContrast support to CMHW
Change-Id: I71f3599c64c03efc4b090ea71e583c942d0c03c2
2015-08-19 05:33:40 -07:00
Steve Kondik 5ee87cbf06 cmsdk: Transplant CMHW into CMSDK
* Moving CMHW out of the framework and into CMSDK.

Change-Id: I0b68b67d059e2310c83e253a9071d886ed6760cb
2015-08-19 05:33:11 -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
Michael Bestas 8b5a4d9bed Automatic translation import
Change-Id: Icbef018dbd659b913e2352065d5bfdc2f60d708b
2015-08-17 20:02:39 +03: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
Tom Powell f304ef2ac9 Automatic translation import
Change-Id: I589bde7ad1b8f0b4a62f2aa5f08b69b8e510b7b6
2015-08-12 11:02:42 -07:00
Tom Powell c30c5b5f65 Automatic translation import
Change-Id: I0f93a645538f90e0e191e277de7f7237b3861909
2015-08-11 15:49:33 -07:00
Tom Powell f47e3de17d Automatic translation import
Change-Id: I7e45e55719b9c0afefa5c31084947b01e204fa35
2015-08-10 10:37:41 -07:00
Joao Figueiredo 7f50335f2b cmsdk: Dual SIM support on CM SDK
Signed-off-by: Adnan Begovic <adnan@cyngn.com>
Change-Id: I69b349853b0259582956744d9ddd99a187c10fff
2015-08-06 18:56:12 -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
Michael Bestas 5b61a21f7f Automatic translation import
Change-Id: Ibc89b531a5f4603643c7d2b43d4610069d7c8768
2015-08-05 11:10:32 -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
Adnan Begovic d61839701e cmsdk: Create new setIcon method for utilizing bitmaps
Change-Id: I123994af89fe435b9f4bc146056a237f1cecb939
2015-07-31 13:04:41 -07:00
Michael Bestas ff70bebdc9 Automatic translation import
Change-Id: I6dc975730af07f218b75edb2f0bc4616abc278ab
2015-07-27 20:52:29 +03:00
Michael Bestas f12419a12c Automatic translation import
Change-Id: Ic3e483b4231fbec721d1e23984164aa37ddb1d1f
2015-07-19 15:50:09 +03: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
Michael Bestas a7579da079 Automatic translation import
Change-Id: I0c0bee3916767b92b42a616aef41e87d97ed1118
2015-07-13 01:03:20 +03:00
Adnan Begovic cf0bfd333e CMSDK: Begin documentation and testing for profiles.
Change-Id: I06c02f6aed63cfa0483376ae93a3f9a594aff201
2015-07-10 14:40:52 -07:00
Adnan Begovic 125c8993ca CMSDK: Utilize CMSDK_PACKAGE_ID.
Change-Id: I98a995959226c1feaa0a6ece447e557857a84f99
2015-07-10 11:01:28 -07:00
Adnan Begovic 6e46829eb7 CMSDK: Introduce factored out resources from framework.
Change-Id: I4193db99f3f883260354cde98366f94c608f6163
2015-07-09 20:05:29 -07:00
Michael Bestas 1ba6ee279a Automatic translation import
Change-Id: Ib56e96268fbbb444d4cbfab7994a6913b96f1aa2
2015-07-02 00:22:13 +03: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
Adnan Begovic 4e081aef67 CMSDK: Update iconography for resource package.
Change-Id: I6259d4dde7af32bb99263227bb93a5dee3a972d0
2015-06-23 19:24:18 -07:00
Michael Bestas c8b2fbaad1 Automatic translation import
Change-Id: I700fa5f8c4c8ec9964dbf78e5fc57718e1db04ef
2015-06-23 01:03:13 +03:00
Jorge Ruesga 635f8f1657 cmsdk: notify new listeners all registered custom tiles
If a new listener is created, then notified all custom tiles that was previously registered

Change-Id: I9e8d9a1fa84d54b00ea7fd8ed400e172f17f06cc
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-06-14 00:50:37 +02:00
Jorge Ruesga 08a3470a78 cmsdk: customtiles: allow load resources from external packages
Saved the context passed to CustomTile.Builder in other to differenciate from the context
used to publish the tile. This allow to load resources (icons) from other packages

Change-Id: I8e40bc59a66f371f3a02f0182e25c6e9eca73c63
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-06-14 00:07:54 +02:00
Michael Bestas 6b9dbb295d Automatic translation import
Change-Id: I11386e177982008fb052829bdcfd9969145ef587
2015-06-13 21:11:36 +03:00
Michael Bestas 853240ece1 Automatic translation import
Change-Id: I3ec69dfc486ec5b10461c3a8e8cf6ce60a24fa0b
2015-06-09 20:36:55 +03:00
Michael Bestas cbc19f5cf2 Automatic translation import
Change-Id: I7456865cffd86c885403e4406dbfa405f477e86d
2015-05-31 16:59:52 +03:00
Michael Bestas 0b75e32039 Improve strings
Change-Id: I65995f20e00b9b6068b3f93ae87da963e648d7fa
2015-05-25 22:48:37 +03:00
Michael Bestas 38afe8dca2 Automatic translation import
Change-Id: I4ff725cb306ba6371233bb7c3d3991e344821511
2015-05-24 23:38:27 +03:00
Adnan Begovic 2217bb4197 CMSDK: Remove dead code.
Change-Id: If08729e64271ed72545eddc8da3147f23c6f2d75
2015-05-18 16:35:01 -07:00
Michael Bestas 1fa41bb9f3 Automatic translation import
Change-Id: Icc92eb3452257cb6c4bbfc7c6558ba4708731a21
2015-05-16 00:04:34 +03:00
Michael Bestas 7d8eb9f2cc Merge "Rename resource files" into cm-12.1 2015-05-13 15:56:28 +00:00
Michael Bestas 5a08354a29 Rename resource files
No need for the cm_ prefix on non-AOSP projects

Change-Id: I27360c49792093c90207950687ea4a61a9d8f3a3
2015-05-13 17:23:39 +03:00
Adnan Begovic 37c4b96e0b CMSDK: Don't share a namespace with the library.
Otherwise PackageParser will skip you.

  W/ResourceType( 3077): ResTable_typeSpec entry count inconsistent: given 6, previously 1003
  I/PackageManager( 3077): /system/framework/org.cyanogenmod.platform-res.apk changed; collecting certs
  W/PackageManager( 3077): Failed to parse /system/framework/org.cyanogenmod.platform-res.apk:
  Application package org.cyanogenmod.platform already installed.  Skipping duplicate.

Change-Id: Iddea111f4c9bbe69939266ce5c6902d176407b14
2015-05-13 04:54:40 -07:00
Danny Baumann 7267e32ca4 Fix package name.
Package names must contain at least one period if they're not 'android'.

Change-Id: I43658b30837efcaf099e8c02454154e9a57e1a91
2015-05-13 04:27:47 -07:00
Adnan Begovic 3f13414fde CMSDK: Make sure we're binding the correct permission for enforcement.
Change-Id: Ie58b11cfa972f449bfc20b05f4b52b7cd28ab7d5
2015-05-13 01:39:34 -07:00
Adnan Begovic 6bcee3fc68 CMSDK: Ignore subdir layer for resource package.
Change-Id: Id31db92d222e2edb7cf4725b4fcc58a154db0d69
2015-05-12 17:40:55 -07:00