Commit Graph

391 Commits

Author SHA1 Message Date
Edgar Wang
1341de6527 Protect App pinning
When user try to disable lock device when unpinning:
If set screen lock, we should confirm pattern/pin/password.

Fixes: 277578736
Test: manual verify
Change-Id: I7193944c4ba0113b14c16dcf0109b0d114227a68
2023-05-30 08:32:27 +00:00
TreeHugger Robot
1e68cd7694 Merge "Remove search entries from old pages when SC is on." into udc-dev am: d2e8495f4c am: cbd61dd5cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23122025

Change-Id: I5fc013890ea0b48796df9a8af100a2593f42e2cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 09:25:50 +00:00
Elliot Sisteron
d86c590440 Remove search entries from old pages when SC is on.
There was already some code to guard this, but this wasn't overriding
the `isPageSearchEnabled` as well to support dynamic indexing.

Bug: 280596858
Test: manual
Change-Id: If4793d9fa2a7d68eac78258c18d04e9fb7d8fcea
2023-05-10 13:48:03 +00:00
Florian Mayer
d8526d4c9c Merge "Fix typo in MemtagHelper" into udc-dev am: d7bbff0041 am: b112a868a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22931417

Change-Id: Iaed6b8d9d579e2bb5f96bdb427ed3779933dd731
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-01 11:41:54 +00:00
Florian Mayer
411d78c06c Fix typo in MemtagHelper
Bug: 280034968
Change-Id: I5977925399342cd79f0bed2dd4af0e21c0c20102
2023-05-01 10:25:04 +00:00
Treehugger Robot
1913ccb650 Merge "Store the PIN length to disk when Pin auto confirm feature is enabled" into udc-dev am: e1ae1c6516 am: 5d0874cb25
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22550309

Change-Id: I1f787a88856556a7ca122e91ea34c40678ce3ce3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 21:14:27 +00:00
Treehugger Robot
e1ae1c6516 Merge "Store the PIN length to disk when Pin auto confirm feature is enabled" into udc-dev 2023-04-14 20:46:49 +00:00
Avinash Vadlamudi
7183e83b0b Store the PIN length to disk when Pin auto confirm feature is enabled
Bug: 267222046
Test: Manual test
Change-Id: I4f76e607ea7fb08d20a042e49c9669f8988aeff8
2023-04-14 16:39:19 +00:00
Florian Mayer
fd9c686cd9 Merge "Move bootloader_override property" into udc-dev am: f58ea4671e am: ab14241e64
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22234234

Change-Id: I8c841b5198babacd18ca85c581992ff89e3600a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-07 21:25:50 +00:00
Florian Mayer
f58ea4671e Merge "Move bootloader_override property" into udc-dev 2023-04-07 20:06:25 +00:00
Florian Mayer
1ef1073694 Move bootloader_override property
Bug: 274953227
Change-Id: I391329a14a5dda741103bd0097fee65ea97c866a
2023-04-07 18:32:30 +00:00
Avinash Vadlamudi
a17651940a Merge "[Auto Pin Confirm]: Trigger PIN verification when auto confirm setting is being turned on or off" into udc-dev am: 5e8769bcc5 am: 2d6a86a8e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22290364

Change-Id: Ia830bd387c52eb1f50096534ca8ee5bafc0b7fc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 06:18:25 +00:00
Avinash Vadlamudi
a4cf551d25 [Auto Pin Confirm]: Trigger PIN verification when auto confirm setting is being turned on or off
- Fix the logic to set the pin_auto_confirm setting before triggering the password save workflow in ChooseLockPassword

Bug: 275385372
Test: atest AutoPinConfirmPreferenceControllerTest
Test: Manual Test
Change-Id: Id6774bc9afcd6d3161e023dc52911ae3e1f556c9
2023-03-28 15:33:40 +00:00
Kweku Adams
7c82ea06a2 Merge "Revert "Remove duplicate strings."" into udc-dev am: 9a087d6c19 am: eaba347a70
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22106646

Change-Id: I903e6289111448ffe71856b1830b914823ff1953
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 20:45:56 +00:00
Lifu Tang
caa1b51ef2 Revert "Remove duplicate strings."
Revert submission 19748582-settings_yesno

Reason for revert: Common strings in English could be translated into different strings in other languages.

Reverted changes: /q/submissionid:19748582-settings_yesno

Bug: 272603842
Test: build and open Settings app
Test: atest SettingsRoboTests
Change-Id: Iaad301c5513478fb95e40987ea3ccb4f923d71fa
2023-03-15 22:39:24 +00:00
Andreas Miko
8b71dc930d Merge "Add setting to disable PIN animation and password" into udc-dev 2023-03-01 12:46:04 +00:00
Andreas Miko
9e364dcebf Add setting to disable PIN animation and password
Test: Unit - atest SettingsRoboTests
Test: Manual - Set PIN lock and enabled/disabled the setting to observe animation change during PIN entry
Bug: b/204799468
Change-Id: I587b993ef5515a075442e82ebafae88bebdffc20
2023-02-28 10:30:28 +00:00
Andreas Miko
387b788b19 Add setting to disable PIN animation and password
Test: Unit - atest SettingsRoboTests
Test: Manual - Set PIN lock and enabled/disabled the setting to observe animation change during PIN entry
Bug: b/204799468
Merged-In: I587b993ef5515a075442e82ebafae88bebdffc20
Change-Id: I587b993ef5515a075442e82ebafae88bebdffc20
2023-02-28 10:29:58 +00:00
Florian Mayer
9d99ab422a Disable MTE developer option if device config overrides it
On the backend, the device config would already override the setting by
the UI.

(cherry picked from commit 65116faa29)

Bug: 269523554
Merged-In: Idd249e060a275b58a399349f202fc68b42964eb0
Change-Id: Idd249e060a275b58a399349f202fc68b42964eb0
2023-02-23 17:58:33 +00:00
Florian Mayer
1d86531600 Merge "Disable MTE developer option if device config overrides it" 2023-02-23 17:57:59 +00:00
Avinash Vadlamudi
670f1b2718 Merge "[Auto Pin Confirm]: Fix the usage of LockPatternUtils#isAutoPinConfirmFeatureAvailable method" into udc-dev am: 2a619718ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21537112

Change-Id: I7fcc3676caa7109a4893b438dcaff444bbec13e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 12:06:02 +00:00
Avinash Vadlamudi
e644d26b95 [Auto Pin Confirm]: Fix the usage of LockPatternUtils#isAutoPinConfirmFeatureAvailable method
- The method isAutoPinConfirmFeatureAvailable is changed to static, so refactoring the code to use it properly.

Bug: 270315296
Test: Manual Test
Test: atest AutoPinConfirmPreferenceControllerTest
Test: atest ChooseLockPasswordTest
Change-Id: Idecaeca296b9ae9acdd0c094dcbb736db31b74b3
2023-02-23 05:56:58 +00:00
Eric Biggers
bcee8ce1af Stop calling LockPatternUtils.setVisiblePasswordEnabled()
Since the removal of support for Full Disk Encryption (FDE) in favor of
File Based Encryption (FBE), this method has been a no-op.

Bug: 208476087
Test: atest ShowPasswordPreferenceControllerTest.  Note,
      isAvailable_whenNotVisible_isFalse fails both before and after.
Change-Id: Ifb8fc93757366240cf37e4b9a600c2034302919e
2023-02-18 00:24:40 +00:00
Florian Mayer
65116faa29 Disable MTE developer option if device config overrides it
On the backend, the device config would already override the setting by
the UI.

Bug: 269523554
Change-Id: Idd249e060a275b58a399349f202fc68b42964eb0
2023-02-16 15:37:38 -08:00
TreeHugger Robot
834dda9105 Merge "Add persistent MTE toggle to development options." 2023-02-14 02:40:01 +00:00
Bonian Chen
6fa898d709 [Settings] Avoid from Guest user to access UI which requires permission
for changing mobile networi configurations

1. Confirm eSIM deletion should not be accessible by the end user
2. Erase eSIMs UI should should not be accessible by the end user

Bug: 260726944
Test: local

Change-Id: I45792fd451dbdc8a0788922480a7fa51f1267a68
2023-02-12 14:19:06 +00:00
Florian Mayer
5b93b73df1 Add persistent MTE toggle to development options.
Bug: 245624194
Change-Id: I83283eb74360ec0eccd6b236b42eb987a580ec2c
2023-02-09 13:26:27 -08:00
Florian Mayer
e3031c98ba Use bootloader_override from boot namespace
Bug: 267234468
Change-Id: I6e6229504a452d8a82f8928a79e10b342478524c
2023-01-31 23:52:03 +00:00
Avinash Vadlamudi
4c8ad8f911 [Auto Pin Confirm]: Changes to allow PIN auto confirm feature to be controllable by the user
- Add SwitchPreference to allow user to control the pin auto confirm feature
- Add Checkbox option during the PIN setup in Security app
- Disable the opt-in checkbox during SUW entry point for PIN setup
- Update SwitchPreference availability appropriately according to current PIN length
- Update the pin_auto_confirm setting appropriately according to state of switchPreference or checkbox state (in PIN setup)
- Update the error-message when PIN Too short to let user know six digit is recommended

Bug: 262926000
Bug: 262936383
Bug: 262934702
Bug: 262935305
Test: Manual Test
Test: atest SettingsRoboTests
Change-Id: Ib9e09bd5ce44652158e77f80e8be19c4dd50f3bf
2023-01-30 14:35:41 +00:00
Prabal Singh
52ba133285 Create MoreSecurtiyPrivacyFragment
Created a new MoreSecurityPrivacyFragment, a new
more_security_privacy_settings xml.
This more_security_privacy_settings xml is a created by merging
privacy_advanced_settings.xml and security_advanced_settings.xml and the
MoreSecurityPrivacyFragment is created by merging
PrivacyDashboardFragment and SecurityAdvancedSettings fragments.

Test: adb shell am start -a com.android.settings.security.MORE_SECURITY_PRIVACY_SETTINGS
Bug: b/261557620
Change-Id: I8729f4eaf25a31f91354383e7b6cb5e0fc7df976
2023-01-26 14:43:00 +00:00
xinghailu
1637a3a10a Cleanup plurals format
Change <one> to <1> in string res file
Test: Update, existing tests still pass
bug: 199230342

Change-Id: Ic3a5259570cb52cd1664638f3b1058c87a631c04
2022-12-27 12:12:11 +08:00
xinghailu
897fd74731 Cleanup some plurals in Settings
Change <one> to <1> in string res file, and update related java files.
Test: Update, existing test still pass.
bug: 199230342

Change-Id: Idd0ba3c6adc060da21574d98f8ed765fae00cef8
2022-12-22 16:05:13 +08:00
Florian Mayer
8b9d792692 [MTE] allow device policy to control setting
Test: unit tests
Test: TestDPC with COPE and DO
Test: make RunSettingsRoboTests
Bug: 244290023
Change-Id: I0e03d0dbe44ef595d813652f85529c1fe5fd6cec
2022-12-14 00:54:46 +00:00
Florian Mayer
cd68fe78a0 [MTE] support force_on for device_control override
driveby: remove period for force_off message.

Test: make RunSettingsRoboTests ROBOTEST_FILTER=MemtagHelperTest
Bug: 245624194
Change-Id: I1c56af377925fd58c90bb346d9d003249c5e547c
2022-12-03 02:27:29 +00:00
Florian Mayer
00307bdbbe Add separate system property to control user toggle
This allows to ship the developer toggle independent of the settings
toggle. This also allows other parts of the system to query whether the
settings toggle is available.

Bug: 244290023
Change-Id: I1a6b6457974a7107711cd4f7d990a6fe61bf340f
2022-11-16 14:14:12 -08:00
Florian Mayer
5696dde950 Add MTE Settings.
MTE is a technology to help prevent exploitation of some security bugs.
We want to offer users that want to trade off a slight reduction in
performance for higher security the option to do so from the settings
menu.

Test: make RunSettingsRoboTests
      check UI manually
Bug: 245624194
Change-Id: Ifbb76e124142ae843ce90bd604ae8417d65fcc7b
2022-11-09 18:21:42 -08:00
Bonian Chen
7c3f04aa11 [Settings] configuration for hidding SIM lock UI
Hide SIM lock UI based on configuraion.

Bug: 240515161
Test: test cases and local testing
Change-Id: I870c0b53112db56b7bc80bfd585f6f7b3cf82737
2022-10-21 10:59:11 +00:00
TreeHugger Robot
0c57c18276 Merge "Fix Incorrect Trust Agent Count" into tm-qpr-dev am: 9f1dba6017 am: 32c2f9b75f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19669514

Change-Id: I4ca6c2bf0fe35d88d99a1b1e96c074e2734993b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 19:46:23 +00:00
TreeHugger Robot
32c2f9b75f Merge "Fix Incorrect Trust Agent Count" into tm-qpr-dev am: 9f1dba6017
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19669514

Change-Id: I2334c56c62c3f019ad50d505a91b08351c392aee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-06 19:01:06 +00:00
TreeHugger Robot
9f1dba6017 Merge "Fix Incorrect Trust Agent Count" into tm-qpr-dev 2022-09-06 18:29:43 +00:00
Diya Bera
c1288af511 Merge "SecuritySettings test" into tm-qpr-dev am: 73e4742941 am: c18579f168
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19672131

Change-Id: I81fdcec2fe19926da3d40d52fa9e92972c0ad676
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 19:55:26 +00:00
Diya Bera
c18579f168 Merge "SecuritySettings test" into tm-qpr-dev am: 73e4742941
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19672131

Change-Id: I9bd7d32f1ada80c9bf6456905a8be6fbe1b1d4e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 18:56:36 +00:00
Derek Jedral
6fec2be00d Fix Incorrect Trust Agent Count
The total number of trustagents can still be incorrect if the user
enables a trustagent, and then the trust agent component gets disabled,
since the user does not manually toggle the preference themselves. Fixed
by switching back to the original method of using TrustAgentManager, but
also pass a flag that allows us to choose on whether we want to filter
the trustagents based on whether it has an activity (which not all
trustagents are guaranteed to have).

Bug: 240969157
Test: Local test + atest
Change-Id: I5106859f61ddf36c1bf008da18be889ceaf27a8d
2022-08-30 17:43:11 +00:00
Kweku Adams
5949fccc7a Remove duplicate strings.
"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.

Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
2022-08-26 00:07:08 +00:00
Diya Bera
58facec91e SecuritySettings test
Test: atest
Fixes: 234309000
Change-Id: I3c5772bd33fe7280d35ca0d78a647a5dd7e0a00c
2022-08-24 21:08:04 +00:00
Edgar Wang
1496ba9276 confirm SIM deletion should be disabled when the guest mode is enabled.
Bug: 228451314
Change-Id: I83337980fe4bcfa6771de290fd0e44217ea51dec
Test: manual
2022-06-29 06:02:35 +00:00
Eric Biggers
ff16ec8542 Use StorageManager.isFileEncrypted() instead of deprecated methods
Since emulated FBE is no longer supported, isFileEncryptedNativeOnly()
and isFileEncryptedNativeOrEmulated() are the same as the new method
isFileEncrypted().  Replace all calls to these deprecated methods in
this repository with isFileEncrypted().

Bug: 232458753
Change-Id: I95beea86ef771396c2e08f2d6a643fdc629ad89f
2022-06-10 17:42:38 +00:00
Treehugger Robot
9bd8bec2df Merge "Disable "SIM card lock" when the SIM card is PUK-blocked" am: ab8bdb2bdb am: 4a0d0f29f3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2076379

Change-Id: I5314d3f9e5201402a377cf7e61e36994a933f5bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-10 23:16:36 +00:00
Mattias Nilsson
36c71e9d47 Disable "SIM card lock" when the SIM card is PUK-blocked
For an inserted PUK-blocked SIM card we should not allow
to open lock settings. Add a check for SIM_STATE_PERM_DISABLED
and disable "SIM card lock".

Test: Insert a PUK blocked card and check SIM card lock
Bug: 230370597
Change-Id: I8b468cefe95fb8bd66ab91d6c4569ddb01473fbe
2022-05-10 10:46:56 +02:00
Jonathan Scott
b7f4f56cad Add missing settings strings.
Also re-enable and fix tests.

Test: manual
Fixes: 226183482
Fixes: 218799125
Fixes: 219375624

Change-Id: I9605f1f4e2e834baf63e015e96639567c5481b5f
2022-05-05 09:12:59 +00:00