This reverts commit 027b615325.
While it served its original purpose, this was causing bad side-effects
when using our constraints (verified at least with requiresConfig and
requiresAction). Moving the reap to onAttached was rendering self-removing
prefs useless because if the view isn't loaded yet, the preference
(which also doesn't yet exists) can't really be hidden.
Change-Id: Ic61fe4b9979412d89c55ea1543c494e69bf6eab7
Adapted from the following in order to fit
into lineage-sdk (LuK1337):
Settings: Add LineageOS Updater
https://review.lineageos.org/191270
Change-Id: Ifce9da06b82075f1152d939f77a455f003879501
Migrate frameworks/base lineage feature
code handling to lineage-sdk.
*) Settings observation and most lineage lights
feature specific code has been moved to the
lineage-sdk.
*) Battery frameworks services call out to the
sdk to allow our features to make changes to
lights values.
Based on the commits:
Author: DvTonder <david.vantonder@gmail.com>
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date: Mon Nov 4 00:57:51 2013 +0000
Framework: Port CM9 features to CM10
Change-Id: Ibd63116df90b06f6ce6adb8a0343059bbb999bfb
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date: Sun Dec 8 15:24:41 2013 +0700
BatteryService: fix FC on boot until battery stat is present
updateLightsLocked() can be called from CM's added SettingsObserver
when battery stat is not present, causing an FC and a loop until
battery stat is present.
Change-Id: Ic4438fe50e98f1aa05ae1d0d26240bf9410fd92f
Author: Sam Mortimer <sam@mortimer.me.uk>
Date: Tue Dec 31 16:22:05 2013 -0800
[2/2] Framework: instant led test
Adds support a new notification extra boolean
EXTRA_FORCE_SHOW_LIGHTS. Used by settings
notification light picker to force lights on
when the screen is on.
Change-Id: If0a42d32b28fe8c02ef5f7dd148db7eb478fac17
Author: Michael Bestas <mikeioannina@gmail.com>
Date: Mon Aug 18 04:56:28 2014 +0300
Add support for single color notification LED (1/2)
Change-Id: I367af77036da9e87c6dd0df552ce4c56d945a44d
Author: Danesh M <daneshm90@gmail.com>
Date: Thu, 12 Nov 2015 10:52:11 -0800
Framework : Move System settings to CMSettings
Change-Id: I4e9fb06db7b9ba05e4a7bbe11916bb2271af4727
Author: Adnan Begovic <adnan@cyngn.com>
Date: Mon, 9 Nov 2015 16:26:00 -0800
fw: Move battery light settings to CMSettings.
Change-Id: I28e60473356b2a9af152df82d34ad7abc9918682
Author: Steve Kondik <steve@cyngn.com>
Date: Thu Sep 24 11:27:59 2015 -0700
lights: Automatically generate an LED color for notifications
Change-Id: I7288e52499819a6a6c75ed9d9ba7cfa1b13c5669
nms: Only generate LED colors if the device has a multicolored LED
* Check the overlay value before doing any of this stuff.
Change-Id: Iedfceba6bfc86b2761d8af57ecab51026bfa4c19
Change-Id: I7288e52499819a6a6c75ed9d9ba7cfa1b13c5669
Author: Adrian DC <radian.dc@gmail.com>
Date: Sat Oct 14 23:08:47 2017 +0200
fw: Rebrand to LineageOS and cleanup for Android Oreo
Change-Id: I21d424433bb52a17eea7974c4ea29a3a16fe1be5
Author: AdrianDC <radian.dc@gmail.com>
Date: Sat Jul 18 12:20:51 2015 +0200
Lights with Screen On [1/2]: Optional allowment of lights
Change-Id: I2071147d8ddab80ba0e1e7310e785ac3e03b3c7c
Lights with screen on: Don't disable leds after the lockscreen
Change-Id: If8f5b867a34be09fb061bb7ad040b16730f4e263
Framework : Move System settings to CMSettings
Change-Id: I4e9fb06db7b9ba05e4a7bbe11916bb2271af4727
fw: Rebrand to LineageOS and port for Android Oreo
Change-Id: I65cfeb659fe516ef43aa84b1c6d2eb6876df202a
Change-Id: If8f5b867a34be09fb061bb7ad040b16730f4e263
Author: Michael W <baddaemon87@gmail.com>
Date: Mon Oct 9 22:04:00 2017 +0200
Core: Battery warning levels are inclusive, not exclusive
Change-Id: Ib35b154b6117f7e26b4a3a5aee9254dda3adda12
Author: Adrian DC <radian.dc@gmail.com>
Date: Sat Oct 14 23:08:47 2017 +0200
fw: Rebrand to LineageOS and cleanup for Android Oreo
Change-Id: I845f866891386aee808a4e7e80f4ab7c3ad48830
Change-Id: I13fcb1e16756a8008d0850050e0b09ab0b92a56f
Migrate frameworks/base lineage feature
code handling to lineage-sdk.
*) Settings observation and most lineage lights
feature specific code has been moved to the
lineage-sdk.
*) Battery frameworks services call out to the
sdk to allow our features to make changes to
lights values.
Based on the commits:
Author: DvTonder <david.vantonder@gmail.com>
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date: Mon Nov 4 00:57:51 2013 +0000
Framework: Port CM9 features to CM10
Change-Id: Ibd63116df90b06f6ce6adb8a0343059bbb999bfb
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date: Sun Dec 8 15:24:41 2013 +0700
BatteryService: fix FC on boot until battery stat is present
updateLightsLocked() can be called from CM's added SettingsObserver
when battery stat is not present, causing an FC and a loop until
battery stat is present.
Change-Id: Ic4438fe50e98f1aa05ae1d0d26240bf9410fd92f
Author: Sam Mortimer <sam@mortimer.me.uk>
Date: Tue Dec 31 16:22:05 2013 -0800
[2/2] Framework: instant led test
Adds support a new notification extra boolean
EXTRA_FORCE_SHOW_LIGHTS. Used by settings
notification light picker to force lights on
when the screen is on.
Change-Id: If0a42d32b28fe8c02ef5f7dd148db7eb478fac17
Author: Michael Bestas <mikeioannina@gmail.com>
Date: Mon Aug 18 04:56:28 2014 +0300
Add support for single color notification LED (1/2)
Change-Id: I367af77036da9e87c6dd0df552ce4c56d945a44d
Author: Danesh M <daneshm90@gmail.com>
Date: Thu, 12 Nov 2015 10:52:11 -0800
Framework : Move System settings to CMSettings
Change-Id: I4e9fb06db7b9ba05e4a7bbe11916bb2271af4727
Author: Adnan Begovic <adnan@cyngn.com>
Date: Mon, 9 Nov 2015 16:26:00 -0800
fw: Move battery light settings to CMSettings.
Change-Id: I28e60473356b2a9af152df82d34ad7abc9918682
Author: Steve Kondik <steve@cyngn.com>
Date: Thu Sep 24 11:27:59 2015 -0700
lights: Automatically generate an LED color for notifications
Change-Id: I7288e52499819a6a6c75ed9d9ba7cfa1b13c5669
nms: Only generate LED colors if the device has a multicolored LED
* Check the overlay value before doing any of this stuff.
Change-Id: Iedfceba6bfc86b2761d8af57ecab51026bfa4c19
Change-Id: I7288e52499819a6a6c75ed9d9ba7cfa1b13c5669
Author: Adrian DC <radian.dc@gmail.com>
Date: Sat Oct 14 23:08:47 2017 +0200
fw: Rebrand to LineageOS and cleanup for Android Oreo
Change-Id: I21d424433bb52a17eea7974c4ea29a3a16fe1be5
Author: AdrianDC <radian.dc@gmail.com>
Date: Sat Jul 18 12:20:51 2015 +0200
Lights with Screen On [1/2]: Optional allowment of lights
Change-Id: I2071147d8ddab80ba0e1e7310e785ac3e03b3c7c
Lights with screen on: Don't disable leds after the lockscreen
Change-Id: If8f5b867a34be09fb061bb7ad040b16730f4e263
Framework : Move System settings to CMSettings
Change-Id: I4e9fb06db7b9ba05e4a7bbe11916bb2271af4727
fw: Rebrand to LineageOS and port for Android Oreo
Change-Id: I65cfeb659fe516ef43aa84b1c6d2eb6876df202a
Change-Id: If8f5b867a34be09fb061bb7ad040b16730f4e263
Author: Michael W <baddaemon87@gmail.com>
Date: Mon Oct 9 22:04:00 2017 +0200
Core: Battery warning levels are inclusive, not exclusive
Change-Id: Ib35b154b6117f7e26b4a3a5aee9254dda3adda12
Author: Adrian DC <radian.dc@gmail.com>
Date: Sat Oct 14 23:08:47 2017 +0200
fw: Rebrand to LineageOS and cleanup for Android Oreo
Change-Id: I845f866891386aee808a4e7e80f4ab7c3ad48830
Change-Id: Ic4c9c5f5602515ccbc2c6b8b10bcf3d2c6e34b4b
*) Moved lights capabilities from frameworks/base
NotificationManager to the lineage-sdk.
*) Add device has a battery light LIGHTS_BATTERY_LED capability.
Adapted from the original frameworks/base commits:
Author: Ricardo Cerqueira <android@cerqueira.org>
Date: Thu Nov 10 12:15:00 2016 +0000
NotificationManager: Concentrate LED light capabilities in a single location
We have a bunch of individual boolean toggles for various LED behaviors
and combinations, which end up getting used as a similarly sprawling bunch
of getResource() calls across various locations. And they keep piling up...
So... create a new overlayable bit field of LED capabilities,
config_deviceLightCapabilities, where we can throw everything
and expand in the future. Remove the obsolete overlays so that
everyone uses the new overlay moving forward.
Change-Id: I7d627914b058861048071fc15776031c4152157f
Author: Adrian DC <radian.dc@gmail.com>
Date: Sat Oct 14 23:08:47 2017 +0200
fw: Rebrand to LineageOS and cleanup for Android Oreo
Change-Id: If7468759925d1636adad1c253d68b5adbc6dfb26
Change-Id: Ib14badcc0a2ad165610dd7d0e90388170e1cd548
*) Eliminates visibility of the pref removal. You could previously
see vertical movement of text during initial display of replaced
prefs.
*) In addition, when reaping, use setVisible(false) instead of
removePreference. Otherwise, array out of bounds index exceptions
occur in frameworks pref support libraries (as a result of moving
from onBindViewHolder to onAttached).
Change-Id: I1a0045552572a590f89715f8d94156eddaaec469
*) 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
This got removed unintentionally by:
Author: Sam Mortimer <sam@mortimer.me.uk>
Date: Wed Oct 11 23:00:18 2017 -0700
Remove ThirdPartyKeyguard
Change-Id: Ie3717b9ea7a23988ebd646ed7e2fe8f105a4a693
Add back the lock util methods from the original commit:
Author: Danesh M <daneshm90@gmail.com>
Date: Mon Feb 8 14:57:31 2016 -0800
CMSettings : Add option to pass swipe-up-to-unlock (3/3)
CYNGNOS-1873
Change-Id: Icdd2505dbc56a77f49a76ea61daf75c5d8a24fd6
Change-Id: I6177700be955f42505dbd5fbb23461f8e151e1b4
* 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>
It's no longer used anywhere and has a dependency
on frameworks code that we don't want to add to
lineage-15.0.
Change-Id: Ib25bc214df658e7576e63c73a9c23b7e87ea71d8
*) Move it here so that external/uicommon can be
deprecated.
Origial uicommon StopMotionVectorDrawable.java history:
Author: Adrian DC <radian.dc@gmail.com>
Date: Fri Oct 28 10:55:25 2016 +0200
uicommon: Fix getAnimatorSetViaReflection UI usage
* The receiver can be an instance of VectorDrawableAnimatorRT
instead of VectorDrawableAnimatorUI since AOSP 7.x,
therefore call the forceAnimationOnUI method to ensure
mAnimatorSet is an instance of VectorDrawableAnimatorUI
* Change introduced in "Support running AVD on UI thread",
frameworks_base: I372ecd3dc52e3fa0bdce3a1e9c19443f9b199027
Change-Id: Ie00c86474f38600b4f10889e292b20a8f7e6531e
Signed-off-by: Adrian DC <radian.dc@gmail.com>
Author: Steve Kondik <steve@cyngn.com>
Date: Wed Oct 12 17:02:17 2016 -0700
uicommon: Fix StopMotionVectorDrawable for N
* The guts of AVD have changed in N, adjust hacks accordingly.
Change-Id: Ia28c3099389252a3fd57373e02800fee9d467f64
Author: d34d <clark@cyngn.com>
Date: Wed May 4 08:59:27 2016 -0700
Add StopMotionVectorDrawable to uicommon
The StopMotionVectorDrawable provides control over the position
within an animation set of the warpped AnimatedVectorDrawable.
Change-Id: I586c54c7dbd5c9f6f373a87e544bc0669f4ba8f1
Change-Id: I868a852e6c5f6f1ab7926deeb109fc68ad4449da
As per similar changes made in
frameworks/base/core/java/android/provider/Settings.java
Whilst not strictly necessary, also renamed
SELECT_VALUE to SELECT_VALUE_PROJECTION
as it is now named in frameworks.
Original AOSP change here:
ea93fe7539
Change-Id: Ib79bdc9a9c1f45d5f8405c7ecea30f68652f2839
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
Use the same base theme used for Settings so that our preference
tiles look like the default ones (e.g. add ripple effect).
Change-Id: I27a5569535d8d614a0c0d26dd5b9fcd12f2af1e4
AOSP recently introduced a new power hint, POWER_HINT_LAUNCH,
to indicate the start-up of an activity.
We now use that instead of using our own.
Change-Id: I3ed1ae52a67da37e87a46ca5cc5411de95f00926
Issue-Id: LINN-6
- We might get see attach() calls from multiple prefs, so stop assuming
there's only one per key. Namely, a new activity might be created and
attached before the previous one is destroyed
- The passed-in context is likely to be an activity one. As the manager
instance is static, this can cause leaks and the receiver might be
attached to a destroyed activity. Just hold onto the application
context instead, which is a singleton anyway.
Change-Id: Ica17c19ab6e1cdfd402968ce2594d3ed362e23ee
JIRA:LINN-3
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
Many new devices have available flip cover cases with some form
of view window or notification options. Currently we support a
dotcase app for HTC and a View window app is under development.
Provide a new Intent to allow a common way to launch a variety
of device specific cover apps.
Change-Id: Ic986b239b75bfc6d76142451826b3f996e242a29
* Hiding the clock is now possible using the icon blacklist.
* Since the the hide option in the clock position tunable
isn't currently implemented let's remove it
Change-Id: I2412051289a922dfc72cdf266b47f32cf7aaa31a
* Hotspot is not assigning DHCP addresses correctly if enabled
through the profiles codepath using WifiManager.
Change-Id: I9b67748d1b51c873864cf11f9240372e367a0c53
* The preferences constraints system uses reflection to look up
fields via strings, we need to ensure they are not optimized
out by Proguard. Alternatively we can manually enumerate them,
but it's yet another list of constants to maintain. We should
have used a proper enumeration to begin with, but so it goes.
* The @VisibleForTesting annotation is honored by the platform for
ensuring that Proguard doesn't stomp fields. The support library
has an @Keep annotation, but it's only supported by Gradle. If
it becomes supported by the platform in the future, switch to
it instead.
* Also add tests for all of this.
Change-Id: I9f324e003e2a9de5604085b978d5f95bdd098d32