Commit Graph

148044 Commits

Author SHA1 Message Date
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
Sam Mortimer
49fbdbe055 Settings: Add hotspot setting to allow VPN upstreams
Co-Authored-By: Sage Cheng <sagecheng@calyxinstitute.org>
Change-Id: I34924fe8e60e3d492f219aa6d0ffa54f0bd46e38
2025-08-28 13:35:01 +03:00
Android Build Coastguard Worker
a88303033f Merge cherrypicks of ['googleplex-android-review.googlesource.com/33629809', 'googleplex-android-review.googlesource.com/33629810', 'googleplex-android-review.googlesource.com/33646576', 'googleplex-android-review.googlesource.com/33607203', 'googleplex-android-review.googlesource.com/33909851', 'googleplex-android-review.googlesource.com/33751637', 'googleplex-android-review.googlesource.com/33923313', 'googleplex-android-review.googlesource.com/34044915'] into 25Q2-release.
Change-Id: I5f332baa008006699a4c3386d544e38d68db3a31
2025-08-12 18:52:22 -07:00
Joe Bolinger
2aa27461a4 Ignore face settings extras when called by an external package.
Bug: 411418366
Flag: EXEMPT bug fix
Test: manual from any user not 0 (adb shell am start -a android.settings.FACE_SETTINGS --ei android.intent.extra.USER_ID 0)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:486947205e05e83314bd76e4822af442ca82be9c)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0baf462586f1bc99a120e005c5d273bd8cfa01e9)
Merged-In: I06193e421a140a90568251fc25baa7fc81c12d78
Change-Id: I06193e421a140a90568251fc25baa7fc81c12d78
2025-08-12 18:50:40 -07:00
Adam Bookatz
25ed933c4c startActivityForResult with earlier new Intent
We already make sure to use a copy of the Intent, but now we do so
earlier. See bug.

Bug: 353680402
Flag: EXEMPT bugfix
Test: manual
Test: atest com.android.settings.users.UserSettingsTest
            com.android.settings.users.UserDetailsSettingsTest
(cherry picked from commit b7240e2f0c50455a1c8f3ae1fc4f27d55b86e89b)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d8166274a030372f9b1184137fceef9d4dac83e1)
Merged-In: I860e9e606de6b8d3c99fa52a63b72ba7a99ce179
Change-Id: I860e9e606de6b8d3c99fa52a63b72ba7a99ce179
2025-08-12 18:50:32 -07:00
Julia Reynolds
504a34c4d4 Hide notification content in history
- if the user is locked
- and the user has chosen to hide sensistive content when locked

Test: manual with a work profile with a different pin
Bug: 378088320
Flag: EXEMPT bug fix
(cherry picked from commit 9df37c3f8be2dedd2e44e52da4de45fba33c6a6e)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ac4d72060aeb282d5c1c024438ed9e0689b50031)
Merged-In: Ia70454d9859fb788ffa1f48f88760f88c354cdff
Change-Id: Ia70454d9859fb788ffa1f48f88760f88c354cdff
2025-08-12 18:50:25 -07:00
Rubin Xu
0f61e58687 Use correct API to get calling package name in CredentialStorage
Activity.getCallingPackage() does not always return the package
name of the actual calling app. getLaunchedFromPackage() should
be used instead.

Bug: 389681530
Test: manual
Flag: EXEMPT bugfix
(cherry picked from commit 70bd3efe0674bccb0d454845d86fb2402779a7bf)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:48e4b5e1af2156dc0db1546df1c14030e77e542e)
Merged-In: Ibdbc45e53f4aa46fae79fa234705b3735bfda4cd
Change-Id: Ibdbc45e53f4aa46fae79fa234705b3735bfda4cd
2025-08-12 18:50:18 -07:00
Joe Bolinger
d50de07930 Drop PendingIntent extras from external packages during enrollment.
Bug: 388528350
Flag: EXEMPT bugfix
Test: atest FingerprintEnrollIntroductionTest FaceEnrollIntroductionTest
(cherry picked from commit 4ccdeee849d5fef78498ba33cadc525523efcbd7)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9dd5ed1cea0449812775fb76a46f8be2e6862425)
Merged-In: I61281dcf95e53100a96d6a218f3f00fd1b4ea3f9
Change-Id: I61281dcf95e53100a96d6a218f3f00fd1b4ea3f9
2025-08-12 18:50:11 -07:00
Adam Bookatz
dc41d27f1b Do not enable the Content Protection toggle for non-admin users.
Flag: EXEMPT bugfix
Bug: 409318132
Test: m -j256 Settings && atest
SettingsRoboTests:ContentProtectionTogglePreferenceControllerTest
(cherry picked from commit ef801e1a8ec3a18ce9e0221fc7e1dfe495d0be8a)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:094c9df207d9bb430427dadc2e327b4834b57b01)
Merged-In: I46609c795923d427a5b7fa10bc2e8b071fad72d6
Change-Id: I46609c795923d427a5b7fa10bc2e8b071fad72d6
2025-08-12 18:50:04 -07:00
Aseem Kumar
e985e294f1 Add ComponentName explicitly to make sure arbitary intents aren't launched from Settings.
Bug: 378902342
Flag: EXEMPT security fix
(cherry picked from commit 6a896b6b26d445800773e1b4649895bea17eac1f)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ade7c77634363b787e8e73591247d9dff2b1b149)
Merged-In: I0e67f1258cb427c5b998e40a8a0c104af3ead042
Change-Id: I0e67f1258cb427c5b998e40a8a0c104af3ead042
2025-08-12 18:49:54 -07:00
Adam Bookatz
e12156e2d8 AppRestrictions - use vetted component
After vetting the intent, use the component we used for the vetting.

Bug: 353680402
Bug: 365739560
Test: manual
Flag: EXEMPT bugfix
(cherry picked from commit d3e34060803c97ae05719fe9301026e5c54892c8)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:586422578de58f1da68fd9becf89a08ea2ae0058)
Merged-In: Iff0d820c1261c29eb6703bf89194339cba700688
Change-Id: Iff0d820c1261c29eb6703bf89194339cba700688
2025-08-12 18:49:45 -07:00
Julia Reynolds
0c2075c139 Hide sensistive content from locked profiles
Test: manual
Flag: EXEMPT bug fix
Bug: 396666065
Change-Id: Ie7705a1ceea54203585c3b3737d0bada68aa1469
(cherry picked from commit b1bfda5a03c6d21a16da0de2eb77340536400ca6)
2025-07-02 10:32:08 -07:00
Treehugger Robot
c8cd292a99 Merge "Ignore face settings extras when called by an external package." into security-aosp-25Q2-staging 2025-06-27 12:35:09 -07:00
Bruno Martins
5df9be2540 Settings: Allow devices to provide remote gesture preferences
* Not all devices can use common gestures as implemented in LineageParts

Change-Id: Iae4ca9fc686e3dc82411524688841211e0cceb7b
2025-06-22 13:02:41 +03:00
Zhao Wei Liew
fe928c3843 Settings: gesture: Add LineageParts touchscreen gesture settings
We'll allow devices to add touchscreen gesture settings
using the LineageHW TouchscreenGesture API.

Change-Id: I569b91ed66d34097a2bd96fb56af660a2702224b
2025-06-22 13:02:41 +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
Rashed Abdel-Tawab
77692e85e7 Settings: Add double tap to sleep preference
* Place it under Display settings, near the existing
   double tap to wake preference.

Change-Id: I0baa49f9367331febf29260a0f60ba3a020be729
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
Danny Lin
c1590bf7b9 Fix inconsistent USB preference screen title
The title of the USB preference screen ("USB Preferences") is
inconsistent in several ways:

1. It doesn't match the title of the preference that launches it
2. No other preference screens say "preferences" in their title, since
   it's redundant
3. It violates the Material text conventions, which prefer to not
   capitalize titles in the UI

This commit changes it to "USB", which fixes all of the inconsistencies
listed above.

Change-Id: I7330a9e4e121d57ee2140ef60aefb4412b1fe728
2025-06-22 13:02:41 +03:00
Paul Keith
7e1173dcdf Settings: Add livedisplay preference screen
We can't inject via IA if we want to disable the preference via
config_enableLiveDisplay

Change-Id: I482a073e9c699d3f2bc5870567d603ceca2065b1
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
Timi Rautamäki
d25dbfa776 Settings: use Glif themed button bar
Change-Id: I7b7c522730806ee9c8cc83e4f560a344a089cbec
2025-06-22 13:00:17 +03:00
Jesse Chan
2f368378dd Settings: Implement hide gestural navigation hint bar
Change-Id: I14dd73414c9f7ee1b01f315c9eeae0fd3ac4f859
Signed-off-by: Jesse Chan <jc@lineageos.org>
2025-06-22 13:00:17 +03:00
Steve Kondik
170340bc59 Settings: Add a RemotePreference for device-specific doze settings
* If a device has its own panel, we should replace the item under
   display settings instead of having to clutter up the dashboard.
 * Devices that provide Doze settings typically implement own AOD pref,
   so hide AOSP one.
 * This uses the new RemotePreference API to allow the external
   app to update the view.
 * The action for this is "org.lineageos.settings.device.DOZE_SETTINGS".

Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Change-Id: I22fd7e6307b370807415ce2132bed4808b2befe1
2025-06-22 13:00:17 +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
7625635bb8 Settings: Fix the failing strings
Having double quotes around the strings causes crowdin
to export translations with unescaped quotes.
Removing them has no side effect and fixes crowdin export.

Change-Id: I93865d793eef711f8738e00e843e9d4670724c66
2025-06-22 12:59:29 +03:00
Sam Mortimer
ce15d330cc Settings: Add LineageParts charging sound settings preference
Replace the existing AOSP setting with this.

Change-Id: I13894a86bcfad8d1dfaedc2dcbca6ad70f651b5c
2025-06-22 12:59:29 +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
Michael Bestas
3a00671373 Settings: Hide "Mainline module version" preference
* Remove misleading titled preference (Google Play system update)
* This is always set to current android version for AOSP

Change-Id: Ie9799e87de2f3a3421ff501ed8937f5f684458ee
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
Steve Kondik
0e30559b26 Settings: Add rotation settings
* Links to LineageParts

Change-Id: I896c53089fca0ee3b0e867144bb1d72fe8946eaf
2025-06-22 12:59:29 +03:00
LuK1337
5f81556f83 Settings: Depend on LineagePreferenceLib
Change-Id: I553ae8e2a3eaaf7f13551180c97cd369f67ad14d
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
Sam Mortimer
5d92270e99 Settings: Depend on lineage platform library
Change-Id: I9f23ed70ba4eba9a0008c33ecc4b048c23ca9be3
2025-06-22 12:59:28 +03:00
LuK1337
159eee0278 Settings: Put device info header above "Basic info"
Change-Id: I8db12e882c16d6afa0e04bc1c4e93f7ec99960ed
2025-06-22 12:59:04 +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
Treehugger Robot
ea8022feeb Merge "startActivityForResult with earlier new Intent" into security-aosp-25Q2-staging 2025-06-20 11:52:40 -07:00
Treehugger Robot
145b4a0870 Merge "Prevent SettingsSliceProvider from accessing unused packages" into security-aosp-25Q2-staging 2025-06-19 10:17:12 -07:00
Joe Bolinger
0baf462586 Ignore face settings extras when called by an external package.
Bug: 411418366
Flag: EXEMPT bug fix
Test: manual from any user not 0 (adb shell am start -a android.settings.FACE_SETTINGS --ei android.intent.extra.USER_ID 0)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:486947205e05e83314bd76e4822af442ca82be9c)
Merged-In: I06193e421a140a90568251fc25baa7fc81c12d78
Change-Id: I06193e421a140a90568251fc25baa7fc81c12d78
2025-06-12 17:00:28 -07:00