Commit Graph

1256 Commits

Author SHA1 Message Date
Michael Bestas
38be42ce0a sdk: Cleanup imports
find . -name "*.java" | xargs java -jar \
~/bin/google-java-format-1.25.2-all-deps.jar \
--aosp --fix-imports-only --replace

Change-Id: If39579285c13cecdb3592d8ccf0605b8030b340e
2025-03-23 12:06:59 +02:00
Michael Bestas
989dd336c1 Disable use_resource_processor for org.lineageos.platform-res
Change-Id: Ic27b48d612ad089be0376b32591d5ce9b8e4f716
2025-03-09 11:23:26 +02:00
LuK1337
e395199695 health: Catch all setCharging*() exceptions
Technically, this should be fixed device side, but random failure when
HAL side fails shouldn't crash the system either.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8391
Change-Id: Iedd869cbd74e4a5535655c977b8ead74e8d5868d
2025-02-24 21:23:38 +01:00
Luofan Chen
a5c37aced7 health: Rename msToUTCString to msToHMSString
Change-Id: I1d8a28eee49056e73917c052180fd7328eb7fbd5
2025-02-22 16:34:11 +00:00
наб
436d750313 health: Format notification's target time according to locale
Fixes: 8a7af5a974
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8317
Change-Id: I2c059da77c54c4fea11bdbabd1dde752f74ca6cf
2025-02-16 12:03:53 +00:00
LineageOS Infra
2772796326 Automatic translation import
Change-Id: Ib252621063045843d0a6d1655d98fe86f37b2725
2025-02-15 15:47:20 +00:00
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
LineageOS Infra
cc0d50aac5 Automatic translation import
Change-Id: Iab649a8c8f2082c1f4e7fd01bc491507d6b5ba57
2025-02-01 14:28:35 +00:00
LuK1337
2b130050dd sdk: Support breath LED mode
Change-Id: I9ec757a784dc3fb3afcb6f909f10e2eee86502ea
2025-01-18 12:19:21 +01:00
LineageOS Infra
4796ff52f4 Automatic translation import
Change-Id: Ibd246d935ef5a5013b7266c79cd6d8a3a30417b8
2025-01-15 20:54:49 +00:00
Luofan Chen
8a7af5a974 ChargingControl: Decouple charging control and main logic
The existing Hardware Abstraction Layer (HAL) supports two distinct
control modes: TOGGLE and DEADLINE, each offering unique capabilities.
For instance, the TOGGLE mode allows for control over both charging
time and limit, while the DEADLINE mode only enables control over the
charging time. Managing these separate logic streams within a single
ChargingControlController class complicates the development process.

This commit separates the specific charging control logic — determining
what to send to the HAL—from the primary logic. The charging control
module now offers providers tailored to each HAL-supported charging
control mode, allowing for limit control, time control, or both. When
required, the ChargingControlController invokes these specific providers.

This commit also saparates other parts, like notifications, from the
main logic, to a saparate class.

This separation simplifies the codebase. Moreover, when introducing a new
mode in the HAL, developers only need to implement the corresponding
provider's logic based on the mode's capabilities. And minimal changes
are needed in the primary logic.

Change-Id: Ie40020c2df4141d4aa6385c8f5565821af942755
2025-01-13 10:22:07 +00:00
Michael W
8709a3a505 sdk: Optimize imports
Reordering and removing unused ones

Change-Id: I1fff9c6f11c71022dbf4207ee042d2ee2ff77ee6
2025-01-04 13:44:39 +01:00
Michael W
97ea132c03 sdk: FloatMath is deprecated
We should use Math instead

Change-Id: I0271486ad866521a544c4f9b54ec92965fc047b0
2025-01-04 13:44:39 +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
Michael W
87c969771b sdk: Use BluetoothManager.getAdapter()
* BluetoothAdapter.getDefaultAdapter() is deprecated since sdk 31
* Also fixes wrong naming for mBluetoothAdapter which was local
  and thus didn't need the prefix "m"

Change-Id: I003fe06fbd8958cde0fdd71d61710272e32a2ca5
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
Luca Stefani
1963836822 Deprecate org.lineageos.platform.lineagesettings
Changing APEX modules behavior is as annoying as it can be.

Futhermore this target was used for a single setting entry that can be
easily replaced by using the AOSP settings provider, that is already
accessible in the module.

Change-Id: I0d2aa32dc4f3057d29bf59126c5a2dc3a4043c21
2024-12-20 13:35:29 +01:00
Christian Hoffmann
4e9ea61e32 TrustInterfaceService: Allow BAL
Change-Id: Icade42a394c6501871a47274a84371fa681bf1fa
2024-12-20 03:52:54 +00:00
LineageOS Infra
b503f5ce9b Automatic translation import
Change-Id: I4d17c0562b6c733cc38d1cb90582aff968faa77a
2024-12-16 06:29:59 +00: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
LineageOS Infra
1a4083ad67 Automatic translation import
Change-Id: Iee7bc64d903f0bef4fc20e4774730d68b0ce84a2
2024-12-02 02:54:17 +00:00
LineageOS Infra
eed35b8aad Automatic translation import
Change-Id: I8902b6005532ade17489e89fa4b29104fb4bcd41
2024-11-16 06:48:07 +00:00
Michael Bestas
5a577dc607 sdk: Make it REUSE compatible
Change-Id: Iba2bcaf5e677eafebc48c6aca3d3625f821d6e27
2024-11-07 13:28:42 +00:00
Michael Bestas
87d20850bf sdk: Remove unused .gitignore
Change-Id: If3eb2d25aa93b2a210c424e06e64412643a18532
2024-11-07 13:28:42 +00:00
Michael Bestas
5efaee2299 sdk: Remove SettingsProvider tests
Change-Id: I3abde5201b7d103b038f98c05fdf0026a7834ea8
2024-11-07 13:28:42 +00:00
Michael Bestas
756427f973 sdk: Remove unused proguard.txt
Change-Id: I342a9bb9865bd6958a64f46953d5aa1f6ca3d287
2024-11-07 13:28:42 +00:00
Luca Stefani
303a108276 Remove 'build-time disabling of components' resources
You should use component-override

Change-Id: I7e44f5b50b7909622c74b658bec0bedb776fd8a9
2024-11-04 19:18:54 +00:00
Michael Bestas
8c849ce234 sdk: Remove tests
They don't compile and they haven't been updated in years.
They barely cover any of the sdk code, so remove them instead of fixing
them.

Change-Id: I74b2811d0bcead9b590e6c58053bd4b9fd72fec6
2024-11-02 13:32:14 +02:00
Michael Bestas
cd36464e00 sdk: Remove CleanSpec.mk
Change-Id: I727b390a1e37a3eef5f0ee376f62e41a2ecb496c
2024-11-02 13:31:06 +02:00
Michael Bestas
82a2cae27e sdk: Remove most public sdk parts
* Remove droiddoc, it has been commented out since a few versions
* Remove API which hasn't work since a while
* Remove org.lineageos.platform.sdk library
* Remove samples
* Remove obsolete README

Change-Id: Ieb1c2a64ee04480a81d24cb782806397f64adb7d
2024-11-02 13:27:14 +02:00
Michael W
88916babb8 Remove values-lu
* Luxemburgish (lb) was accidentially mapped to "lu" for all of the
  non-AOSP projects.
* Since the next sync will download "lb" now, just remove "lu"

Change-Id: I9751d689633e7e795bdda86e3f039f277432c893
2024-11-01 05:22:00 +02:00
LineageOS Infra
9ea8d63ea1 Automatic translation import
Change-Id: I72e4279711e3cd04cbdc29b1b5aa44fd2add7221
2024-10-31 17:49:16 +00:00
Oliver Scott
f7c44fc818 Clear restricted networking mode allowlist
Replaced by POLICY_REJECT_ALL

Issue: calyxos#2192
Issue: calyxos#2637
Change-Id: I78ff47624e520f9a3fe492165544d93edbbe814d
2024-10-23 01:38:13 +03:00
Michael Bestas
d4dc1a3f6e sdk: Introduce config_enableAdvancedRotationSettings
Change-Id: Id43427924f1e0dcea882c36fc49660994513ee4f
2024-10-22 22:18:10 +03:00
Michael Bestas
d97af7af3b sdk: Add GLOBAL_ACTION_KEY_SYSTEM_UPDATE
Change-Id: Ib52da4a5f43489a0d87f071e124871bc3da2bf8f
2024-09-23 04:11:47 +03:00
LineageOS Infra
a2da6c4783 Automatic translation import
Change-Id: Ieea89e31c752b83a1165bf77bd14642025581aac
2024-09-15 16:02:28 +00:00
Michael Bestas
99eca47a87 Remove services dependency from org.lineageos.platform.internal
Change-Id: Ie0d8c0c9d3883bdf5b56f55e7c50a338522b6725
2024-09-09 11:59:21 +03:00
LineageOS Infra
611bcdff20 Automatic translation import
Change-Id: I83844807cdaa0148707ad0d0708f08d9e2ca606f
2024-09-02 23:16:19 +00:00
LuK1337
6f3fef1d35 sdk: Move spn schema to vendor/lineage
Change-Id: I60f9da5fdc11b8bc2340ceb552a1bca7b1daeef6
2024-07-22 15:12:02 +02:00
LineageOS Infra
65ab777e9f Automatic translation import
Change-Id: I9aad94a5994be8dbde9d6e9f8a668a1d59b4c9d9
2024-07-01 18:54:33 +00: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
Dominik Baronelli
805093b3ab Revert "sdk: Add aux camera related resources to config.xml"
This reverts commit c775185a87.

Not needed anymore, after reverting 'sdk: Introduce org.lineageos.platform.resources target'

Change-Id: I8d6b5dbb879c792bd6b5cf09ab9d6752e7001310
2024-06-15 22:50:35 +01:00
Dominik Baronelli
12feea4dc9 Revert "sdk: add HFR privapp camera related resource to config.xml"
This reverts commit 1c6d5b120d.

Not needed anymore, after reverting 'sdk: Introduce org.lineageos.platform.resources target'

Change-Id: I34539f44422432160d89c420c75f86cd9d9927f9
2024-06-15 22:50:24 +01:00
Dominik Baronelli
9b45f59f77 Revert "sdk: Introduce org.lineageos.platform.resources target"
This reverts commit 6ba68050a3.

Reason for revert: this breaks cts test

Test: run cts-dev -m CtsStrictJavaPackagesTestCases --test android.compat.sjp.cts.StrictJavaPackagesTest#testBootClasspathAndSystemServerClasspath_nonDuplicateClasses

Change-Id: I00bbd9220f9d4f5c996dab5b8ca5da6c77ad3208
2024-06-15 22:50:05 +01:00
LineageOS Infra
97b8e583e8 Automatic translation import
Change-Id: I58cbfc1ab0ad92357fead0d986a3a1bdfaf94d17
2024-06-01 22:14:21 +00:00
Michael Bestas
baebbbf0d1 LineageSettingsProvider: Relocate loadRestrictedNetworkingModeSetting call
It shouldn't be in a SQLiteStatement block.

Change-Id: I342af1f9e52150bd87aa20701a7109db3fa6f2bb
2024-05-29 14:54:17 +03: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