* 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
*) 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
* 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
* 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
* This service is currently used for loading custom hostname,
it may be used for more than that in the future.
Change-Id: I9b4da124b54bdc28544becb2ad25b7b43d46f123
* 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
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>
* 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
* 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
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
* 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
*) 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
*) 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
* In case mCanAdjustBrightness was false, the brightness level would
always be set to the maximum value.
Change-Id: I034bc17ac1174c491830f0a6cb1969a99ee900a7
* 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