Commit graph

145284 commits

Author SHA1 Message Date
LineageOS Infra
4c7d3b1e89
Automatic translation import
Change-Id: I99e92692cd4bc7520d2f4781ea9beb685110889e
2025-03-25 20:12:07 +02:00
LineageOS Infra
918c6b3de9
Automatic translation import
Change-Id: I496f8336c605c2166c1790dfbad7333b8c28763a
2025-03-25 20:12:07 +02:00
LineageOS Infra
c82a80791e
Automatic translation import
Change-Id: I49421284ab4d812132cc5dee24667030652489c4
2025-03-25 20:12:07 +02:00
LineageOS Infra
127cf036d2
Automatic translation import
Change-Id: I9569c045ab94c5616a2a28ee1bca28e6827a0434
2025-03-25 20:12:07 +02:00
LineageOS Infra
ad8539a8a3
Automatic translation import
Change-Id: Idf1ae3638deb938356634c4a05e3c11194c192e9
2025-03-25 20:12:07 +02:00
LineageOS Infra
c216e3cf23
Automatic translation import
Change-Id: If700c86022590b9f7b2a9c2bb6ac7220e8b44f8b
2025-03-25 20:12:07 +02:00
LineageOS Infra
77a1020442
Automatic translation import
Change-Id: Iad1d360b7913b9b4dcfe5150637729585e005e52
2025-03-25 20:12:07 +02:00
LineageOS Infra
92fec126e2
Automatic translation import
Change-Id: I4f6fbb3e53decb996d3eb1374cebd33d97266e3d
2025-03-25 20:12:07 +02:00
Michael Bestas
17edef282a
Allow all UDFPS devices use the sensor while screen is off
Change-Id: I42f13398754be50f39dc250f03e8074c3ba64a28
2025-03-25 20:12:07 +02:00
LuK1337
97c93a7017
Settings: Make SIM toggle unchangable when not supported
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8290
Change-Id: I2e566c24969708c31f607af2baad88b388bda74d
2025-03-25 20:12:07 +02:00
Michael Bestas
3df966cc65
BatteryTip: Hide Learn more button if URL is empty
When help_url_battery_defender is empty, tapping on Learn more button
causes a NPE.

Issue: calyxos#2809
Change-Id: Ib1c52dcff430cae7c4bc0793120ace837f5bf4c7
2025-03-25 20:12:07 +02:00
Tommy Webb
91d0faa4aa
Fix background data clobbering other policies
Stop removing preexisting UID policies when toggling
Background network access / unrestricted data usage.

Fetching the state of policies was not working due to an incorrect use
of Arrays.asList() - if you give it an int array, you just get a list
with that int[] as a single element, so using the contains method with
an int will always return false. This has now all been refactored.

Test: Manual: Open Settings > Network & Internet > Data Saver >
Unrestricted data. Turn it on for something. Go back, and then
return to the page. It should still show as on.

Issue: calyxos#2547
Issue: calyxos#2118
Change-Id2: I671544f6fdf9897484c6265c31c8b3cd29ad4a92
Change-Id: If54d0a0925c5da0f3d519d0a85491ff3b7b62351
2025-03-25 20:12:07 +02:00
Jesse Chan
01d72328e8
Settings: support black theme for dark mode [2/4]
Change-Id: I12451c0b72f73b08b885e8103bbe3e74a0c4e19f
2025-03-25 20:12:06 +02:00
AnierinB
7b76d2a842
Settings: Set key order on addition
When the activity is created, injected preferences were not setting their order. This could potentially lead to two bottom preferences
in a given category on rebind. Ensure the order is set during key addition to prevent such issues.

Follow up to change: I1dc0148c5595f20daf026970d6514e63776b0499

Change-Id: I9df0bafbc2d2eddde94f07104d803fdc46adec8c
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-03-25 20:12:06 +02:00
AnierinB
ed77d8bd20
Settings: Set key order during rebind
When the activity is resumed, injected preferences were losing their
order. This could potentially lead to two bottom preferences in a
given category. Ensure the order is retained during key rebind to
prevent such issues.

Follow up to change I666ebd7f90c11f1836bac10f7fca38baa5aedf93

Change-Id: I1dc0148c5595f20daf026970d6514e63776b0499
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-03-25 20:12:06 +02:00
Michael W
d117f53b77
Settings: Place and order Google & Digital Wellbeing
... in the same category as Security & privacy
... with an approach that can be reused for other keys in the future

Change-Id: I666ebd7f90c11f1836bac10f7fca38baa5aedf93
2025-03-25 20:12:06 +02:00
Michael W
e38f9c251d
Settings: Move Google Setting way down
Having it at the very top /might/ make sense on a Google centric device
like a Pixel, but on a neither Google focused device or OS, it should
not be as prominent as it is right now

Change-Id: Iff3dae180e19b32ad684c13b9cf7b0263b7b9e89
2025-03-25 20:12:06 +02:00
shoya0x00
1d39800c0b
Settings: Set correct categories for GMS top level activities
On new revamped Settings UX dashboard is missing styling for GMS top
level activities. This is fixed by assigning them respective categories.

Change-Id: I5f18fab2419c8346760c4f6bed6f77e1eac8e059
Signed-off-by: shoya0x00 <shoya0x00@users.noreply.github.com>
2025-03-25 20:12:06 +02:00
althafvly
9f41becfd6
Revert "[Sim UI enhancement] remove the "Tap to show info""
This reverts commit c6eba747db.

Change-Id: Ib8403ca842a4655d1526b27f1965feeee336c687
2025-03-25 20:12:06 +02:00
Michael Bestas
08f05c00ed
Make battery cycle count configurable and disable it by default
Most devices don't report valid cycle count.

Change-Id: I32478dac8ff409cd90506495eca42b9df987919b
2025-03-25 20:12:06 +02:00
Michael Bestas
38e36b5403
Hide unavailable battery info
Some devices wrongly report 0 for battery info.

Change-Id: Icee022c7d37c79cdd72c607cb43c9827c871e4da
2025-03-25 20:12:06 +02:00
Jyotiraditya Panda
b237810839
Settings: deviceinfo: Extend Battery info page
Change-Id: I5fcff258c878bd12d252321f269b89f3afa334ab
Signed-off-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2025-03-25 20:12:06 +02:00
Michael Bestas
3930ca169e
Make battery info configurable and enable it by default
Change-Id: If38db229e420e9f7c0ac26abb42a2a309b2f87c2
2025-03-25 20:12:06 +02:00
Tommy Webb
74e8748f33
DynamicDenylistManager shall not exist
Remove DynamicDenylistManager to avoid its conflicting behavior
with our firewall. This stops the resetting of firewall policies
on boot and for other reasons. The user is in control of these
policies and doesn't need them to be unexpectedly reset.

Issue: calyxos#2211
Test: Manual: Turn off Background network access for any app. Then,
in Firewall, turn off another toggle like Wi-Fi. Reboot, and check
the toggles. Background network access and Wi-Fi should still be off.
Change-Id: Ie62ddfa3a893c9adf5d4fd0c8670235a5a51e03f
2025-03-25 20:12:06 +02:00
Bruno Martins
072a487b00
FingerprintSettings: Add proximity check awareness if supported
Fingerprint authentication when screen is off doesn't nativelly
support checking the proximity sensor status to prevent accidental
unlocks. However, some devices implement this feature, so account
for that. The only thing really needed is just to adapt the
descriptions shown to the users.

Change-Id: I635f7b1a2970c0364b6cd22dfe20e69d009a3f91
2025-03-25 20:12:06 +02:00
Michael W
26c986650e
Settings: Hide Flashlight
* Class comment states: "Headless activity that toggles
  flashlight state when launched."
* Comment in constructor states:
  "The sole purpose of this activity is to provide a place
   to index flashlight into Settings search."
* Since it does only the second thing successfully and we
  do neither know why we need a useless search result nor
  does it serve any purpose, hide it from search results
* We could remove the whole class, but since it's from AOSP
  I decided to keep the change footprint minimal

Test: Type "Flashlight" into settings search - result does not
appear anymore
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/6397

Change-Id: I53541c700e24efd33d386c38a4ea38fb1b8b81d6
2025-03-25 20:12:06 +02:00
Timi Rautamäki
ed17d8d92b
Settings: make sure Wifi exists before adding controllers
Change-Id: I6c1fd5222aa9fd33cbec67b8f572d031bfe86466
2025-03-25 20:12:06 +02:00
penglezos
bbb051cd38
Settings: Add private dns icon
- Taken from Google's material symbols and icons

Change-Id: I0f000193c3590a0c751713d1947778787a90ca47
Signed-off-by: penglezos <panagiotisegl@gmail.com>
2025-03-25 20:12:06 +02:00
Danny Trunk
8048b56ba7
Settings: Add charging control part
Change-Id: Idd82e304ccdc17cbd95b7bc64785fe579d690152
2025-03-25 20:12:06 +02:00
Chirayu Desai
3687e0554f
Add Cloudflare DNS as a private DNS provider
* Handle this entirely in Settings, no need to touch anything
  else at all

Change-Id: I7e8a320d47e7c5ddbcb9acfaf23032ae92d5d70d
2025-03-25 20:12:06 +02:00
juwei
de9949928e
Settings: Add switch preference for AGPS
Allow toggling AGPS (which in turn disables SUPL) using the existing
AOSP mechanism that was simply never exposed to the user.
Based on the following commits from CodeAurora, modified to
use SwitchPreference and improved strings:

Author: juwei <juwei@codeaurora.org>
Date:   Mon May 7 13:31:50 2018 +0800
    Settings: Add AGPS setting menu.

    Add AGPS setting switch to allow user turn on/off
    AGPS function.

    Change-Id: If8a20a8293b9f4b12933bc3820b4cd135a938b72
    CRs-Fixed: 2169854

Author: hoffc <hoffc@codeaurora.org>
Date:   Wed Dec 19 15:56:07 2018 +0800
    Settings: Refactor Agps preference controller code

    (1) Extract inner class AgpsPreferenceController as one standalone file.
    (2) Delete the useless code of reading the SUPL server and port from etc/gps.conf file.
    (3) Remove the config item "config_agps_enabled".

    Change-Id: I20465aa4375c7fe64bc84f579a39178506b8e211
    CRs-Fixed: 2370304

Author: hoffc <hoffc@codeaurora.org>
Date:   Tue Jun 1 08:52:31 2021 +0800
    Settings: fix NPE caused by missing agps preference definition

    No agps preference is defined in location settings, results in NPE when agps controller init

    add agps preference definition in location settings

    Change-Id: I92e3293bccb90da7b6a1057e2dd83f8aa909d308
    CRs-Fixed: 2958241

Issue: calyxos#1490
Co-authored-by: Chirayu Desai <chirayudesai1@gmail.com>
Co-authored-by: Michael Bestas <mkbestas@lineageos.org>
Change-Id: Idea7026f0c954c1f2a056e7b4595a879ef161f5c
2025-03-25 20:12:06 +02:00
LuK1337
212730dd75
Settings: Pass empty lottie resource for quickly open camera animation
This lets us hide it properly.

Change-Id: I02ac031a835236811b82a7de283335390ffebab9
2025-03-25 20:12:06 +02:00
Michael W
cbf822d45b
Settings: Good news, encryptable=footer is broken
* Add a warning to discourage usage

Change-Id: I1913d6a94ea040d545a7946bc4a21d731c41e612
2025-03-25 20:12:06 +02:00
Michael Bestas
cd2951dd3a
Settings: Add toggle for heads up notifications
Change-Id: Ie2f50e3fac70268d1cf0c0cab6cd23d9aec7cdc7
2025-03-25 20:12:06 +02:00
Bruno Martins
20145acb31
KeyboardSettings: Add a RemotePreference for device-specific panel
Allow devices to provide advanced keyboard settings.

Unfortunatelly this can't be done with existing IA settings,
so use the RemotePreference API to allow the external app
to update the view. The action for this is:

     "org.lineageos.settings.device.ADVANCED_KEYBOARD_SETTINGS"

Change-Id: I1c46d3568c4d5bfc78e1cbae033071c7641fdf29
2025-03-25 20:12:06 +02:00
Sam Mortimer
b788dee3a2
Settings: Add battery and notification lights settings
Change-Id: Ia5f635d2a493a859068af3d6b7502cc6d3db5893
2025-03-25 20:12:06 +02:00
Chirayu Desai
266f426251
Hide the "Show the vibrate icon in the Status Bar" setting
* We have this controllable like all other status bar icons

Change-Id: I39d2f0ee7849403c404bdfa109e191102466c537
2025-03-25 20:12:06 +02:00
Cédric Bellegarde
9b58b0c001
Settings: Add preference for one shot auto-brightness
Co-authored-by: Eamon Powell <eamonpowell@outlook.com>
Change-Id: I57f11ad4e8fc47b2ff2c771e61920780e359815f
2025-03-25 20:12:05 +02:00
LuK1337
43cd6795ab
Settings: Add min refresh rate list preference
Change-Id: Iac1f65ab09717ea55a5b471e094385c77ba894ee
2025-03-25 19:51:49 +02:00
Michael Bestas
15b9497cc9
Settings: Add peak refresh rate list preference
* AOSP "Smooth display" setting is just a toggle,
  some devices support multiple refresh rates so
  add support for it with a ListPreference.

Change-Id: I3da3d2b86e61ed3caf9af5770d8bdb4485817b97
2025-03-25 19:51:49 +02:00
Ramii Ahmed
2b10cde68e
Settings: Display: Add High Touch Polling Rate Support
Change-Id: I86e85c5cd2cf462734ccad69b41b1977b32c7326
2025-03-25 19:51:48 +02:00
Michael Bestas
84ca0e0e2f
Hide fingerprint settings help if URL is empty
Change-Id: I1631575bd6e48419f0649491a5ae167adf72c8c2
2025-03-25 19:51:48 +02:00
Terminator-J
727918bcc3
Settings: Show single-touch wakeup setting on rear & front fps devices
Not sure why Google assumed that showing this setting is only useful
for devices with FP sensor built into a side-mounted power button.

Change logic to preserve check for side mounted (really, power-button
mounted) FP sensors, but allow any device which has a a rear or front
mounted sensor to show the relevant setting; so users can toggle it.

Bug: Enchilada (Oneplus 6, capacitive FP sensor on the back) no longer
wakes & unlocks from screen-off with FP sensor touch after QPR3 merge.

Test: Apply commit. "Touch to unlock anytime" setting is now visible;
enabling once again allows one-touch wakeup-and-unlock-on-successful-
FP-auth, does nothing with failed FP auth, while disabling toggle
requires pressing power button to wake screen first before FP auth
will unlock.

Change-Id: I4d8204b5fed7d43baa93d6793e7280260ae404d6
2025-03-25 19:51:48 +02:00
Michael Bestas
d5606f0897
Hide SFPS wakeup setting when it's not supported
Change-Id: I22d4eb745379a6ca56b8fe23e1584131c4e945a6
2025-03-25 19:51:48 +02:00
Bruno Martins
bb2d75d8f9
fingerprint: Rework enrollment screen
This is based on the following changes, adapted to Android 12
considering the fact that AOSP now supports FOD as well as
fingerprint sensors embedded in the power button:

Author: d34d <clark@cyngn.com>
Date:   2016-06-23 11:21:45 -0700

    fingerprint: Allow devices to configure sensor location

    The text for enrolling a fingerprint always assumes the sensor is
    located on the back.  This patch adds a config integer that defines
    where the sensor is located on the device.
      0 = back
      1 = front
      2 = left side
      3 = right side

    This patch also adds a new drawable that shows the front of the device
    when applicable.

    Change-Id: Ia8f5f8ff4ba4d13d35aed3052f60ff665dd4f294
    TICKET: CYNGNOS-3089

Author: Paul Keith <javelinanddart@gmail.com>
Date:   2018-01-26 22:23:03 +0100

    FingerprintEnrollFindSensor: Don't overlay front for side sensors

    * Both the base image and the base image + overlay are equally nonsense
      for devices with a side fingerprint scanner, but for those that overlay
      a custom fingerprint enrollment graphic, this image overlay wreaks havoc
    * Only set this overlay to be visible if the sensor is on the front, to
      allow devices with side sensors to only overlay the base image

    Change-Id: I7cbcea4830d4526cf9f7d139e7f84f21117fa9c4

Author: Michael W <baddaemon87@gmail.com>
Date:   Thu Jan 17 21:44:28 2019 +0100

    Settings: Make find fingerprint look great again

    * The current logic places the animation based on the size of
      the whole overlay instead of the image, which is a fixed-size png
    * Get the size of the image instead and place the dot relative to it
    * Also use "wrap_content" and add a padding to the top so the
      distance to the text is a fixed thing, not depending on how
      much space relative to the wanted space it actually takes

    * Preview: https://imgur.com/a/XanJ2aP

    Change-Id: I2bd08cee1abd1c6bad78ca1efc2189e573ded3cc

Author: LuK1337 <priv.luk@gmail.com>
Date:   Sat Dec 15 17:11:41 2018 +0100

    fingerprint: Remove unnecessary spacing in enroll layout

    * This makes it look ugly on 480 dpi devices.

    Change-Id: Ia1bbd443063a125878dddd12e5c6a816d289fb82

Author: Bruno Martins <bgcngm@gmail.com>
Date:   Thu Mar 17 10:30:41 2022 +0000

    FingerprintEnrollEnrolling: Set proper dialog message when user touches fp icon

    Change-Id: Iafd86e636b0c54bbddcf26d153cc671259391259

Author: Michael Bestas <mkbestas@lineageos.org>
Date:   Tue Dec 6 20:40:45 2022 +0200

    Use AOSP string for side fps enrollment

    Change-Id: I9267b6a75716f45044f4d7a51650ca4f928b104e

Author: Bruno Martins <bgcngm@gmail.com>
Date:   Tue Apr 18 16:16:34 2023 +0100

    FingerprintEnroll: Add config for dedicated side mounted fps

    Google likes to assume that there only exists devices with
    fingerprint sensor embedded in the power button, but that's
    not always true. Since specific enrollment messages were added
    just for those devices, we need to address our own usecase.

    Change-Id: I56a7d7fe0374fe5a1fce5e24bdbb265cb5edc246

Change-Id: If372ef50c4a719e89a4e80cc20e3eb445af61bc6
2025-03-25 19:51:48 +02:00
Timi Rautamäki
87e186393e
fingerprint: hide link icon when there's no link
Test: verify fingerprint setup doesn't have link icon without a link.
Change-Id: I040500615815ffe9256089a9bc11b07da783fa79
2025-03-25 19:51:48 +02:00
Bruno Martins
70357db5c6
Settings: Add FastCharge preference into Battery settings
* Several OEMs let the user decide whether to enable or disable quick
   charging technology when using a quickcharge charger.
   Samsung, for example, exposes a sysfs node to disable it at
   will, depending on what the user sets in battery settings UI.

 * Disabling fast charge may be useful for reducing the heat produced by
   the device while charging, or for extending the lifespan of the battery.

 * This commit introduces a switch preference for disabling fastcharge
   on devices that support said feature.

Change-Id: I7dd09d357e9bd555a8efeaf9ee191e52b9f2d151
2025-03-25 19:51:48 +02:00
Jesse Chan
809f6c074d
Settings: Add an option to force pre-O apps to use full screen aspect ratio
When an app target pre-O releases, the default max aspect ratio
is 1.86:1 which leads to ugly black areas on devices that have
screens with higher aspect ratio (for example Galaxy S8/S9).

This change adds an option to allow users to change aspect ratio
for pre-O apps to full screen aspect ratio.

Change-Id: I0fb73511cf654ee22a4cfb7aef252008f8db8855
2025-03-25 19:51:48 +02:00
Jon Evans
4d9aad54da
Settings: display: Add wake on plug switch
Change-Id: I22ee2a05040561cca796814573adc5226f1f03d4
2025-03-25 19:51:48 +02:00
Bruno Martins
c2b71a4499
Settings: Add proximity check on wake preference
Splitted from commit 5aa2f34, adapted to the Lineage SDK
and squashed with commits c6dc688 and 19105ab.

Change-Id: I7516c833ff39de6bdb36c815a5292606cbaa0533
2025-03-25 19:51:48 +02:00