Commit Graph

146 Commits

Author SHA1 Message Date
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