Commit Graph

1205 Commits

Author SHA1 Message Date
LineageOS Infra
f279097bbc Automatic translation import
Change-Id: I90fd4fd279354314e6ce5a10f36a766f6c158e59
2024-05-01 16:33:43 +00:00
LineageOS Infra
0ab2a0be49 Automatic translation import
Change-Id: Ib2f1ea0c26775ca33427ba555939eabedbeb518b
2024-03-27 09:21:39 +00:00
Chirayu Desai
dcbd8deae6 Drop support for legacy USB restrictor
* Doesn't compile after 14 QPR2 / AP1A
* Has always been an issue for CTS
[CIRCULAR REFERENCE: com.android.tools.r8.internal.h: Library class vendor.lineage.trust.V1_0.IUsbRestrict implements program class android.hidl.base.V1_0.IBase]

Change-Id: Id2a4ccc60d7cae6bca02e302725d982d50311278
2024-03-21 09:34:33 +00:00
Michael Bestas
360d9508c9 LineagePreferenceLib: Migrate to SwitchPreferenceCompat
Change-Id: Ice9f732065e4792fc73b7890cdd6b9a55475f518
2024-03-21 10:28:58 +02:00
Michael Bestas
36e14240eb sdk: Allow enabling lockscreen rotation by default
...and enable it by default for sw600dp

Change-Id: I96f1aed51ed286ecab521ee973434fcf6d254bcd
2024-02-21 17:07:38 +00:00
Michael Bestas
691670d7bc Revert "LineageSettingsProvider: Allow enabling lockscreen rotation by default"
This reverts commit 1a53318ab3.

Change-Id: I886affb6949ca928b92b496116b9ad3d77827ed0
2024-02-21 17:07:38 +00:00
Bruno Martins
7241fa0b41 sdk: Introduce config_proximityCheckOnFpsUnlock
Change-Id: I304aa324c5775669e3fc1e9e82fbfa0ce2eb9dfc
2024-02-21 10:27:01 +00:00
LineageOS Infra
6538e84b23 Automatic translation import
Change-Id: I6033402fd381bf001100db04934ffae0126d4318
2024-02-10 19:04:38 +00: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
Michael Bestas
dba5da3057 Add onBeforeUserSwitching override in UserContentObserver
Change-Id: I526204fc4eab83e4e8b8f3069faeb1333fff254c
2023-10-09 16:56:33 +03:00
Bruno Martins
e2d1d6a391 LineageSettingsProvider: Allow to set a default for QS brightness slider
Change-Id: Ie9003e2c14e7f5ba1b34cd7c3c7ab95a3c9501cf
2023-10-03 22:23:44 +01:00
Bruno Martins
944cb718fb sdk: Allow to hide and set a default for status bar DT2S gesture
There might be edge cases of devices that have no power button
and no way to control externally connected displays. In such cases,
if display has touch support, DT2S shouldn't be allowed at all.

Change-Id: I3976f138d02f0b6ddf8ce239cb8c3a19ab737b67
2023-10-02 14:49:58 +00:00
LineageOS Infra
944e76f7c7 Automatic translation import
Change-Id: Ib570552894d2afffdfb88a61c6d080b71265b173
2023-10-01 16:32:51 +00:00
Tommaso Fonda
9e850826fc trust: Fix variable usage before null check
Change-Id: I8258b647b2cc32daa759562a0b5a03901b0edcd4
2023-09-16 18:54:08 +02:00
LineageOS Infra
d84bdac8e2 Automatic translation import
Change-Id: I9f18003e51aa246e0a73b2e15facea3dc0f433fe
2023-09-15 17:53:25 +00:00
LineageOS Infra
079c131372 Automatic translation import
Change-Id: Ia08e8574b21a9cd85f6748ee131bd7498717c2ab
2023-09-01 14:42:17 +00:00
LineageOS Infra
c8b901364c Automatic translation import
Change-Id: Ic759768ecbe0e9e1d619a2f5fb579bfa4902d980
2023-08-06 14:55:38 +00: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
1f91203cf5 Remove deprecated host migration example
This was used for cm 12.1 to 13.0 migration testing.

Change-Id: I93c6e49d963c7ea9862392219148ab641f37b133
2023-07-22 19:16:33 +03:00
Michael Bestas
17d6d41753 Remove leftover trusted_accent_packages array
Change-Id: I6dac2b180b217bf721e8c4faec5a61f9ec149436
2023-07-22 19:16:33 +03:00
Michael Bestas
d072074908 Partially revert "LineageSettingsProvider: Support migration from cmsettings"
The migration happened in lineage 15.1,
we only support direct upgrades from 17.1.

This partially reverts commit e7008a222e.

Change-Id: Ic2acd93565e21475ea6f896941107230d880e890
2023-07-22 18:46:54 +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
Michael Bestas
1a53318ab3 LineageSettingsProvider: Allow enabling lockscreen rotation by default
...and enable it by default for sw600dp

Change-Id: I0df4f0907591146a21d3da0e0d11e3213ad8767a
2023-07-20 17:28:53 +02:00
LineageOS Infra
ff85a9631f Automatic translation import
Change-Id: I50f9f3c49e364546190af1e886de350fd9e58cff
2023-07-15 18:07:57 +00:00
Tommy Webb
0c5c4f6664 ChargingControl: Additional log lines for deadline
Change-Id: I9ceb3b0df0095cb12408a6ae47be8fd8af6678a8
2023-07-13 17:20:21 +02:00
Tommy Webb
2b59462ac6 ChargingControl: Retry setting deadline if it fails
Do not save the target time unless setting deadline succeeds,
effectively allowing it to be retried later.

Change-Id: I572b935b088170d56623a33c5efd2292b1a67126
2023-07-13 17:20:21 +02:00
Luofan Chen
3c3140b8e0 ChargingControl: Don't set deadline if charging control is not enabled
Change-Id: I5e7570184294e8391e4908e449c1bffb07d9410d
2023-07-13 17:20:21 +02:00
Luofan Chen
1f36483aa7 ChargingControl: Drop default values for initially zero variables
Java generally sets the default values for fields to zero or null.

Change-Id: I7a993dfc70476ed5beb649cae42de2b125b897b9
2023-07-13 17:20:21 +02:00
Luofan Chen
1ed0e04da8 ChargingControl: Return early if lineage health HAL is not found
Change-Id: I2616224167a4fe5e59bdf01c5e124744bb8b2d51
2023-07-13 17:20:21 +02:00
Michael Bestas
63769995c1 Drop < lineage-16.0 database migration support
It is only possible to upgrade from 17.1 to 20.0 directly,
let's just drop all the old migration steps.

Change-Id: I04ec638f3b7c75d53629c8fec5523a0ccc7eabb5
2023-07-13 16:19:43 +02:00
Chirayu Desai
7e5dade283 Change existing migrations to use new helper methods
* We usually shouldn't touch existing migrations,
  they would have already ran for most (if not all) users,
  and don't run for existing users since they start at
  the latest version.
* However, we've recently discovered many issues with these
  migrations, and past reported issues are now starting to make
  sense (they can be explained by migration running over and over again)
* As such, let's fix this once and for all to make things clearer.
* We also tend to copy older migrations when writing soemthing new so it
  should help having these done :)

Change-Id: Ic45efc823da7ea8a137e79b3769a9ca53c2f8667
2023-07-13 16:19:43 +02:00
Tommy Webb
1c5a5dd010 Add helper methods for reading and writing settings
Add new private methods readSetting, readIntegerSetting,
readLongSetting, writeSetting, and writeSettingIfNotPresent
to reduce boilerplate and potential for code errors.

Change-Id: I9872cc50db86056cdc1588741600b66ee9d40f9f
2023-07-13 16:19:15 +02:00
Tommy Webb
663a948c50 Do not use transactions when reading settings
There is no need to use database transactions to simply read settings.
We also were not setting the transaction as successful, which was
causing the outer transaction for the whole onUpgrade operation to be
rolled back, meaning that some devices would be stuck at old db
versions and perform repeated migration attempts on every boot.

Issue: calyxos#1290
Change-Id: Icefe994379152f9a3aa6c0c5b447cc55d5c4cf46
2023-07-12 14:27:42 +03:00
Chirayu Desai
173b6d8693 Migrate side FPS settings
* Really shouldn't have touched an existing migration before
* Anywho, let's change it back to what it was but make it compile
* Then, let's migrate that old setting to the new AOSP setting,
  but flip it since it works differently.

Change-Id: I342d8c78aa8faeda5dcaafe9199deb51c570efd0
2023-07-12 14:27:38 +03:00
LuK1337
c407667d38 ChargingControl: Use ServiceManager.waitForDeclaredService()
It might take a while until health HAL is up, thus let's just wait for
it.

Change-Id: Ie929a25a2a774aedb4559662e9ad0a47f1b154e6
2023-07-10 18:58:47 +08:00
Michael W
9ed93717cb ChargingControl: No need to log a crash when not supported
Instead of relying on catching the exception later on, check if
ChargingControl is actually supported before checking if a specific
mode is

Change-Id: Icaf8d333842c9847bea00bedb4b302b7acd49bb3
2023-07-08 21:38:24 +02:00
LineageOS Infra
d487fb503f Automatic translation import
Change-Id: Id9bc669c714ad045d45da6bb5f31fd3cfdedbcb7
2023-07-01 16:12:20 +00:00
Luofan Chen
e6258aa75e ChargingControl: Handle cancel toggle correctly if bypass is not supported
Change-Id: Ib7e208bba554b76a067d70280785290d5a0ba08d
2023-06-28 11:38:05 +02:00
Luofan Chen
7f1c3b999c ChargingControl: Add cancel toggle for limit done notification
Change-Id: I4f969ae87e1f9aa264113f044ee850def33ad20f
2023-06-28 11:38:05 +02:00
Luofan Chen
9ada9b1b7d ChargingControl: Reset internal states on settings change
Change-Id: Ib49d6b5b9190a71f5447125ed1aa70da894e6c18
2023-06-28 11:38:05 +02:00
Luofan Chen
c2dbc74032 ChargingControl: Set a small margin for devices with bypass support
Change-Id: I1eddaa85f9dd47283af1fcd43d6fc207bcfd5546
2023-06-28 11:38:05 +02:00
LineageOS Infra
eee2b70594 Automatic translation import
Change-Id: I54bfe88fe79f568e701e48c5d3ebb29fd1578ea6
2023-06-20 16:28:06 +00:00
Michael Bestas
bf6f48ceb3 Update LineageDatabaseHelper for 13 QPR3
Change-Id: Iea691957d02c181c6409b5fc918a1b04d37369a2
2023-06-14 20:30:17 +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
Luofan Chen
89941a9622 sdk: Extract base class for lineage base feature
So that it can be shared in multiple components

Change-Id: I96d1a5772b7185bf7c3d394a1b2c8f143d48e0c8
2023-06-09 18:04:47 +02:00
Luofan Chen
0e290483f3 sdk: Add requiresService attribute
Change-Id: I953444a53cd892d8e70941487709964fd671576a
2023-06-09 18:04:47 +02:00