Commit Graph

62 Commits

Author SHA1 Message Date
Zhao Wei Liew
f50d55140f Add a proper description for CM_SETUP_WIZARD_COMPLETED deprecation
Change-Id: I7bf1ee5644b178173941803fccafbbd501289acd
2017-02-19 17:42:31 +08:00
Michael W
b1be9e0457 cmsdk: utils: Introduce PackageManagerUtils class
Partially based off the PackageManagerHelper class in Launcher3.

Change-Id: I0ed2ea210cb52ac4bd94c7bc5320c24e6d423279
2017-02-19 01:58:59 +00:00
Paul Keith
595640e86a cmsdk: Deprecate CM_SETUP_WIZARD_COMPLETED
Change-Id: I1ddf79d8308def2056fa509b64a2ec4af5c39f31
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
2017-02-18 11:55:58 +08:00
Zhao Wei Liew
76c621480c Revert "You are now a developer!"
We no longer have an alternative drawable.

This reverts commit 2059ea6908.

Change-Id: I4ea4e81ae7c8b583fa107a0f32c3642f567bfb2d
2017-02-11 16:18:14 +08:00
Zhao Wei Liew
4e300ec772 cmsdk: cmhw: Deprecate TAP_TO_WAKE feature
All devices should use the native implementation now.

Change-Id: Ic29472ba28569536a8556f61229a8a8fe783354a
2017-01-24 08:22:50 +00:00
Zhao Wei Liew
8a975c045d cmsdk: Deprecate STATS_COLLECTION_REPORTED CMSetting
The functionality that uses this setting has been removed.
This setting should no longer be used.

Change-Id: Iff887a711a9f8cac18cf9938280ddc99a5787615
(cherry picked from commit 79cced08e745f7cc1d09d05f450335e75f32de35)
2016-12-31 14:16:40 +00:00
Danny Baumann
fac872cfde Add option definition for vibration during zen mode.
Change-Id: I7398adbaa691bc6ec50b56328190a317bee805eb
2016-10-17 16:41:40 +02:00
Zhao Wei Liew
d755121d2c cmsdk: Remove duplicate legacy system element
This is already in the array several lines above.

Change-Id: I0e046902dc1bf01ea445587e1f8a4e7f8520051c
2016-10-08 19:54:34 -07:00
d34d
c4f27d5b81 Themes: Introduce theme mixes into ThemesContract
Change-Id: I6341bada8e3ef674b272621f90bc9beb28767a59
TICKET: CYNGNOS-2121
2016-10-07 10:14:28 -07:00
Roman Birg
662cb51642 cmsdk: fix visible check in hasChanged
Previously the visible check was comparing the newly set value to
itself. Now we cache the old value, set new value, and can do a proper
comparison.

Change-Id: Idbe921bfe9e311551d6bfbad432c647c129f376e
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-08-30 16:00:36 -07:00
Michael Bestas
2059ea6908
You are now a developer!
* Show alternative brand logo in dexopt screen
  when developer options are enabled
* Drawable by Asher

Change-Id: Ie100d7c3e9c96a7ad64c4cd65195d6f531090140
2016-08-20 18:07:38 +03:00
Adnan Begovic
c349280cf8 cmsdk: Finalize api level 6 (Fig).
Change-Id: I529806e5526faf7d23689354a6cc958d9989b95c
2016-08-17 14:18:44 -07:00
Danesh M
e1ba9407f7 CMSDK : Fix generateAlertColorFromDrawable for non BitmapDrawable
In the case that the bitmap being passed in was not a bitmap drawable,
we were not retaining any of the attributes from the original drawable.
This patch ensures we ask that drawable to draw on the canvas/bitmap so we
can use that information. Also add tests around it.

Change-Id: I3eefba6e6624fe0bed4965ddf9029320c40f7420
2016-08-14 21:57:37 -07:00
Alexander Martinz
6e5ab27fbb [1/2] cmsdk: cm custom boot dexopt UI
* Pass app info and number of installed packages to boot message UI
 * Ui by Asher and Joey, based on Alexander's previous work

Change-Id: I9298d7e2b85a703921abf62f8b91157e6f88803b
Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>
2016-08-10 16:52:21 -07:00
Steve Kondik
db640a9648 livedisplay: Float-to-string conversions considered harmful
* Force US locale when doing internal flattening of HSIC objects
   into strings. This would crash in the validator if the user's
   local uses commands instead of dots to format floats.

Change-Id: I08f44238a486308a483205b97632114d2f7a77f1
2016-08-10 02:08:47 -07:00
Steve Kondik
87590f0b1e cmsdk/livedisplay: Add support for picture adjustment
* Allows adjustment of hue, saturation, intensity, and contrast.

Change-Id: Icf8ff6200a07b68e09dcd7f140a82e57b53944f7
2016-08-08 12:41:27 -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
Luis Vidal
46bed1698d cmsdk: Prevent NPE in CMWeatherManager
Verify that we have an instance of to the weather manager service
before we try to register/unregister a listener or query the
current weather provider.

Change-Id: Iec09073615f85626c6f64e4a55758aae52231ca8
2016-06-17 15:12:38 -07:00
d34d
9c42d415b9 ExtViews: Catch SecurityException due to bad interface
When interfaces get obfucsated, bad things happen.

Change-Id: I9b0829853da536f4047dab8223c97f993a399645
TICKET: CYNGNOS-2916
2016-06-16 14:04:23 -07:00
Michael Bestas
522b0c3db1 utils: Introduce FileUtils class
Change-Id: Icbfa068fa0db2ae28436063072dd4b576f1b2be1
2016-06-16 10:44:36 -07:00
Scott Mertz
aa11b3330a cmsdk: fixup javadoc in CMHardwareManager
Change-Id: I114e57c1b907de3cc7cdaff746b0391cef4b8eb0
2016-06-14 11:54:08 -07:00
d34d
b6a21cab09 Keyguard: Get your weather on... the lock screen [2/3]
Change-Id: I1475cdd450021ef1a71c6c888319689e3b0507a3
2016-06-09 14:10:38 -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
Adnan Begovic
705890212d CMSettingsProvider: Add coverage for CMSettings' interfaces.
TICKET: CYNGNOS-3016
Change-Id: I55b762b51ad98194c235b83c36e3a6683c33ac4e
2016-06-07 10:45:53 -07:00
Adnan Begovic
fb0c0371d4 cmsdk: Fix redundant case in themes contract's componentToImageColName.
TICKET: CYNGNOS-3015
Change-Id: I1daf7cf7b5b2119ab34e69b339644a1fb3da16dc
2016-06-07 10:43:07 -07:00
Dan Pasanen
c4becbb3f4 CMSettings: fix lock screen rotation toggle [3/3]
Change-Id: I2940663c7476b0df9b3553a480fa33ea4f18a5bc
2016-06-03 14:03:50 -07:00
Adnan Begovic
b51572d697 cmsdk: Create CMSystemServer to handle our platform init.
Change-Id: I7b62978e2a284a3a1ec1ffc1d8c72545d7b0c939
2016-05-31 17:28:48 -07:00
d34d
3b4129f1da Expose lock screen blurring as a setting [1/2]
This will provide control over blurring since the current implementation
assumes it is always on provided the device config specifies it
supports blur.

Change-Id: I71e318af12b5212133c6c5b02bed050eb67757d9
TICKET: CYNGNOS-2610
2016-05-16 08:54:01 -07:00
Danesh M
68665286e8 CMSettings : Move force_show_navbar to global
Keep feature inline with 12.1, only allow owner to
control the feature and mirror across users.

Also add additional checks for moved settings.

Change-Id: Ida11b71bc5ce9463628f8c5d76e59902d47d59bb
2016-05-13 13:35:13 -07: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
Roman Birg
10f165d5d0 cmsdk: add persisted key value for status bar tiles
The persisted one simply contains the user, the publishing package, and
the tile tag - items which can be persisted across reboots to restore
the tile's properties on boot properly.

Ticket: CYNGNOS-2530

Change-Id: If770557482e81ab0dd0d16c3ac8be0b2b51e653a
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-05-04 22:31:41 -07:00
Roman Birg
60f2acf2f0 cmsdk: @hide protected variable
Ticket: CYNGNOS-2480

Change-Id: I0d104b235db59af008dee560763d6a753e3c8b79
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-05-02 17:48:51 -07:00
Roman Birg
fd4b383b71 CMSettings: intercept Settings calls to DEV_FORCE_SHOW_NAVBAR
Because DEV_FORCE_SHOW_NAVBAR has lived in Settings.System,
Settings.Secure, and now in CMSettings.Secure, we need to return the
proper value no matter which place an app might query.

Ticket: CYNGNOS-2480

Change-Id: Ie84df9763aa3714ec4ce4d033dc73be4de3f1f00
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-05-02 16:17:41 -07:00
Adnan Begovic
94dd91a34c cmsdk: Fix PerformanceManagerTest expectations.
Since the API for PerformanceManager returns the number
  of profiles supported we can assume what the profiles are
  since the HAL provides them in an ordered manner. Thus,
  iterate through the size of the number of profiles and verify
  each one that's possible.

Change-Id: I87f6d1a847c849bd9e544c1e89a666726c61fe83
TICKET: CYNGNOS-2603
2016-05-02 10:33:21 -07:00
Jorge Ruesga
c6550fd803 cmsdk: include our own consumer proguard rules
Include a proguard file with can be consumed by the latest gradle plugin to
merge this ones rules without the rules of the app linked to.
This way devs doesn't need to declare (in a recent version of the gradle plugin)
-dontwarn and -dontnote for cyanogenmod.library when linked to it, because
proguard crashes the build because it cannot access to cm system private classes.

Change-Id: I7c94a9119db744b0029b4d9a8aa782adcbd47b93
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2016-05-02 10:08:21 -07:00
Jorge Ruesga
de43b8c2d8 cmsdk: set minsdk to api level 4
In other case it will force to declare READ_PHONE_STATUS permission to apps
linked to

Change-Id: I384837c2bda2fe775dafd33b6f7690ca1db465d7
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2016-05-02 10:07:44 -07: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
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
Roman Birg
bf5261c360 CMSettings: add CM_SETUP_WIZARD_COMPLETED key
We need to store the state of _our_ setup wizard.

To not break existing devices' provisioning, copy the current state of the global
provisioned flag to the new key value.

Ticket: CYNGNOS-2431

Change-Id: I3d88361edc126788f42b28efd11f3c7598117138
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-04-22 08:29:38 -07:00
Luis Vidal
02a71cc24e Weather API: Honor the values set for today's low/high temp
The vales passed to setTodaysHigh() and setTodaysLow() have no effect.
This patch fixes that problem. The values provided in the Builder
helper class will be actually set when the WeatherInfo object is built

Change-Id: I5f47b16a56fd577349d3b3d45ea7a753262f90ea
TICKET: CYNGNOS-2484
2016-04-18 16:52:29 -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
Steve Kondik
3944915061 livedisplay: Fix validator for the nudge counter
* This is a range counter starting from -3 (initial value) which
   counts upwards once a day. It's finally set to 1 when either the
   feature is used or we gave up with the nudges.

Change-Id: Ia19b381aa35c598b31b46071479ae590dc8d9ffd
2016-04-15 22:50:12 -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
763e39ad54 livedisplay: Fix error checks when fetching config
Change-Id: I8ba43f32b2c45f626401f3cbc0050bc0593748c8
2016-04-14 20:34:59 -07:00
Luis Vidal
ad5e5d019f Remove public default constructor from CMWeatherManager.RequestStatus [1/2]
RequestStatus holds only final constants and should not provide
public constructors. This class also should be final.

This patch also fix minor typos on RequestStatus javadoc

Change-Id: I0deb1d6a9b23eed83451dec352bb4c410e2378d6
TICKET: CYNGNOS-2441
2016-04-13 17:52:16 -07:00
d34d
b49885a649 ExtViews: Pass input events to underlying Window
Change-Id: If4303a49dd0c637e9336dcf454e338b883906925
TICKET: CYNGNOS-2442
2016-04-13 17:35:37 -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
Luis Vidal
377fffca69 Use temperature unit from CMSettings on weather update requests
Make sure the the weather update requests are using the temperature
unit set by the user in the weather settings

Change-Id: Iac3a891b5afbcf36a87386f828b40bcbd0e1de02
TICKET: CYNGNOS-2429
2016-04-13 14:56:24 -07:00
Luis Vidal
ed4d063611 Add WEATHER_TEMPERATURE_UNIT to CMSettings [1/2]
Introduce WEATHER_TEMPERATURE_UNIT. This setting will be used to
store the temperature unit in which the weather data will be reported.

Users will be able to set this value in the weather settings menu.
Each weather service provider might choose to provide the user
with a way to overlay this value (for example via the settings
activity that each service provider can define)

Change-Id: Ib6e47c9790aba02e6c29bd7f783730efda9177f3
TICKET:CYNGNOS-2426
2016-04-13 12:45:25 -07:00