Commit Graph

331 Commits

Author SHA1 Message Date
Aaron Kling
ce38f734e5 lineage-sdk: Add setting for atv two button mute
To allow volume up and down to mute

Change-Id: Iccc119605292983bc50de39f59af45e59116a685
2025-02-14 19:16:35 +00:00
Michael Bestas
b9be94a473 sdk: Get rid of lineageos.os.{Build,Concierge}
Change-Id: I7b781deb1330810caa193b822bcc02b9610e53b0
2025-02-10 18:13:48 +02:00
LuK1337
2b130050dd sdk: Support breath LED mode
Change-Id: I9ec757a784dc3fb3afcb6f909f10e2eee86502ea
2025-01-18 12:19:21 +01:00
Michael W
423cec2b12 sdk: A few finals don't hurt
And a few language features (HashMap constructors, collapsing
catch blocks, method references)
plus two typos

Change-Id: I9ae2f7c006c5f2f9c7c99eab81059c08bece1202
2025-01-04 13:44:39 +01:00
Michael W
28185f0f54 sdk: Call Handler()'s correct constructor
The constructor for Handler() without an explicit Looper is deprecated

Change-Id: I75caeed0d0abc6047b39f652dd241547ff56cf3b
2025-01-04 13:44:39 +01:00
Andy CrossGate Yan
5e5212c76b sdk: Try getting LineageHardwareService again before checking for it
Currently if LineageHardwareManager couldn't get LineageHardwareService
on its first try, it stays disconnected and wouldn't retry in time.
Several one-time isSupported() checks during boot would then fail,
resulting in missing features e.g. HWC2-based LiveDisplay.

Change-Id: I85e6866543798ed4a805db5c99a28ef8a39335cc
2025-01-01 17:41:19 +08:00
LuK1337
59c2643018 LineageSettingsProvider: Migrate tethering_allow_vpn_upstreams to AOSP
Change-Id: I1453d075f39c0e11a0fd056924d9ec5957928c26
2024-12-20 18:54:18 +02:00
Bruno Martins
b9a622ad20 sdk: Remove no longer used ACTION_UPDATE_POWER_MENU intent
Change-Id: If83d4430a71d66e17ec3b30660a83b4c22ec59ff
2024-12-05 09:09:27 +00:00
Michael Bestas
5a577dc607 sdk: Make it REUSE compatible
Change-Id: Iba2bcaf5e677eafebc48c6aca3d3625f821d6e27
2024-11-07 13:28:42 +00:00
Michael Bestas
d97af7af3b sdk: Add GLOBAL_ACTION_KEY_SYSTEM_UPDATE
Change-Id: Ib52da4a5f43489a0d87f071e124871bc3da2bf8f
2024-09-23 04:11:47 +03:00
Michael Bestas
1baecdab6d profiles: Use new helper to get default NFC adapter
No longer necessary to initialize the variable, since the helper
returns the default NFC adapter, or null if no NFC adapter exists.
Additionally, try...catch can also be removed.

Change-Id: Ic3a1fac8cdf892d5ceccec4e39090ac20cc91e5d
2024-06-16 00:52:08 +01:00
Tommy Webb
d0c004cb79 Network Traffic: Consider CLAT interfaces (IPv6)
IPv6-only networks that support 464XLAT use CLAT to access IPv4
addresses, but the traffic that occurs over the CLAT interface is
tracked separately; it is not reflected at all in the stats of the
underlying interface, so prior to this change, IPv4 traffic on
applicable IPv6-only networks is not reflected in the network traffic
monitor, either.

While there is no exposed API to retrieve stacked interfaces, we can
still try to grab the stats for a CLAT interface (which always starts
with "v4-"), just in case it exists, and if so, add in those stats.

Test: Manual: While connected to an IPv6-only network, such as a
T-Mobile cellular data connection, attempt to load https://1.1.1.1
in a browser while the network traffic monitor is enabled. Reload
the page / choose different languages to cause traffic to occur,
and it should be reflected in the traffic monitor.

Issue: calyxos#792
Co-authored-by: Oliver Scott <olivercscott@gmail.com>
Change-Id: Ida768ebe73a47bb06da53aeb7b5c6882f0090e75
2024-05-21 20:30:09 +03:00
Bruno Martins
cbe38a2f2d LineageSettings: Delete status bar brightness control key
Change-Id: I3748a4ab56fc31e4c0614b84489c35e8beb15b55
2023-12-11 16:41:52 +00:00
Wolfram Liebchen
9bc61e26c8 Network traffic with automatic units [2/2]
A new network traffic display unit option "automatic" offers
a compact display of the network traffic by using at maximum
three digits and an abbreviated unit string.
Comes in handy for situations with reduced space in the
status bar.

Change-Id: Ib4d969924ad5a345b03540070e49a0473f343ad3
2023-11-09 20:50:12 +02:00
Tommaso Fonda
9e850826fc trust: Fix variable usage before null check
Change-Id: I8258b647b2cc32daa759562a0b5a03901b0edcd4
2023-09-16 18:54:08 +02:00
Michael Bestas
aa4306a860 Remove deprecated settings migration code
This was used for cm 12.1 to 13.0 migration.

Change-Id: I4a074b15ed54d7b64d7f14e66bd4d2036b09e4cb
2023-07-22 19:16:33 +03:00
Michael Bestas
f4c7907c20 Remove leftover LineageAudioService support
Change-Id: I427addc828a05b84b0e1596221759b6ccd6d46c0
2023-07-22 18:46:54 +03:00
Michael Bestas
6326bdad01 Remove leftover Performance Profiles support
Change-Id: Ib830ccbf3910b115b5979936a3b75c167bd57779
2023-07-22 18:42:47 +03:00
LuK1337
9a0fe3bea6 sdk: Add static isChargingControlSupported(ctx) method
This will let us use it without bothering to handle RuntimeException
from HealthInterface contructor.

Change-Id: I768c250d1e527b6fd8e49a40452b98404062cc18
2023-06-13 14:24:16 +02:00
Wolfram Liebchen
95e2d729c9 Network traffic with center cutout [2/3]
A new setting NETWORK_TRAFFIC_POSITION decides, if the traffic display
is at the traditional center position or right or left.

Change-Id: I768259696be1186cb1dd4630c2b35540529a7f67
2023-06-11 15:45:06 +02:00
Luofan Chen
3ee210210d sdk: Implement Lineage health service
Change-Id: I772ccf6d323c24d681aa8468bf4318c7b73bd3f5
2023-06-09 18:04:47 +02:00
Danny Trunk
738f26ef54 lineage-sdk: Add settings for charging control
Change-Id: Iba78705136d4b63cb0317b0826bf24c2d027a45b
2023-06-09 18:04:47 +02:00
Joe Feise
4b44a960c1 sdk: Escape network SSID and name when writing profiles.xml
SSIDs can contain ampersands, e.g., "V6 Cafe & Gift Shop". The & and
possibly other special chars need to be escaped when writing
profiles.xml.

Change-Id: Iffef33de22c37d8cb4b5048b92c9ef9c77e18819
2023-04-09 13:10:06 +02:00
Michael Bestas
dc0c1d8a5c Migrate FINGERPRINT_WAKE_UNLOCK to the new AOSP setting
Change-Id: If5ad35077cfa4fb222928e97db4d50b68a0567c3
2023-03-15 01:18:31 +02:00
Michael W
5bd11e303d sdk: Kill app: Actually kill app
* Calling forceStopPackage with USER_CURRENT won't kill the app when
  started e.g. via "Shelter" work profile
* Find the uid of the current foreground app and pass that one
  instead of UserHandle.USER_CURRENT
* Note: UserHandle.USER_ALL would also kill the app, but all instances
  of it - which we don't want

Test:
- Go to Settings->System->Buttons and enable "Kill foreground app"
  as action for "Long edge swipe" - test it for PlayStore
- Install Shelter and setup your profile
- Open PlayStore from work profile
- Long swipe the edge:
  - Before: Toast appears, app stays open
  - After: Toast appears, app is actually closed

- Additionally: Open PlayStore from Work and Non-Work profile
- Long swipe edge for just work profile one and switch to own profile
  instance: App is not killed (expected, we just killed work instance)

Change-Id: I82154a6c021527013269f7ee2d1c46fedc14bf7c
2023-02-01 20:03:42 +01:00
Oliver Scott
02eddd44ac Refactor network traffic code
* Made unmodified instance variables final
* Made single use instance variables local
* Optimized imports
* Updated all deprecated code

Change-Id: Ifbf76031760c622e7efd667f82998adbb7d798f7
2022-09-25 21:11:48 +02:00
Oliver Scott
fd4a90c6e0 Remove duplicate reading of offload tethering stats
The obtained interface stats already include offload tethering stats (https://cs.android.com/android/platform/superproject/+/master:packages/modules/Connectivity/service-t/src/com/android/server/net/NetworkStatsService.java;l=1903;drc=08ccd0d2e1b2eda92ea61d3061f86b881a4a0ef6)

Additionally, the removed code no longer compiles since it was moved to the Connectivity module.

Change-Id: I380e529011cdf108f009d8e5fb35f849fc7e3963
2022-09-25 21:11:48 +02:00
Michael Bestas
938f8dfd57 Migrate berry_black_theme to Secure table
AOSP theme settings live in Secure table, let's do the same

Change-Id: I31eafeb940fe50cdde03e12cb3431f4f325d772b
2022-09-25 19:51:16 +02:00
LuK1337
514848cd6d sdk: Introduce LineagePreferenceLib
Because of some nested dependency breakage, we can no longer include
Android libraries in main SDK lib, therefore we are moving all
preference related code to a separate package that Settings/LineageParts
will depend on.

Change-Id: Iea379a580a08ea13f71e3503aa096ba0ed7e7cef
2022-08-30 15:56:54 +02:00
LuK1337
c2c42fe8d1 sdk: Remove unused deviceinfo prefs
Change-Id: I0d9e5aa52305d76ebe0202228a238efa9ef1e32a
2022-08-30 15:56:36 +02:00
Michael Bestas
4ddfcce49e Update LineageStatusBarItem for T
Adapt for commit 6c5ebb36d8f6cd9f02aec5d66fa64da74f789ecb
in frameworks/base

Change-Id: Ic775f5e0859ef4f1271d2e889b73301ac3804cf3
2022-08-22 15:42:47 +03:00
althafvly
35ee5eb1e1 sdk: Add FINGERPRINT_WAKE_UNLOCK setting
Change-Id: I652afe3397e1b0f44877a4c24b491d0d8408502f
2022-08-08 18:38:24 +02:00
LuK1337
a3e5a256a3 sdk: Add ENABLE_TASKBAR setting
Change-Id: I5c3bc00f2c935f815dc822eca755e836abb764f1
2022-04-29 11:04:19 +02:00
Oliver Scott
ff5e7166f0 Create LineageGlobalSettingListPreference
Change-Id: Iaba7a070bda9abcdf162a72efa111a0a90d501a9
2022-03-24 14:46:11 +01:00
Chirayu Desai
a97180fa58 Move trust usb setting to global, and drop keyguard from name
* We're expanding this to allow disabling usb devices always.

Change-Id: Ibdea983160ae88c3eb696540631facefc288b859
2022-03-24 14:46:11 +01:00
Ramii Ahmed
a7262011d4 Introduce High Touch Polling Rate feature
Change-Id: I6eb65e811f1759806aa89747328ee638c99a44f5
2022-03-19 10:09:50 +01:00
Oliver Scott
fad289124c lineage-sdk: Use new API to access Network Traffic settings
Change-Id: If34674526bc9760eb8577e97eb1e1d9463a3c2d6
2022-03-07 22:42:53 +01:00
Luca Stefani
b0d6dd92e8 sdk: s/UserHandle.USER_OWNER/UserHandle.USER_SYSTEM/g
USER_OWNER has been deprecated and replaced by USER_SYSTEM

Change-Id: I93b057a52dcdcb3760b7c2139bea2e25a624a78f
2022-03-07 22:42:53 +01:00
Luca Stefani
d787f12781 settings: Use proper locking
Change-Id: I0f2c30cb0bb324602738800a8ff81359fa484223
2022-03-07 22:42:53 +01:00
Luca Stefani
2e050a5c98 settings: Move one if check to else if
The map is always empty if the previous check was true

Change-Id: Id1f939d112789ab3c7da711636b40c8a4c23d507
2022-03-07 22:01:43 +01:00
Luca Stefani
ebaa32ef9f settings: Use Id from ContentResolver
Making this change allows to determine 
automatically the proper user ID depending on the
context used to create the resolver

Change-Id: I08021fa56856ef4792da780bca1c0e77526e72a6
2022-03-07 21:51:45 +01:00
LuK1337
d389bf1773 sdk: Add device controls global action
Change-Id: I8be18dfa1fe7807ca2eff13c4c2d477322530af0
2022-02-25 13:39:10 +01:00
LuK1337
21fcbbf2f5 sdk: Move app killed toast message to main application thread
Fixes: Can't toast on a thread that has not called Looper.prepare().

Change-Id: Ia0179ccd4433ac6ceaaa13e03b3e4e6465a6d006
2022-02-23 22:02:26 +01:00
Luca Stefani
67c0daf545 Remove LineageAudioService
Change-Id: I4aea4c62154a0f7d9d6d96e68ddf2bd401458fab
2022-01-31 00:44:33 +02:00
Bruno Martins
9265e4085d sdk: Nuke perf profiles
Change-Id: Ibd32da7cb2feb8fa41bf9804f101167e4d12e33c
2022-01-30 22:33:24 +01:00
Bruno Martins
fb4dfb48cb sdk: Remove LineageContextConstants.Features.FOD
Change-Id: I1196413cc116495c4998e859aa279c0fcf2e16f1
2022-01-26 22:57:16 +01:00
Cédric Bellegarde
c0fde5eacb lineage-sdk: Add support for clock auto-hiding
Change-Id: I9d05188289e334a99baeaa330fb869573e123ea6
2022-01-24 19:39:24 +00:00
Bruno Martins
3c27619fb3 LineageSettings: Remove long dead notification count settings
Change-Id: I4a19cdaf31283da398a46784c4ba5763beb8c658
2022-01-04 00:50:12 +00:00
Bruno Martins
01d0bae938 preference: Introduce {Global,Secure,System}MainSwitchPreference
Change-Id: I04cf71ea60b3ecde3c8be039ab320e8730ca4b3f
2021-12-31 21:03:04 +00:00
Bruno Martins
ea5bec56fd LineageSettings: Deprecate charging sound settings in favor of AOSP ones
There's no need to have our own settings for this when we can simply
override the existing AOSP ones.

Change-Id: I84e1f7286cd6b4ee68c62f17ad104c76031ee0ff
2021-12-31 17:20:56 +01:00