Commit Graph

57213 Commits

Author SHA1 Message Date
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
Michael Bestas
8d0f6ba6ac 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-08-28 13:35:07 +03:00
Ramii Ahmed
a24c8ede90 Settings: Display: Add High Touch Polling Rate Support
Change-Id: I86e85c5cd2cf462734ccad69b41b1977b32c7326
2025-08-28 13:35:07 +03:00
Michael Bestas
202c336281 Hide fingerprint settings help if URL is empty
Change-Id: I1631575bd6e48419f0649491a5ae167adf72c8c2
2025-08-28 13:35:07 +03:00
Terminator-J
fd16ae4d80 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-08-28 13:35:06 +03:00
Michael Bestas
acd39854ce Hide SFPS wakeup setting when it's not supported
Change-Id: I22d4eb745379a6ca56b8fe23e1584131c4e945a6
2025-08-28 13:35:06 +03:00
Bruno Martins
1062719df9 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-08-28 13:35:05 +03:00
Timi Rautamäki
4067b448fb 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-08-28 13:35:05 +03:00
Bruno Martins
4ab09243e3 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-08-28 13:35:04 +03:00
LuK1337
486f2ce5c5 Settings: Add high touch sensitivity and touchscreen hovering toggles
Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Change-Id: Ib8712d2d0c0fe4396dbea7c7fc130e0c253d3207
2025-08-28 13:35:03 +03:00
Tommy Webb
a3e4298433 POLICY_REJECT_ALL restricts all network access
Read and write POLICY_REJECT_ALL instead of manipulating the setting
designated for the restricted mode allowlist.

Requires: I74407c21cd4ed2cdd932d634577ae07d0bad67b1
Change-Id: I354fae215dcb15e1bf3a67ff4c94803eb60fcac1
2025-08-28 13:35:03 +03:00
Bruno Martins
dda1cd68c0 Settings: Move SIM restrictions currently applied to per-app data usage
When Google introduced commit d3b35f2, all the custom addons for
per-app network isolation became hidden on devices that set the
overlay config_show_sim_info to "false".

Expose only the toggles that really make sense, i.e. for the mentioned
usecase, leave the main toggle (restrict all), WiFi and VPN data
toggles.

Change-Id: I4720483d98ae69fbb6eec8fa749e8d071e91c629
2025-08-28 13:35:03 +03:00
Oliver Scott
f07da21855 AppDataUsage: Handle apps without INTERNET permission
* Disable network restriction toggles for apps without INTERNET permission

Change-Id: I1481b6f27912bf6559920e32b0072868d4f83a4c
2025-08-28 13:35:02 +03:00
Oliver Scott
0017a2f638 Settings: Add support for allowing/disallowing apps on cellular, vpn and wifi networks
*) Add options to disable all cellular, vpn and wifi data
   in app data usage settings.

*) Disable the existing background data and unrestricted
   data usage options when all cellular data access is
   disabled.

*) The vpn data option can be selected independently from
   the Wi-Fi and cellular options.

*) Prevent DataSaverBackend from overwriting uid policies

This is a replacement for the appops menu based cell/wifi data
restriction settings in cm-13.0:
Author: Danesh M <daneshm90@gmail.com>
Date:   Mon Mar 7 15:17:59 2016 -0800
    Settings : Add per app internet/data control
    CYAN-3976
    CRACKLING-834
    Change-Id: I13192df837c057b5cadde8f31532e12daaf3c1b0

Change-Id: Ic087c27a5ed0bdb84bb8f297c425c6bcbffec848
(cherry picked from commit d4a2eea698cbc4636a635d60f2a52ec1bbc36ba2)
2025-08-28 13:35:02 +03:00
Sam Mortimer
0b57abfdec Settings: Add support for allowing/disallowing apps on restricted networks
*) Add option to disable all network traffic
   in app data usage settings.

*) Disable the existing background data and unrestricted
   data usage options when all network traffic is
   disabled.

Change-Id: I0aaf5703d6dd5d6e6ec3cda3940f28833fe052ea
2025-08-28 13:35:02 +03:00
Adnan
fa351b4335 Settings: Add option to scramble pin layout when unlocking (1/2).
Change-Id: I3e2c200a0a31d3c765831bc30280029a50c88051
2025-08-28 13:35:01 +03:00
Michael Bestas
6d9d8a5819 Remove useless USB page header
* This causes the options to go off screen and almost always
  require scrolling in order to reach all the options.

Change-Id: I3880982978aa50f11bf24b4da6e91a0917181811
2025-06-22 13:02:41 +03:00
inthewaves
7a99c99e5f get outer NFC preference to listen for changes
The NFC preference in Settings -> Connected devices -> Connection
preferences doesn't listen to changes from the NFC tile. (This wasn't an
issue in Android 10, because there used to be a SwitchPreference that
listened there.)

Change-Id: I85842db3faa558ea61bc878ca76ff6d8ce1a4b02
2025-06-22 13:02:41 +03:00
Alexander Koskovich
20af3047f0 Handle mobile data on internet page during setup
Change-Id: Id00e9ef135cd2748376c69596979826e764e9185
2025-06-22 13:02:40 +03:00
Michael Bestas
13093942c1 Settings: Network setup UI changes for SUW
Co-authored-by: Dhina17 <dhinalogu@gmail.com>
Co-authored-by: Erfan Abdi <erfangplus@gmail.com>
Co-authored-by: Michael Bestas <mkbestas@lineageos.org>
Change-Id: Ic8e97b78f19e59fe108c7c3304dfe7e7f49020a9
2025-06-22 13:01:13 +03:00
Wang Han
29ce275eb5 Settings: Hide unsupported USB modes automatically
* The roles are advertised by USB HAL so we can check for their status

Change-Id: I5933d1a03f573af08b00039850173329b293448a
2025-06-22 13:00:17 +03:00
Luca Stefani
f13e716b6f Settings: Check if we have any color modes declared in overlay
* Checking for wide gamut support isn't always enough

Change-Id: Ic7257e37f2eca97450eaf0ca1e330de7596352be
2025-06-22 13:00:17 +03:00
Michael Bestas
2739162b84 Settings: Forward port pattern visibility settings (2/2)
Change-Id: Ic627953c5df854c442671a98b5da539b994da18b
2025-06-22 13:00:17 +03:00
Michael Bestas
34a8deb417 Settings: Forward port lock pattern grid size (2/2)
Co-authored-by: Alberto97 <albertop2197@gmail.com>
Co-authored-by: d34d <clark@cyngn.com>
Co-authored-by: Dhina17 <dhinalogu@gmail.com>
Co-authored-by: LuK1337 <priv.luk@gmail.com>
Co-authored-by: Roman Birg <roman@cyngn.com>
Change-Id: I7078d703c218cd096d9b77c003a94b52fbce6322
2025-06-22 13:00:15 +03:00
Michael Bestas
af730c7feb Don't reset A2DP offload when disabling developer settings
* We need to disable A2DP HW offload on FP4 for now, however
  disabling developer settings would enable offload again and
  break SBC and AAC audio. Just remove this section and allow
  this setting to persist after disabling developer settings.

Change-Id: I5b65b3887d68ac684d7ea78de0ee89fb7db9bb0f
2025-06-22 12:59:29 +03:00
Chirayu Desai
5c7cd83ac5 One does not simply become a Developer
Co-authored-by: Michael Bestas <mikeioannina@gmail.com>
Change-Id: I64ab4d7ab9d8334275d2e4d493b716a8fc73ab4e
2025-06-22 12:59:29 +03:00
Roman Birg
d58f018299 Settings: Add LineageOS legal info
Open up the LineageOS legal info in the browser.

Change-Id: I263ccc0509e275d17512528deb606341d58e7a0d
Ticket-Id: CYNGNOS-1895
Signed-off-by: Roman Birg <roman@cyngn.com>
2025-06-22 12:59:29 +03:00
Luca Stefani
581089a2ef Add toggle to enable ADB root
Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Co-authored-by: dianlujitao <dianlujitao@lineageos.org>
Co-authored-by: Luca Stefani <luca.stefani.ge1@gmail.com>
Co-authored-by: LuK1337 <priv.luk@gmail.com>
Change-Id: Ic80dbf79265c0fe7113f42299479873befb05004
2025-06-22 12:59:29 +03:00
Bruno Martins
e1b61b66ce BasebandVersionPreferenceController: Trim baseband if needed
Some Qualcomm MSIM devices report the baseband version twice.
Handle it gracefully, similarly to CAF.

Change-Id: I93bd071f31fed120c20185c4e0ec40edb7ca342b
2025-06-22 12:59:29 +03:00
LuK1337
638fab6e55 Settings: Add LineageOS entries into device info
Co-authored-by: Harry Youd <harry@harryyoud.co.uk>
Co-authored-by: Kevin F. Haggerty <haggertk@lineageos.org>
Co-authored-by: Timi <timi.rautamaki@gmail.com>
Co-authored-by: Tobias Tefke <tobias.tefke@tutanota.com>
Change-Id: I8d4c6869f8dfa34a96567bec18f9f8276b66a64e
2025-06-22 12:59:29 +03:00
Torsten Grote
c18a1ef322 Allow the user to change the BackupTransport
Set the following config overlays to activate this feature:

* config_backup_settings_intent to settings://com.android.settings.backup.transport
* config_backup_settings_label to some user-facing label
  e.g. Change backup provider
* config_ignored_backup_transports to hide transports from the list

Co-authored-by: Michael Bestas <mkbestas@lineageos.org>
Co-authored-by: Michael W <baddaemon87@gmail.com>
Change-Id: I080d96e2c34045a0e61f3fa1b839f463550f2028
2025-06-22 12:59:04 +03:00
Asher Simonds
4db73d66ce Settings: Bring in the new icon
* Part of the new iconset made by Asher Simonds

Co-authored-by: Michael W <baddaemon87@gmail.com>
Change-Id: Icdc71193c78642c9253f34b04f8629864f48212a
2025-06-22 12:58:16 +03:00
Vadym Omelnytskyi
a2d3155609 Revert "Screen Resolution: add space for 4-digit values"
This reverts commit 14050c89f5.

Reason for revert: b/406416297
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:626993cd66a1e2b75cc40445373d22503f73f19e)
Merged-In: Ib683398cf3c3753d2874e4f108c0bb09a9635ab5
Change-Id: Ib683398cf3c3753d2874e4f108c0bb09a9635ab5
2025-04-25 14:06:57 -07:00
tom hsu
edcb16bde3 Improve potential NPE problem
- Move CarrierConfigCache initialization to make sure the instance
   created.

Flag: EXEMPT bug fix
Fix: b/409841639
Test: atest pass
(cherry picked from commit 00ab92f97f2c04ca9f604f282542ffd9680f27fc)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9c2c6745859027b54628bea81a153856e2d8c753)
Merged-In: I07bf9eca1d271d0f38c4d12cd8e04d8a6d4623ed
Change-Id: I07bf9eca1d271d0f38c4d12cd8e04d8a6d4623ed
2025-04-21 19:27:43 -07:00
Steve Statia
1127cfb00f Fix hidden menu not showing phone information 100% of the time when opening.
The function that sends the special code is sending intents to all
users, which is creating an activity for both the work profile and the
system user. Whichever intent is received last will be the activity on
top and displayed to the user, and since the work profile's hidden menu does not include the 'Phone
information' option it creates this 'randomness' observed with opening the menu.

This change ag/29101523 started sending the broadcast as UserHandle.ALL, instead of just from the current user causing the reception of more than one intent.

This fix checks for the work profile and returns out of the function without starting another TestingSettings activity.

Flag: EXEMPT bug fix
Bug: 406016005
Test: manual test opening hidden menu, and opening after reboots
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:170fcaf31628d3faf689ce1b525bfba33052d877)
Merged-In: I5a7937ba484afd3ba81c55e66bc53c217a778d18
Change-Id: I5a7937ba484afd3ba81c55e66bc53c217a778d18
2025-04-01 20:42:13 -07:00
tom hsu
c8b730509d [Satellite] Restrict requestIsSupported only in Manual type
- SatelliteManager#requestIsSupported only can be used in Manual
   conneciton type. Hence add a type check with this API for the
   condition check

Flag: EXEMPT bug fix
Fix: b/395811260
Test: atest pass
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d033f603b819c5b1264d116648c9f6f00b061320)
Merged-In: Ia9fed86a63dd8fa87cc20a83888b3cabbf28ddd8
Change-Id: Ia9fed86a63dd8fa87cc20a83888b3cabbf28ddd8
2025-03-31 20:54:29 -07:00
tom hsu
e9e45b4a01 [Satellite] Refactor API usage to Util class.
Flag: EXEMPT refactor
Fix: b/403149290
Test: atest pass
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8916db934fb3d7dc1f94f67c7b409beeff2c6ac6)
Merged-In: I8f6375c59cbb2010ad9232b8abe71af60c6133f9
Change-Id: I8f6375c59cbb2010ad9232b8abe71af60c6133f9
2025-03-31 20:54:17 -07:00
Yuri Lin
0773c4d93f Merge "Merge bundle global & type preference controllers." into main 2025-03-24 12:13:24 -07:00
Chun Zhang
c6aa5cb8cb Merge "Check client null before calling and closing." into main 2025-03-24 10:16:18 -07:00
Chun Zhang
e4ff8c403c Check client null before calling and closing.
Bug: 404955994
Test: TreeHugger
Test: manual
Test: atest SafetySourceBroadcastReceiverTest
Test: atest LockScreenSafetySourceTest
Test: atest ActiveUnlockStatusUtilsTest
Test: atest WearSafetySourceTest
Flag: com.android.settings.flags.biometrics_onboarding_education
Change-Id: I34085b90fe41283e484d3b2235426676d886e69c
2025-03-24 15:11:24 +00:00
Treehugger Robot
dc01092e3b Merge "Customize Fingerprint Enroll FindSensor Activity" into main 2025-03-24 07:21:29 -07:00
Milton Wu
08b35a8729 Customize Fingerprint Enroll FindSensor Activity
Provide an interface for ODM/OEM to override fingerprint enrollment
findSensor page

Bug: 394232846
Flag: EXEMPT interface change
Test: adb shell am start -a android.settings.FINGERPRINT_ENROLL
      --ez skip_intro true
Change-Id: Iff61f0be49faf3581fa2b26e364ac8c8d61bdbf3
2025-03-24 02:12:54 -07:00
Zhibin Liu
32bc5aab59 Merge "Add support to configure state of operator name in status bar [2/2]" into main am: 7c598253ff
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3516771

Change-Id: Icbafc5ffafb3181412e181800505c3d8be6ae5f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-03-24 00:57:43 -07:00
Zhibin Liu
7c598253ff Merge "Add support to configure state of operator name in status bar [2/2]" into main 2025-03-24 00:15:24 -07:00
Jacky Wang
4dc8d32603 [Catalyst] Wi-fi calling is missing from PreferenceService
Bug: 388420844
Flag: com.android.settings.flags.catalyst
Test: manual
Change-Id: I7809ddba84805af52c9234f5f51d093c285db74a
2025-03-24 07:34:46 +08:00
Shawn Willden
fb2d3b7abb Catch security exception on isOemUnlockAllowed
As of Android 15, devices with FRP active will throw an exception when loading developer options attempts to update the OEM unlock state, which causes the app to crash.  This CL just catches the exception and reports that OEM unlock is not, in fact, settable.

A full fix should probably tell the user that OEM unlock may not be set because FRP is active, rather than just quietly failing and logging the situation, but because GMS Core is soon going to begin blocking access to the Android UI when FRP is active, meaning that developer options won't even be reachable and the user will be informed about FRP state by GMS Core, the effort that would require isn't justified.

Note that this CL does not add a test for this change because it is not possible for CTS to put the device in FRP-active state to test the relevant case.  Manual testing is required.

Test: SettingsUnitTests
Flag: EXEMPT bugfix
Bug: 405023810
Change-Id: Ic43de93a4208bbc17f2e287d52f9baf281cd678c
2025-03-21 15:46:11 -07:00
Yvonne Jiang
081fab1330 Merge "Update "Manage PIN" entry point." into main 2025-03-21 15:05:09 -07:00
Yvonne Jiang
2887142833 Update "Manage PIN" entry point.
- Updates default icon to outlined version
- Makes availability conditional on existence of supervising credential
- Does not disable entry point when the main switch is disabled

Bug: 405159398
Test: atest SupervisionPinManagementScreenTest
Test: atest SupervisionDashboardScreenTest
Flag: android.app.supervision.flags.enable_supervision_settings_screen
Change-Id: I764a6b767019007a93aacf29ecf47677e16cb058
2025-03-21 12:10:30 -07:00
tom hsu
8be6d98b1f [Satelllite] Avoid using "add ESIM page"
- When user clicks preference UI, show a dialog to nofity user
   satellite session.

Flag: EXEMPT bug fix
Fix: b/402544816
Test: atest pass
Test: Manual test

Change-Id: Ifeff9368fed906bc56abcc8eb23748a71f79ee4d
2025-03-21 13:48:21 +00:00