Commit Graph

121 Commits

Author SHA1 Message Date
Joey
c8a06b9ff7 sdk: Trust: better warnings management
Allow fine-tuned management of trust warnings,
the user is now able to disable specific warnings
instead of blocking everything

Change-Id: I04c7aa5fba76fd7500fd70c0c874fa0c3e59e03a
Signed-off-by: Joey <joey@lineageos.org>
2018-07-06 11:27:11 +02:00
Luca Stefani
55962105cf Regen lineage_current
Change-Id: I47ceb8f40998be70489f61513e3d980fad47e7f4
2018-07-02 10:10:34 +02:00
Tobias Tefke
fa05f27ad7 Trust: warn if build is signed with insecure keys
Change-Id: I1d58e232ed99dfe7e2addb651c114c1068e64105
2018-06-26 00:27:09 +02:00
Joey
c0b21ca8ed sdk: Introduce Trust Interface
Change-Id: I5c3ece3f6035dd03be1ceab01020496c179f2e65
Signed-off-by: Joey <joey@lineageos.org>
2018-06-10 00:45:35 +02:00
Joey
5a72b57502 sdk: Styles API finalization for API9
Changes:

- Added getter for global style and current accent
- Added getter for a list of (available) trusted overlays
- Apps that want to change the global style now MUST specify their
  package name when calling setGlobalStyle().
  LineageParts will expose the name of the app that's currently managing
  the global style
- Improved documentation

Change-Id: Iaa1b106f43684b4120aa0f39023ebfddcb379806
Signed-off-by: Joey <joey@lineageos.org>
2018-03-11 16:22:59 +00:00
Joey
76fc3d3942 sdk: introduce Style API
This API will allow apps to change global style mode and accent.

Global style mode can be
* Automatic (wallpaper)
* Automatic (day of time)
* Light
* Dark

Accent colors are defined in the caller application that will have
to pass the package name.

It's possible for apps to pass a Bitmap and get a suggestion
of a global style + accent color that can be applied.

Restrictions:
* Only one accent can be enabled at time.
* We're not limiting this to system apps, but we're marking
  this as dangerous permissions so apps will have to require
  it at runtime to the user.

Change-Id: I921e8758c3ae093a88e897899612830258c97f8d
Signed-off-by: Joey <joey@lineageos.org>
2018-03-05 13:33:30 +00:00
Joey
6b4410555a sdk: livedisplay: add a method to determine whether night mode is enabled
LiveDisplayManager.getMode() returns MODE_AUTO when night mode is enabled
automatically, so there's no way to determine if night is on when livedisplay
changes automatically

Change-Id: Ia47fc127232c2bb3b6634b55712060a919f8c9c1
Signed-off-by: Joey <joey@lineageos.org>
2018-02-11 20:22:13 +01:00
Luca Stefani
38b21a6648 sdk: Cleanup PerformanceManager
* Remove per-app profiles support
* Remove cpu boost support

Change-Id: I37e7473f8df1d08a69bc9274ae356dc1133811db
2018-02-08 17:33:54 +01:00
Sam Mortimer
c7a8ed54b5 lineage-sdk: DnD light brightness control for battery and notifications
*) Support separate normal and dnd led brightness levels for battery
   and notifications.

*) Move lineage-specific notification bundle extras definitions from fw/b
   to LineageNotification here in the sdk.

*) In addition to the existing bundle extra EXTRA_FORCE_SHOW_LIGHTS, add
   a new extra EXTRA_FORCE_LIGHT_BRIGHTNESS that can be used to override
   the brightness level set by a Lineage system setting brightness level
   on a per notification basis.  This is used by the brightness sliders
   in LineageParts that otherwise would have to juggle changing / restoring
   the system led brightness setting whenever the a slider is on display.

*) Disable all lights in dnd mode when lineage setting ZEN_ALLOW_LIGHTS
   is set to 0.

Change-Id: I917f402a291682b582f68c8324a33c461357dad9
2018-01-25 20:38:10 +00:00
Michael Bestas
d3907794a6 lineage-sdk: Remove MediaRecorder API
* Last used in cm-13.0 for cyngn purposes

Change-Id: Ie5aa8b224c29f2d716489cf7a7eb2dfe2d8a3bbf
2018-01-24 02:43:13 +02:00
Michael Bestas
e54c07d4ed lineage-sdk: Remove alarm clock API
* Last used/implemented in cm-13.0 DeskClock

Change-Id: I9db1a72e29fd2ce232f7cad69ee9b5a6fadfa5de
2018-01-24 02:43:12 +02:00
Michael Bestas
861ba2d874 lineage-sdk: Remove lineage telephony service
* Used for old MSIM API which is non-functional since a while

Change-Id: Ica2b9ae119d5972e425082433df3a7b099ae404a
2018-01-24 02:43:12 +02:00
Michael Bestas
99fba21024 lineage-sdk: Remove lineage status bar service
* Used for CM tiles API which is long dead

Change-Id: I66e8b57c035584aff5a4f5123388a4881e853a8f
2018-01-24 02:43:12 +02:00
Michael Bestas
60aa859cbe lineage-sdk: Remove app suggest feature
Change-Id: I60280aba6694da744e234ff5f2b9fd252da68908
2018-01-24 02:43:12 +02:00
Michael Bestas
dc1731e1dd lineagehw: Remove thermal monitor feature
Change-Id: I8422858634a2518b84efc56b24f2ace37f38724a
2018-01-24 02:43:12 +02:00
Michael Bestas
19d8afb7e6 lineagehw: Remove persistent storage feature
Change-Id: I286735192cf3f688980645efa7c1ba057fa825ca
2018-01-24 02:43:11 +02:00
Michael Bestas
d66c37c8d3 lineagehw: Remove tap to wake feature
Change-Id: I43e505b12b67eaad37a314a754d635988b8dee5e
2018-01-24 02:43:11 +02:00
Michael Bestas
d85907768c lineagehw: Remove unique device ID feature
Change-Id: I99aae7716e1b54e5ee2b6cb59ca75573126ffec4
2018-01-24 02:43:11 +02:00
Michael Bestas
e613b863ec Initial regeneration of Lineage SDK API level 8
Change-Id: I0644c56c6913497521946d5e658fd72aa9df53fa
2018-01-02 19:38:46 +00:00
Sam Mortimer
3c54d58691 lineage-sdk: Support requiresConfig integers and add requiresConfigMask
*) Add support for integer requiresConfig resources (previously supported
   only strings and bools).  Preference is removed if the int is 0.

*) Add a new attribute requiresConfigMask that takes a string decimal int.
   If requiresConfig is an integer then the pref is removed if
   (requiresConfig resource value & requiresConfigMask value) == 0.
   If requiresConfig is not an integer type then requiresConfigMask
   is ignored.

*) Code clean-up for the rest of checking requiresConfig.

Change-Id: Ic2622809c02a94d9cecf6f59ed6e689fdb835458
2017-10-24 22:52:07 -07:00
Adrian DC
af41414b76 Multiple LEDs [2/2]: Remove feature support
* The feature was used only on Huashan since 2015

 * It serves only for a small part of the users
    who wanted to restrict to one light instead
    of three lights from the LEDs bar

 * Due to Oreo's new HIDL interfaces stack,
    the additional data holder would need
    a custom lights interface which is useless
    for a single device and a rare use case

Change-Id: Ie08a1d625c7ce00fefff5bc1159522207be69dbc
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2017-10-14 14:18:27 +02:00
Sam Mortimer
52fb606687 Remove ThirdPartyKeyguard
Change-Id: Ie3717b9ea7a23988ebd646ed7e2fe8f105a4a693
2017-10-12 21:54:21 +00:00
Sam Mortimer
68d668ef53 Remove KeyguardExternal
Change-Id: I58156b2cd17aac706d1567cbaf650f5c0bad5860
2017-10-12 21:53:42 +00:00
Sam Mortimer
ae2d7e15ce Remove PartnerInterface and LiveLockScreen
Change-Id: I8044de599ef6db8e9a1ff63e43dc2cea9c28d02a
2017-10-12 21:53:02 +00:00
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