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>
*) Allows us to cater for the case where the notification led is turned off
and yet the user wants to adjust battery light settings (which requires
posting led notifications to illustrate the change).
Change-Id: I24d128d796a44f5b3e9051d441427cc19e2a3822
*) Android docs say this is required.
*) Fixes generating alert color from oreo gmail app (and probably
many others).
Change-Id: Iad9a8ea82531c1cf844fae5456fd998a4b486165
*) fw/b now sets the color to 0 to indicate that we need to set
a default (to cover Oreo+ sdk where DEFAULT_LIGHTS has been
deprecated).
Change-Id: I91b7cfff2ea6f8c1b999b6246c14416a2a47cbfb
Throwing an exception leads to rescueMode in oreo
Change-Id: I9c4cb7af8cae51936f439641b79ae522c84eaaee
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
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>
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
*) Introduce LineageStatusBarItem class that contains interfaces
and utility methods that can be used by status bar items that
that are hosted here in the lineage-sdk in order to communicate
with systemui.
*) Nested interface: Manager
Implemented by layout view LineageStatusBarItemHolder in systemui.
Contains methods that are used to request receipt of certain
systemui events.
*) Nested interface: DarkReceiver
Can be used to listen for systemui DarkReceiver events.
*) Nested interface: VisibilityReceiver
Can be used to listen for changes in visibility of a statusbar item.
Works even if the statusbar item sets it's own visibility to GONE.
*) Util method: findManager(View v) walks up through parent views to
look for something that implements Manager.
*) Systemui side that provides a layout that implements Manager:
https://review.lineageos.org/#/c/202265/
Change-Id: Ie237db5bfac9994b87de39372505cd61c39d89ee
*) Migrate database from cmsettings.db to lineagesettings.db
*) Remove old CMSettingsProvider.xml shared_prefs.
*) Remove the code to disable the PreBootReceiver component.
PackageManager is not yet ready for component lookups when
LineageSettings is called during fw/b service startups.
However, the preboot intent is only sent when the build
fingerprint changes so disabling it doesn't really buy us
anything. We also track and check migration state in
sharedPrefs anyway.
Change-Id: I636f8315ce8a36f6d223d6a5accfe11c40ef9570
*) 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
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
*) 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
This class will be the new home for all the buttons logic currently
in fw/b. Currently, it only implements the "long press volume keys to
skip" feature.
Based on the following commits from cm-14.1:
commit 1296fb316946ca1361b2d32557b6c9e028f509c8
Author: Dark Eyes <dark_eyes_@hotmail.com>
Date: Sat Nov 5 12:09:31 2016 -0400
Fix long press volume buttons skip tracks
Without that patch, the volume changes up or down prior
to skipping tracks because the sendvolumekeyevent doesn't
have the mayChangeVolume condition. Also, that part is
useless cause the mUseTvRouting condition is taken care
of correctly later.
Change-Id: I88757315f135f013e7692861d46b3a07fbfc07d5
commit 61cebe2fea95f799b7b4edc540f6c38d3c13fbde
Author: Michael Bestas <mikeioannina@gmail.com>
Date: Thu Dec 18 14:43:22 2014 +0200
Fix volume key music controls and wake up
- Forward port code from cm-11.0 and adjust for 5.0
- Fix not being able to adjust volume when music control is on
- Disable screen off volume/music control when wake key is enabled
Change-Id: Ie0ad83965c41fd33120490c25a4ff3d9b2cbeb37
commit f41ba8af1796b4903dba3d134e56e8148f3b4808
Author: Austin T. Conn <atc3030dev@gmail.com>
Date: Wed Dec 17 13:28:00 2014 -0500
Settings: Forward Port Volume Long Press Skip Tracks (1/2)
Bring Forward Volume Rocker Track Change
Requires Settings Change
http://review.cyanogenmod.org/#/c/82222/
Change-Id: I70b00e08fe48707110725dd1daa56b1e48d15a03
Change-Id: I5c7f733913242bba822cf3f9f7e1e3320c2bedf7
* Used to "live" in fw/b since ever, but will be here from now on.
* This also brings AOSP configs (config_longPressOnHomeBehavior and
config_doubleTapOnHomeBehavior) to the SDK since those are being
extended, putting everything in one place.
* Long pressing home button will now default to launch assistant
and menu button to open recent apps, leaving the past behind.
Change-Id: I0ca2b2cf9a565a334c3edf19a978fa6d2c4d2ea3