Commit Graph

878 Commits

Author SHA1 Message Date
LuK1337
dee3258356 LineageNotificationLights: Don't create KeyguardManager in constructor
* Apparently creating it so early can cause serious breakages
  that make StorageManagerService and UsbDeviceManager end up
  getting null pointer when trying to get KeyguardManager with
  ctx.getSystemService(KeyguardManager.class).
* Moving ctx.getSystemService(KeyguardManager.class) out of
  constructor to isKeyguardLocked() solves these issues.
* Also move to getSystemService(Class<T>) while at it.

Change-Id: Ib3f65ba2e726149089ab1fb12030321e0ecdeab1
2018-08-25 20:58:11 +02:00
Rashed Abdel-Tawab
3cc3d4d2ad lineage-sdk: Update attr.xml for aapt2
*) the sdk is now using aapt2

*) aapt2 is unhappy with "lineage:..." name attribute value format
   (errors with invalid character).
   
*) update in a way that aapt2 is happy with

Change-Id: I96ecc14c4a6de00272a5ad4f513b62f21289ac45
2018-08-22 23:35:17 +02:00
Bruno Martins
1349d295fc StyleInterfaceService: Adapt to new PackageInfo API
Required after e7334975bb (diff-4264e02219a4057f56cc84a0d169539dL401)

Change-Id: Ic2e65602308201566a47a4169317b6a9ea0b523d
2018-08-21 22:07:16 +02:00
Sam Mortimer
5859513f89 lineage-sdk: Use java.utils.Objects instead of libcore.util.Objects
Most methods in libcore.util.Objects have been deprecated:
44b7f98da7

Change-Id: I91bdd0c9756da153f167c80fe6d85fea7717a5da
2018-08-21 22:06:42 +02:00
Sam Mortimer
1b011d4a52 lineage-sdk: ServiceType moved from BatterySaverPolicy to PowerManager
Change-Id: I173dc43df20286d82b7e8dccb33bc8cb58d66fb6
2018-08-21 22:06:09 +02:00
Sam Mortimer
d6ad885944 lineage-sdk: update lineage_platform_res for pie
intermediates are now put in different subdirs depending
on what generated them.

Change-Id: I1c276bb6156162d02904721c8c0aee9d5c065c83
2018-08-21 13:30:25 +01:00
Sam Mortimer
6cf6ab3c9b lineage-sdk: Add libnativehelper includes
Change-Id: I349d0d5b589bba0d690e2818ce053b4974de375f
2018-08-21 13:30:25 +01:00
Sam Mortimer
1e5a24c4cc lineage-sdk: Remove proguard shrinktests
Removed by:
e4936e1c2d

Change-Id: I3c0fe281fa06839a620a47402b72fc653b6ee037
2018-08-21 13:37:50 +02:00
Sam Mortimer
283ab86554 lineage-sdk: Set LOCAL_PRIVATE_PLATFORM_APIS := true
Change-Id: I06b9374ccee78550fcc26d876a9e4ea50198bbfe
2018-08-21 13:36:14 +02:00
Michael Bestas
97ea255ee0 Automatic translation import
Change-Id: I9f372825afbc8586bed6725631946c84b3d893b1
2018-08-19 19:22:09 +02:00
Tim Schumacher
0f4766ffec Regen lineage_current
*) setGrayscale was removed here:
505580e2dd

Change-Id: If075a093e4e00ab845cd817966df041f5dba71d3
2018-08-16 22:47:25 +02:00
Paul Keith
505580e2dd sdk: Rework reading mode API
* The current API makes no sense, and doesn't really
  fit with how the other boolean features work
* While we're at it, place AutoContrast properly

Change-Id: I81d7805411c281e435c7451c0b62689711dbb323
2018-08-08 19:38:32 +02:00
Michael Bestas
39986a0a65 Automatic translation import
Change-Id: I6f79248cd97a10a576469b03d2752578efead469
2018-08-05 17:33:51 +03:00
Paul Keith
c2a5d543b8 sdk: Allow controllable brightness for non-RGB segmented battery LEDs
* For non-RGB segmented battery LEDs, we currently don't allow any kind
  of brightness control, because the alpha channel is taken up by the level
* To remedy this, set the brightness in the color channel like we do for
  setting panel backlight brightness by setting the brightness as R/G/B

Change-Id: I4e47861643e0b2b8766af0f2ff275069fc580108
2018-08-04 01:23:37 +02:00
LuK1337
e03fab80d2 sdk: Add minimal LineageSettingsService
* This service is currently used for loading custom hostname,
  it may be used for more than that in the future.

Change-Id: I9b4da124b54bdc28544becb2ad25b7b43d46f123
2018-08-02 17:30:35 +02:00
LuK1337
59ec383e3a Import preference class for custom hostname feature
Change-Id: I85383db3583eba75f675ad5e4a4be1379c012ef6
2018-08-02 17:30:35 +02:00
Paul Keith
c15ceb2352 sdk: Make smarter low-power display mode choices
* Keep CABC in low-power mode, it helps save battery
* Keep ACO in low-power mode, it helps save battery
* Only disable color enhancement if it's not the default,
  because some devices *need* color enhancement enabled

Change-Id: Id8c47bdf06782d783e175cd679847c227f3b3636
2018-07-27 03:02:49 +02:00
Luca Stefani
67da139fbb sdk: Add an overlay to specify notch presence
Change-Id: Ia6a39484a45c2bbe300d9cf905999d405d11aa22
2018-07-26 21:43:33 +02:00
LuK1337
9a5742fc33 sdk: Add default setting for clock position
* Will be used by devices with notch.

Change-Id: Ie2af3f4741637656054d97ecbb5f20553c6001fd
2018-07-26 21:43:26 +02:00
Michael Bestas
f7bc969830 Automatic translation import
Change-Id: I1cd7a1ca0ffb8972dff3c9b82df1f90ec64569bc
2018-07-22 17:49:57 +02:00
Tobias Tefke
5e5f905802 [2/2] Add vendor security patch level to device info
Change-Id: Ic65290aa2c5fa159512e16a3781bc407876b9e5a
2018-07-20 13:00:25 +02:00
Luca Stefani
c670140492 ProfileManager: Make PROFILE_SELECTED broadcast explicit
Ref: BUGBASH-1969
Change-Id: I698e047f1130974a75e5e6404a13f619f57bb707
2018-07-15 21:53:33 +02:00
Joey
0efe50d196 styles: do not enforce permission when it's not needed
Matches the javadocs now

Change-Id: I3e4c8b0ff118a55a0c082310e82752f1d9f2988b
Signed-off-by: Joey <joey@lineageos.org>
2018-07-14 14:55:12 +02:00
Michael Bestas
a737bf4dc6 Automatic translation import
Change-Id: Iad6abad38bba63bcd43b5e9f6d7b82ece0c7fab1
2018-07-09 22:03:57 +03:00
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
Luca Stefani
55962105cf Regen lineage_current
Change-Id: I47ceb8f40998be70489f61513e3d980fad47e7f4
2018-07-02 10:10:34 +02:00
Michael W
fcf9ab5461 lineage-sdk: Introduce TelephonyExtUtils
Change-Id: Ifdd18dd6e89e23c5b804c3454ee8473a5920b562
2018-06-28 15:28:11 +02:00
Adrian DC
6fb50762ee NetworkTraffic: Resolve status bar indicators tints
* Apply the color tint with PorterDuff.Mode.MULTIPLY
    as the original color is white, with transparencies

 * Use the DarkReceiver tint's value as icons tint

 * Results: Before and after: https://ibb.co/k15ony

 * Test: Bright wallpaper with status bar contrasts:
    https://ibb.co/dxupSy

Change-Id: I4f31cf5a9a3db4018543603a891fa7967ccbb4a3
2018-06-26 00:47:17 +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
Bruno Martins
285d9d6dbe LineageBatteryLights: Fix brightness for devices with segmented leds
* In case mCanAdjustBrightness was false, the brightness level would
   always be set to the maximum value.

Change-Id: I034bc17ac1174c491830f0a6cb1969a99ee900a7
2018-04-26 18:52:26 +02:00
Bruno Martins
bd4ca1f551 LineageBatteryLights: Take current user settings into account
Change-Id: Ie99c14a73c14e1f5b6c39125625153f2628f884d
2018-04-26 15:13:35 +01:00
Bruno Martins
89eb3d49de LineageBatteryLights: Rename some class members and add more debugging
* Follow LineageNotificationLights debug logic

Change-Id: I6b4a91db45a119c8c0b8b30684386765b73b93d2
2018-04-26 15:13:04 +01:00
Michael Bestas
8f7a4559ab lineage-sdk: Allow adjusting brightness of non-RGB LEDs
* Mimic LineageNotificationLights logic

Change-Id: Ifc0c899ef78dbdec22fa69ecd0bcffe1a9488afe
2018-04-22 03:22:14 +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