Commit Graph

57286 Commits

Author SHA1 Message Date
Danny Lin
e7d38634a2 Settings: Fix invalid private DNS help text if URI is missing
AOSP does not have help URIs configured, so there is no relevant content
to show in the private DNS dialog's help text section, and the preference
controller never sets the content of the help text view. This results in
a random irrelevant message related to Bluetooth audio being shown in
the dialog: "Gray-out means not supported by phone or headset"

This is caused by the private DNS dialog sharing the
preference_widget_dialog_summary snippet with Bluetooth A2DP codec
settings. To fix this issue, we can hide the help text view entirely if
there is no help URI defined.

Change-Id: Ie74a1be347351a6db68412321d0c68f3138fae6b
Signed-off-by: Joey Huab <joey@evolution-x.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:25 +09:00
minaripenguin37
85c24e4cea Settings: Add more DNS providers
Co-authored-by: Hưng Phan <phandinhhungvp2001@gmail.com>
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:25 +09:00
Adam Lawson
daac5ad57c Settings: Add AdGuard DNS as a private DNS Provider
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:25 +09:00
DarkJoker360
45939de619 Settings: Add a toggle to force LTE_CA
Change-Id: I017be698dc6c438edf2236df7c0125c05202bf3b
Signed-off-by: DarkJoker360 <simoespo159@gmail.com>
2025-12-10 00:41:25 +09:00
Ido Ben-Hur
c09ba4c11f Settings: Allow disabling color inversion support [2/2]
Via an overlay
Some kernels won't support that no more

Change-Id: I4f63f36a0134aa612609fe6e574046e01baf1df3
2025-12-10 00:41:25 +09:00
minaripenguin
5154710c9b Settings: Properly handle ASI and WallpaperPreference for gms and vanilla builds
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
2025-12-10 00:41:25 +09:00
Pranav Vashi
10ca41a9f6 Add deep sleep preference controller [2/2]
Change-Id: If270186b7788d95bfb4f555c0bc6f7eb3367e95f
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-12-10 00:41:25 +09:00
someone5678
53b71e539d Settings: Make all user apps cloneable
* Filter system apps and overlays
* Include pre-defined apps in com.android.internal.R.array.cloneable_apps

Change-Id: Ia08a1095cd2aec9c6d77d055f1344e57225a44d5
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-12-10 00:41:25 +09:00
Pranav Vashi
9051e97b8c Settings: Use font configs instead fonts directly
Change-Id: I2c93301a7a9aa640278c62912ee6a54dbe29589c
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-12-10 00:41:25 +09:00
Mazda--
530e4adc08 Developer options toast insulter
Inspired by the Bash insulter written by hkbakke

https://www.ostechnix.com/bash-insulter-script-insults-user-typing-wrong-command/

Change-Id: I48d52de431de1eedf7a965a83a7dcb464ef3ed3a
Signed-off-by: Joey Huab <joey@evolution-x.org>
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-12-10 00:41:25 +09:00
Alex
ce4586c514 Settings: Change kernel preference behavior
Before you could only click once to see the full kernel version and if
you wanted it to go back to the short version, you had to exit the fragment.

Now you can click between the two (short and long).

Change-Id: I6f89d6b145d5cc7b9cca6febc3651904b98da80c
Signed-off-by: Joey Huab <joey@evolution-x.org>
2025-12-10 00:41:25 +09:00
xoomdev
1c07f1725a Settings: Show full proc/version information
patch set 2: view unformatted kernel version on clicking
  the formatted kernel version

[ Stallix - Evo X ]

* Adapted for KernelVersionPreferenceController on Pie

Change-Id: I2b211fb72c25cc119f2a464b04821fcef77a8908
Signed-off-by: Arghya Chanda <arghyac35@gmail.com>
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
Signed-off-by: Joey Huab <joey@evolution-x.org>
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-12-10 00:41:25 +09:00
AnierinB
f4515f015b Settings: Initial Evolution X rebrand
Co-authored-by: AnierinB <anierin@evolution-x.org>
Co-authored-by: Jackeagle <jackeagle102@gmail.com>
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Co-authored-by: ganeshi4u <ganeshvarmai4u@gmail.com>
Signed-off-by: AnierinB <anierin@evolution-x.org>
2025-12-10 00:41:11 +09:00
Michael Bestas
cee9137640 Merge tag 'android-security-16.0.0_r3' into staging/lineage-23.0_merge-android-security-16.0.0_r3
Android security 16.0.0 release 3

* tag 'android-security-16.0.0_r3':
  Import translations. DO NOT MERGE ANYWHERE
  Backport BT pairing dialog changes
  [nfc] Fix string injection in default payment app selector
  Add check to prevent privilege escalation from trampoline added in change Ie469c47005afb941f5646a2f790736362c23c697.
  Hide sensistive content from locked profiles
  Prevent SettingsSliceProvider from accessing unused packages
  Ignore face settings extras when called by an external package.
  startActivityForResult with earlier new Intent
  Hide notification content in history
  Use correct API to get calling package name in CredentialStorage
  Drop PendingIntent extras from external packages during enrollment.
  Do not enable the Content Protection toggle for non-admin users.
  Add ComponentName explicitly to make sure arbitary intents aren't launched from Settings.
  AppRestrictions - use vetted component
  Add battery health tip

Change-Id: Ifbcbfcc5e95e3b69085c9c7f795914ec21b4d0a9
2025-12-07 21:01:34 +02:00
Haijie Hong
8ec6581ae7 Backport BT pairing dialog changes
This is a combination of two commits against b/409868905, merged for
backport convenience.  It updates the string and button style for the BT
pairing dialog.

Bug: 236134583
Bug: 236134775
Test: local tested
Flag: EXEMPT minor style update
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:22378fd5a1bb2ca8d63f5df4e47c0af218c66a57
Merged-In: Icd9f509b5363b3ec3900738e21486e54d4e66e4b
Change-Id: Icd9f509b5363b3ec3900738e21486e54d4e66e4b
2025-10-10 14:23:05 -07:00
James Eidson
aa744e8988 [nfc] Fix string injection in default payment app selector
Backwards compatible port of ag/35084316

Bug: 429417453
Test: Manually by installing settings app
Flag: EXEMPT security fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6c723a4361950e8e43cc5caf67455bd2f00911d1)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:b04265c1b84104884654d4957c5fb3a8ac84bc00
Merged-In: I670774a5efa6f543a5e1e06798a5d6ebb1c48c1d
Change-Id: I670774a5efa6f543a5e1e06798a5d6ebb1c48c1d
2025-10-10 14:22:38 -07:00
Joe Bolinger
83447688f8 Add check to prevent privilege escalation from trampoline added in change Ie469c47005afb941f5646a2f790736362c23c697.
Add additional check in enrollment base class.

Flag: EXEMPT CVE_FIX
Bug: 418774489
Test: atest FaceEnrollTest FaceEnrollIntroductionTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c07d03e5ef9ff05f34b6358440af6770044579ae)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:e0476f87117c1b689b96c9a37ac12162d79c6cf6
Merged-In: I49f4a980a0c9ed80cc2e370a42bd60425d018a4c
Change-Id: I49f4a980a0c9ed80cc2e370a42bd60425d018a4c
2025-10-10 14:22:09 -07:00
Julia Reynolds
596c7b9911 Hide sensistive content from locked profiles
Test: manual
Flag: EXEMPT bug fix
Bug: 396666065
(cherry picked from commit b1bfda5a03c6d21a16da0de2eb77340536400ca6)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:0c2075c139445d83491ee9ad9991e55e7b32ff6b
Merged-In: Ie7705a1ceea54203585c3b3737d0bada68aa1469
Change-Id: Ie7705a1ceea54203585c3b3737d0bada68aa1469
2025-10-10 14:21:41 -07:00
Mill Chen
586f8dedd8 Prevent SettingsSliceProvider from accessing unused packages
DISABLE_TOPIC_PROTECTOR

Bug: 388034510
Test: adb shell cmd slice get-permissions com.android.settings.slices
      atest SettingsSliceProviderTest
Flag: EXEMPT security issue
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:fc32bd01fa26a116c4217fec157be43f01633add
Merged-In: Ia655fbb9cb46f192559b82f957e3b2f0dd86946c
Change-Id: Ia655fbb9cb46f192559b82f957e3b2f0dd86946c
2025-10-10 14:21:13 -07:00
LuK1337
8fb73c62d4 Settings: Switch back to udfps_enroll_enrolling_non_scroll layout
New one seems halfbaked? The UDFPS icon is misaligned when using it and
progress circle is missing.

Change-Id: I19d0a1ff973d79381f0f315469c823afedde9c02
2025-10-04 23:45:21 +02:00
Michael Bestas
f678426e9e Merge branch 'android16-security-release' of https://android.googlesource.com/platform/packages/apps/Settings into lineage-23.0
* 'android16-security-release' of https://android.googlesource.com/platform/packages/apps/Settings:
  Hide sensistive content from locked profiles
  Ignore face settings extras when called by an external package.
  startActivityForResult with earlier new Intent
  Use correct API to get calling package name in CredentialStorage
  Prevent SettingsSliceProvider from accessing unused packages
  Hide notification content in history
  Do not enable the Content Protection toggle for non-admin users.
  Add ComponentName explicitly to make sure arbitary intents aren't launched from Settings.
  AppRestrictions - use vetted component
  Drop PendingIntent extras from external packages during enrollment.

Change-Id: I2e6b262a366c24202897f3e040825f9e41d31a02
2025-09-12 17:57:21 +03:00
ReallySnow
8f7cf2c861 Settings: DevicePicker: Adapt to S style
Change-Id: Idd83ad50070c0541136afe02502752e75d6b162d
2025-08-28 13:38:21 +03:00
jhenrique09
9deea9c089 SlicesDatabaseHelper: Use Build.VERSION.INCREMENTAL
Change-Id: Ibf41df806c7f7c5b1671377a713817d3aed076bf
2025-08-28 13:38:20 +03:00
maxwen
b25bd103be Settings: fix typo in settings namespace for qr scanner on ls
its in secure and not in global

Change-Id: I2ec4d93a25f9aed3e9db2151c72fb21918905cdc
2025-08-28 13:38:20 +03:00
ExactExampl
720337de41 Partially revert "[Settings] Start SettingsDumpService to dump the db log after the db is"
'Start SettingsDumpService after the MobileNetworkRepository is
created' sends the intent every single time the
NetworkDashboardFragment is instantiated (basically every time user
opens the network dashboard in Settings).

SettingsDumpService's lifecycle never finishes, since it's context is
passed to the MobileNetworkRepository for singleton instance creation
which then proceeds to holding a reference to that context thus keeping
the entire service alive along with the application process, which
prevents the static singleton from being garbage collected creating an
indirect retention cycle. All that over time grows into a solid memory
leak.

SettingsDumpService (as well as MobileNetworkRepository instance,
obviously) proceed to dangling until the app process gets eventually
killed by the lmkd (which is unlikely to happen but still was observed
on several devices running stock ROM) or manually terminated by user,
but based on the observation, maximum time of dangling could be
perfectly equal to global system uptime.

This issue still remains all the way up to latest AOSP tags and betas,
although some vendors stock ROMs seem to have sorted it out.

Since we don't really care about dumping mobile network info
(especially in production builds), do the minimum changes required to
remove the dumping feature and avoid future AOSP merge conflicts.

This partially reverts commit d6f3ad9178.

Change-Id: Ifd7ded6cebd5f247cbdeb88035fdeb21cf060412
2025-08-28 13:38:19 +03:00
Alexander Martinz
28c40f76d1 Fix development color mode preference
This is a sed gone wrong.
It was unintentionally changed in 15ca95a31b
which broke functionality.

Change it to a SwitchPreferenceCompat instead of changing it back
to a SwitchPreference, as all the other preferences in the
development section are one as well.

Change-Id: Id276d3b67c103b83ba01a69ff2991246c69efc69
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2025-08-28 13:38:19 +03:00
Rashed Abdel-Tawab
4d7aa10c21 Settings: Only show gesture navigation if device has a software nav bar
Change-Id: Ic90c8a194a736807c2e101ffd5f7e90c86a55381
2025-08-28 13:38:18 +03:00
Alexander Koskovich
95d3909299 Add a mobile data toggle for setup
mIsInSetupWizard was moved to top of NetworkProviderSetting's onCreate
so it is available for addPreferences().

Change-Id: I9299c3033e96bcd30450ec239f14fb5daa800d63
2025-08-28 13:38:18 +03:00
LuK1337
736da0ca6c Settings: Make SIM toggle unchangable when not supported
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8290
Change-Id: I2e566c24969708c31f607af2baad88b388bda74d
2025-08-28 13:38:18 +03:00
Michael Bestas
0979c853ed 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-08-28 13:38:17 +03:00
Tommy Webb
9c0141b6d7 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-08-28 13:38:17 +03:00
Michael W
e3863afe68 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

Co-authored-by: AnierinB <anierin@evolution-x.org>
Change-Id: I666ebd7f90c11f1836bac10f7fca38baa5aedf93
2025-08-28 13:38:16 +03:00
shoya0x00
9486e87179 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-08-28 13:35:16 +03:00
althafvly
6b959b35d8 Revert "[Sim UI enhancement] remove the "Tap to show info""
This reverts commit c6eba747db.

Change-Id: Ib8403ca842a4655d1526b27f1965feeee336c687
2025-08-28 13:35:16 +03:00
Michael Bestas
119bee2b19 Make battery cycle count configurable and disable it by default
Most devices don't report valid cycle count.

Change-Id: I32478dac8ff409cd90506495eca42b9df987919b
2025-08-28 13:35:15 +03:00
Michael Bestas
84931b1952 Hide unavailable battery info
Some devices wrongly report 0 for battery info.

Change-Id: Icee022c7d37c79cdd72c607cb43c9827c871e4da
2025-08-28 13:35:15 +03:00
Jyotiraditya Panda
72d0f90f30 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-08-28 13:35:14 +03:00
Michael Bestas
89224a355b Make battery info configurable and enable it by default
Change-Id: If38db229e420e9f7c0ac26abb42a2a309b2f87c2
2025-08-28 13:35:14 +03:00
Tommy Webb
a8f79a720f 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-08-28 13:35:14 +03:00
Bruno Martins
668fe20d73 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-08-28 13:35:13 +03:00
Michael W
39b160805c 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-08-28 13:35:13 +03:00
Timi Rautamäki
25703bbd96 Settings: make sure Wifi exists before adding controllers
Change-Id: I6c1fd5222aa9fd33cbec67b8f572d031bfe86466
2025-08-28 13:35:13 +03:00
LuK1337
ff72204814 Settings: Add lineagehealth IFastCharge interface support
Change-Id: If5b88efde3bf71e6c38ee0e6ac812ed1a3287b13
2025-08-28 13:35:12 +03:00
Chirayu Desai
8e37b18872 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-08-28 13:35:11 +03:00
juwei
a53f729545 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-08-28 13:35:11 +03:00
LuK1337
9e41f0a74f Settings: Pass empty lottie resource for quickly open camera animation
This lets us hide it properly.

Change-Id: I02ac031a835236811b82a7de283335390ffebab9
2025-08-28 13:35:10 +03:00
Bruno Martins
ebad4b2314 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-08-28 13:35:09 +03:00
Chirayu Desai
a61e80f580 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-08-28 13:35:08 +03:00
Cédric Bellegarde
bcb10b0f4f Settings: Add preference for one shot auto-brightness
Co-authored-by: Eamon Powell <eamonpowell@outlook.com>
Change-Id: I57f11ad4e8fc47b2ff2c771e61920780e359815f
2025-08-28 13:35:08 +03:00
LuK1337
e0f55b467f Settings: Add min refresh rate list preference
Change-Id: Iac1f65ab09717ea55a5b471e094385c77ba894ee
2025-08-28 13:35:08 +03:00