Commit Graph

73 Commits

Author SHA1 Message Date
Joey
a37b3cd4e5 styles: add support for more dark overlays
Change-Id: If9e08ba8ff28cff7a4061a6b6cea10d5fe38a541
Signed-off-by: Joey <joey@lineageos.org>
2018-07-08 17:02:36 +02:00
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
Tobias Tefke
fa05f27ad7 Trust: warn if build is signed with insecure keys
Change-Id: I1d58e232ed99dfe7e2addb651c114c1068e64105
2018-06-26 00:27:09 +02:00
Michael Bestas
b51402703f Automatic translation import
Change-Id: I1e864fd7e123826117d996ffb688927379f28597
2018-06-18 23:28:45 +03:00
Adrian DC
c24f696231 TrustInterface: Handle unsupported encryption state
* Some devices might return unsupported, therefore
    explicitly label this state as bad

 * Also applies for special situations where encryption
    is essentially impossible, like booting with
    MultiROM from an external storage

Change-Id: I7752933bad05bf8c67f5ca0d3fba7c5b38833c87
2018-06-16 21:54:07 +02:00
Joey
a7d7651106 Trust: add action to disable alerts to notifications
Change-Id: I39c60e87e511819aaac82e104d6495f363ccef0d
Signed-off-by: Joey <joey@lineageos.org>
2018-06-13 11:18:29 +02:00
Jesse Chan
5bfb5fafa6 sdk: Add an option to force pre-O apps to use full screen aspect ratio
When an app target pre-O releases, the default max aspect ratio
is 1.86:1 which leads to ugly black areas on devices that have
screens with higher aspect ratio (for example Galaxy S8/S9).

This change adds an option to allow users to change aspect ratio
for pre-O apps to full screen aspect ratio.

Change-Id: I2531542f736ee7b809ef7faffd72e5963e7d20d6
2018-06-12 00:45:46 -07:00
Luca Stefani
1ae78cedd4 TrustInterface: Remove useless check
* It's done in onStart

Change-Id: Ib31819e881159b2fff580f3fa87f0d5da2d8bd7f
2018-06-10 15:44:47 +02:00
Luca Stefani
aa8e55456d TrustInterface: Fix default root access value
* On clean installs persist.sys.root_access is empty

Change-Id: I99fe87ebcfe53915c663244023486cf3698af24c
2018-06-10 15:44:17 +02:00
Luca Stefani
498ea963e1 Fix config.xml indentation
Change-Id: I58a597ed00bc3b9fc8406aefd65d418afcd9cfa3
2018-06-10 11:52: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
Arne Coucheron
f13838a099 Revert "lineage-sdk: Switch back to AOSP TwilightService"
* Causing issues on several devices, with that the GPS gets stuck in
  ON state and can't be turned off
* No timezone fallback

This reverts commit cac65b8972.

Change-Id: Ie9b0249a1e6f94c374e90f89f49d506b1ec6c50d
2018-06-06 08:00:50 +02:00
Sam Mortimer
e703ff0a0b Add led capability LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS
*) Many existing liblights support notification brightness
   control via the alpha channel but do not support similar
   for the battery led.

*) 8f7a4559ab
   introduced a dependency on light capability
   LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS such that, when
   set, it was assumed that the battery led brightness is
   also liblights adjustable.  It turned out that this
   was not the case.

*) Create a new capability to allow devices to distinguish
   whether their liblights supports adjustable brightness
   control for notification and battery leds independently
   of one another.

*) Document how brightness support works in LightsCapabilities.

*) Copy LightsCapabilities comments to the default lights config
   to raise visibility.

Change-Id: Id95905f07128c78c6acacf3b60d71bb37f70bcfb
2018-06-05 20:26:52 +02:00
Michael Bestas
506bef406e Automatic translation import
Change-Id: I4c2317a017fb1c58b9b490e4e9e9e05bec1275de
2018-06-03 14:10:28 +03:00
Rashed Abdel-Tawab
18fd692bbd lineage-sdk: Add backend for reading enhancement
Change-Id: Ibd1c9e057ddf8e9d21657aef0ebeeaa9a253e92d
2018-05-24 21:39:00 +02:00
Michael Bestas
ff242a26c1 Automatic translation import
Change-Id: I2ba6cf000f997a70900a390768321c9961b9bc14
2018-05-08 19:47:48 +03:00
Sam Mortimer
cac65b8972 lineage-sdk: Switch back to AOSP TwilightService
*) cyanogen@ forked a local copy of TwilightService in
   683c67fdd4
   However, the AOSP Twilight API is now much leaner and will continue
   to receive bug fixes which our local copy won't.  Therefore, switch
   back to fw/b TwilightService making changes to match the API as needed.

*) Refactor getTwilightK() now that yesterday, today, tomorrow sunset/sunrise
   values are no longer directly exposed by class TwilightState.  (And make it
   more readable at the same time.)

*) Return < 0 from getTwilightK() if a useful result couldn't be determined
   (eg lack of location) and update the caller so as not to try changing the
   temperature when this happens.  Previously, getTwilightK() would always
   return the day temperature on failure.

Change-Id: If1043435ccfee90fe5c892991d314009d13b33bb
2018-05-07 01:49:53 +02:00
Michael Bestas
da7aad6ea2 Automatic translation import
Change-Id: I900e08f5e60de36e0112582f368268ab2550ee9a
2018-04-20 00:56:24 +03:00
Paul Keith
e45961db1d sdk: Remove low power restrictions on color control
* We no longer support the GPU backed, power hungry, color
  transformations that this check was put in place for, so
  remove the restriction on color temp changes for low power
* This is desirable because low power situations happen often
  at times later in the day, when blasting users with blue
  light (for auto night mode) is undesirable, and because
  reducing the intensity of colors is more power efficient,
  at least for AMOLED displays

Change-Id: I6b78a3f626cff3387d2acafa9c73cdf6af208fef
2018-04-10 16:04:02 +02:00
Michael Bestas
a34e338626 Automatic translation import
Change-Id: Id5a6f4eb1afe35cb95416832a51c3c64aa4a3696
2018-04-01 22:33:09 +03:00
Joey
72bfc040c6 sdk: workaround for runtime-permission request dialog with GooglePackageManager
google's package manager uses the android:description
attribute as description for the runtime permission request dialog
with non-default dangerous permissions, so this would result in something like

"Allow <APP NAME> to _Allows an app to customize the system colors._ ?"

Let's change it to something more neutral so it can be used both as
in-settings description and for runtime dialogs

Change-Id: Iade57105a7af5d132a258fedadefe0f017fc4502
Signed-off-by: Joey <joey@lineageos.org>
2018-03-11 16:22:59 +00: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
Michael Bestas
d70eb3905a Automatic translation import
Change-Id: Ie12729572a5f5aff8198c4d642b895fafcbf2c10
2018-03-09 00:36:25 +02:00
Bruno Martins
a9afea70c3 lineage-sdk: Update the way OMS records details about overlays
Change-Id: If5c5988e32b9ee7bec129b60b8b13ee4772904b2
2018-03-05 22:11:22 +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
Ethan Chen
be65612e2a lineage-sdk: Add vendor platform signature overlay
Change-Id: I7e2daaaad194536d0e4fab4edcfb570d3038e10b
2018-02-27 05:19:36 +00:00
Michael Bestas
b68e02306a Automatic translation import
Change-Id: I5f0d7df148653f6f67f826c8ee4770dc19992d23
2018-02-25 22:04:41 +02:00
Michael Bestas
1c51c1c2e8 Automatic translation import
Change-Id: I8081d8983553a18b617b784ebbf8c8b0a27b511e
2018-02-22 03:50:39 +02: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
Joey
376449bca3 sdk: add accent names references
Change-Id: Ib7d68029cc6468c1c0b81a75da05025762290c17
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
dianlujitao
18337dc1da lineage-sdk: Reenable performance profiles
Change-Id: Ic179230f425747c360c4a0ce6a9d446ca2d97265
2018-02-08 14:37:58 +00:00
qjohn
f8eaf9f782 lineage: Fix LiveDisplay tile off color
* Should match other icons when disabled.

Change-Id: Ic745d71b0eef0fca68a63e9558a43c203334e819
2018-02-01 01:31:16 +02:00
Jon Haus
7ea84eb2f9 lineage-sdk: Add Network Traffic [2/3]
Changes made since the original implementation from older branches:

*) Forward-ported to Oreo and adapted to Lineage SDK (bgcngm).

*) Implement LineageStatusBarItem interfaces to receive visibility
   and color tint information (bgcngm / sam3000).

*) Move from fw/b to lineage-sdk (sam3000).

*) Increase refresh interval from 1s to 2s (sam3000).

*) Don't generate messages when the statusbar isn't visible (sam3000).

*) Allow for choice of unit to be kb/s or Mb/s (and kB/s and MB/s). This
   deprecates threshold selection for autohide (sam3000).

*) Add an option for whether units should be shown in the
   statusbar (sam3000).

*) Various other simplifications (sam3000).

*) Added vector drawables (courtesy of kover).

Change-Id: Ia5aadc3f03a7b434a047accbd7d53f4aa44c77fb
2018-01-28 03:52:35 +00:00
Michael Bestas
a9aeed9a58 lineage-sdk: Cleanup whitespace in resources
* Fixup after LineageOS rebrand and legacy features strip

Change-Id: If998f2c17402facb1724f7e2c58d968e4bf95b21
2018-01-24 02:43:13 +02:00
Michael Bestas
4496c7fb1c Revert "Add resources for WiFi customization"
* No longer needed, last used in cm-13.0

This reverts commit c972c0e85e.

Change-Id: I18d1256c97930c80240e27e52c493795c6f2c4f8
2018-01-24 02:43:13 +02: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
b1cf98bc03 lineage-sdk: Remove unused ManagedServices class
Change-Id: I87fb6d1cd46e7ad41dc6ccda8b8fdf7300b4f7fb
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
7c69dc97d8 lineage-sdk: Remove MODIFY_NETWORK/SOUND_SETTINGS permissions
* They were used in PartnerInterface

Change-Id: I0c20ff350e814e0a5953782dfa4491528baa14a1
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
d85907768c lineagehw: Remove unique device ID feature
Change-Id: I99aae7716e1b54e5ee2b6cb59ca75573126ffec4
2018-01-24 02:43:11 +02:00
Rashed Abdel-Tawab
a0e29562a2 lineage-sdk: Import power menu related classes
Different parts of the system need to check if advanced reboot is enabled,
so just move the method here and include it in said different parts.

The global actions constants also used to live in the frameworks, but as
they include our own additions and are also accessible by LineageParts,
place them here from now on.

Change-Id: Ic5a02b8118c702dced5a25d775a4cc84c92a3fc2
2018-01-21 00:29:08 +02:00
Sam Mortimer
e861b1d7f1 lineage-sdk: fix picture adjustment from depending on color balance
*) Fixes picture adjustment settings on a device that doesn't
   support color balance.

*) This was a day one bug.  Likely a copy and paste.

Change-Id: Idf3b0ac811906bbed8696a9a3744d0aaaa5140e3
2018-01-18 09:45:53 +00:00
LuK1337
c6d700a2fa lineage-sdk: Add kill app back button configs and strings
Change-Id: I867de293fc6e160a86a64d96035704d82b270f4e
2018-01-12 13:42:21 +00:00
Roman Birg
de846c64c3 lineage-sdk internal: Import ActionUtils class
Change-Id: Iab14009d7e26064c8c6b732cf22be90da3ef7f04
2018-01-12 13:42:21 +00:00