Commit Graph

97 Commits

Author SHA1 Message Date
Sam Mortimer
0912ee88c7 Remove theme support
Change-Id: I41f1d0fa1ecc98c2872d2569534e6f2ef686a726
2017-10-11 23:17:36 -07:00
Steve Kondik
987ecb37eb lineage-sdk: Add private copy of Palette
This was in frameworks/base on lineage 14.1 and
earlier (https://review.lineageos.org/#/c/65797/).

Update api/lineage_current.txt to match the new location.

Change-Id: Ib852ab1bc04936828ef00e24f71783e6a41de33c
2017-10-08 21:08:30 -07:00
Sam Mortimer
542742b751 lineage-sdk: rebrand step 2: update file contents
Change-Id: I9881acc57cdc0aeea2b296aac12a8af932d30aea
2017-10-06 09:40:24 -07:00
Sam Mortimer
5ede05bdca lineage-sdk: rebrand step 1: update paths
Change-Id: I4c2135d03d730a313a0638d0f857afa48fb220d3
2017-09-22 17:19:40 -07:00
Joey Rizzoli
088ddf5aaf [3/3] cmsdk: add burnIn protection setting
Change-Id: I3b8007d75a8f17fe7c094e0309e4dbc8f7f9d8c7
Signed-off-by: Joey Rizzoli <joey@lineageos.org>
2017-09-22 17:19:40 -07:00
Sam Mortimer
bdea7f59e8 [2/3] Torch long press power: add auto-off function
Change-Id: I1a9566a00a4c427d7088d19c8e4be78485dceebb
2017-06-20 10:41:53 +00:00
Zhao Wei Liew
952645382c CMSDK: Add long-press power for torch CMSetting
This is used to decide whether a user wants
to long-press the power button while the display
is off to activate the torchlight.

Change-Id: I3bfaa4bf5a5452b9af2c412596c6713a151e0ec8
2017-02-04 00:33:21 +00:00
Zhao Wei Liew
cfaf39e73f cmsdk: Add touchscreen gestures support
Add the CMHW implementation for touchscreen gestures.

Change-Id: Iabeee255748fc92376bc861409a7074de570cb0c
2017-02-01 01:31:58 +00:00
Zhao Wei Liew
d73a9322a4 cmsdk: cmhw: Deprecate TAP_TO_WAKE feature
All devices should use the native implementation now.

Change-Id: Ic29472ba28569536a8556f61229a8a8fe783354a
2017-01-24 08:14:53 +00:00
Zhao Wei Liew
1c5e5e7006 cmsdk: Add GlobalSettingSwitchPreference class
We need to add toggles for some AOSP global settings,
such as heads up notifications.

Change-Id: I5e3cc8717c639bed4ee99e40c350ef7e7c2d76bd
2016-12-10 01:34:25 -08:00
Zhao Wei Liew
77b34c39ed CMSDK: Add volume answer call CMSetting
Change-Id: Ie7f14b1af053d23876908ec3c99f038e76fe5beb
2016-12-01 20:59:49 -08:00
Danny Baumann
e01237ee2f Add a CMSystemSettingDropDownPreference.
Change-Id: Ic3b7589fe3a33b62fba3949e968789a3a99cf9f6
2016-11-02 13:28:01 +01:00
Steve Kondik
3805419c29 cmsdk: RemotePreference API
* Factoring out the work done for CMParts into an actual API that can
   be used for all of the various device settings apps.

Change-Id: Ie1b47c900c2b37457b90f1b0af0634d5fe12fd9a
2016-10-17 19:24:01 -07:00
Steve Kondik
0dae635abe cmsdk: Helper for working with Settings URIs
* Add a bunch of helpers for dealing with settings URIs in
   a transparent way.
 * This also includes the "Observatory" which is an aggregator
   of ContentObservers. Inspired by TunerService.

Change-Id: Ie30c3f712d3c6536af559d93f7debe2dcc5ead06
2016-10-17 19:19:17 -07:00
Steve Kondik
78079eacb8 cmsdk: Add support for more preference constraints
* Add support for negation- prefix with !
 * Add requiresAction constraint, which checks if an application is
   available to resolve the given action
 * Fix issues with operations order
 * Add flag to remove a preference if it's intent can't be resolved
 * Add helper to allow setting minLines of a preference, since it's
   common for things to get weird with the kinds of behavior we
   are introducing everywhere
 * Add support for nuking *other* preferences. For example with
   Doze, many devices have custom features and a extra_settings
   panel which is redundant with the switch. Now we can trivially
   override the one we don't want.

Change-Id: Ibb14b05add56b403013e908db1105dce9d34faad
2016-10-17 19:18:59 -07:00
Zhao Wei Liew
5d787c24d0 cmsdk: preference: Add SecureSettingSwitchPreference
We may need to store/retrieve secure settings in some cases.

Change-Id: Ibf329652d8d057485e39060c956846755c3a91d2
2016-10-13 19:55:57 +08:00
Steve Kondik
cd98e0b30b cmsdk: Rework the PerformanceManager
* Added a proper API for this thing
 * Pass objects around with necessary metadata, pre-filtered and sorted
 * Added event log and service dump
 * Simplified locking and adjusted for performance / correctness
 * Clarified/beautified code where possible
 * TODO:
   - Write profile descriptions
   - Finish the UI
   - Clean up javadocs
   - Do something with per-app profiles, maybe

Change-Id: Ie2ef84031e81a18e95dcd62392c7e6939860d933
2016-10-12 04:06:33 -07:00
Steve Kondik
7928707006 cmsdk: Update API
* Unbreak the build, we added a new public permission

Change-Id: I90fdd88f0296fd1b0e3f14a8caf5b61705084741
2016-10-11 08:19:36 -07:00
Zhao Wei Liew
33fc2d4385 cmsdk: Migrate STYLUS_ICON_ENABLED to CMSettings
Change-Id: If40a8f390d4105812e7fab89e3612f21d6d206a4
2016-10-09 05:47:30 -07:00
Steve Kondik
152ef22084 Merge branch 'cm-13.0' of git://github.com/CyanogenMod/cm_platform_sdk into cm-14.0
Change-Id: I28fdf53785f1ec81f5d811c099e81acdb91e0009
2016-10-09 05:20:44 -07:00
Steve Kondik
0452ebac72 cmsdk: Add search resources plumbing for CMParts
Change-Id: I541bbbabd81eb249b7696f23d5122b6a5f4f8f50
2016-10-08 04:22:31 -07:00
d34d
c4f27d5b81 Themes: Introduce theme mixes into ThemesContract
Change-Id: I6341bada8e3ef674b272621f90bc9beb28767a59
TICKET: CYNGNOS-2121
2016-10-07 10:14:28 -07:00
Steve Kondik
5d08519c6c cmsdk: Add owner constraint for preferences
* Set "cm:requiresOwner=true" to enforce that the current user
   is an owner, otherwise the preference will be removed.

Change-Id: I20d1348f58a855d07676882db773f73687396a6d
2016-09-25 23:17:49 -07:00
Steve Kondik
2d61e0ceba cmsdk: Add constraints and behaviors for our preferences
* Add a new set of attributes which can be declared in the
   preference XML which will cause the preference to be
   removed from the hierarchy if the constraint is not met.
   Currently we can check for installed packages, system
   properties, config references, and system features.
 * CMPartsPreference is also updated to use similar logic
   based on the external XML.

Change-Id: If8fb39cd3312623e38bb3498bfb3f29ed8b444d6
2016-09-19 03:22:36 -07:00
Steve Kondik
9faa2740a5 cmsdk: Add ListPreference helpers backed by CMSettings
Change-Id: Ide607a4ba3b220d82aff5019f61ecdc7afe0a523
2016-09-14 01:47:44 -07:00
Steve Kondik
7be730bbf1 cmsdk: Add CMSettings preference helpers
* These lived in the Settings app previously, but are now moved as
   we need them in a few places.
 * The support library required to use these helpers, but we
   intentionally reference it using LOCAL_JAVA_LIBRARIES so the
   application will need to declare a dependency.

Change-Id: I56844def5e1100ca0300d0027312cc9adcaab941
2016-09-08 13:41:16 -07:00
Steve Kondik
aac8bdc05d cmsdk: Introduce API level 7 - Guava
Change-Id: I9fda50cc46d15e4f89a29303be18c8947befc3e1
2016-09-04 04:35:09 -07:00
Steve Kondik
6f2edde8a7 cmsdk: Temp fixes for bringup
Change-Id: I11e7425c523081f9cc52c7d3daf56cfabfe6424f
2016-08-29 05:43:29 -07:00
Steve Kondik
d22315e883 cmsdk: Revert custom dexopt changes
* Dexopt is no longer a thing on N.

Revert "You are now a developer!"

This reverts commit 2059ea6908.

Revert "[1/2] cmsdk: cm custom boot dexopt UI"

This reverts commit 6e5ab27fbb.

Change-Id: Ie50e8e6a77172d2b5b0659be831e7dd7a19fee04
2016-08-29 00:50:06 -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
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
Dan Pasanen
c4becbb3f4 CMSettings: fix lock screen rotation toggle [3/3]
Change-Id: I2940663c7476b0df9b3553a480fa33ea4f18a5bc
2016-06-03 14:03:50 -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
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
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
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
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
16d3dc672e LLS: Deprecate collapseNotificationPanel [1/2]
collapseNotificationPanel is no longer applicable with the updated
UX so deprecate it and document that it will essentially be a no-op

Change-Id: I285bb48e3a9ffec8d554f880edf17e5105c94018
TICKET: CYNGNOS-2392
2016-04-12 09:09:33 -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
Luis Vidal
06d5c89c43 Add state member to WeatherLocation class
Some weather service providers might require an additional
state (territory) field to better identify a location, so
a new field has been added to WeatherLocation class to hold
this data.

This patch also adds javadoc to public methods

TICKET: CYNGNOS-2384

Change-Id: I927f58d436f044df3c8af496b0f27e017f5e73e3
2016-04-08 10:55:44 -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
Adnan Begovic
d8c2556c31 cmsdk: Actually return the system property in Build.
TICKET: CYNGNOS-2379
Change-Id: I7c7f3726b34db2b26d63fb4ef95df469fdf7e989
2016-04-06 15:19:22 -07:00
Adnan Begovic
6b879f36e4 cmsdk: Introduce Fig, api level 6.
Change-Id: I2916b1462c1f0b9582f4fefac82f60c20f820b85
TICKET: CYNGNOS-2303
2016-04-01 16:36:38 -07: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
Adnan Begovic
df4486fb0e cmsdk: Unhide the Concierge.
Change-Id: I82adee7f9acb67623725acea723b52e08bab7311
2016-04-01 11:21:49 -07:00
Danesh M
d549053b2d CmSdk : Swipe offsets and show lockscreen
Allows live lockscreen to listen to keyguard offsets
and show lockscreen.

Change-Id: I1a06c78b95e4e6940e063c6e0ba0e4db44a3c380
2016-04-01 11:17:16 -07:00