Commit Graph

367 Commits

Author SHA1 Message Date
Wa Gao
b9835cea12 Refactor to use the utils class.
Bug: 298076922

Change-Id: I0085fdf7594d0ba9243a7b44600252d8c5b21608
2023-11-16 19:46:27 +00:00
Wa Gao
bd073bc18c Merge "Hide the setting from the search when feature is disabled." into main 2023-11-14 22:16:32 +00:00
Wa Gao
6ffb674ff4 Hide the setting from the search when feature is disabled.
Bug: 310243923
Change-Id: Idb3b903f19d81825e6f721a87ec8c5238c86118d
2023-11-14 20:27:52 +00:00
Wa Gao
cd9c661b37 Fix the NullPointerException in ContentProtectionTogglePreferenceController.
Bug: 310658123

Change-Id: I249a76ff1f432cb76269b1ac2cc3fe26e86b2bae
2023-11-14 03:44:42 +00:00
Wa Gao
dcf678c835 Merge "Add the dialog when clicking on the diabled switch." into main 2023-11-10 19:13:13 +00:00
Wa Gao
6b9e20d32d Add the dialog when clicking on the diabled switch.
Bug: 302189945
Change-Id: I0bf7774b80a59c70a2ea1725e0adba522854adde
2023-11-10 17:55:25 +00:00
Chaohui Wang
0e1edc6c74 Merge "Fix ContentProtectionTogglePreferenceController" into main 2023-11-08 09:05:22 +00:00
Chaohui Wang
bf70edddd0 Fix ContentProtectionTogglePreferenceController
The OnMainSwitchChangeListener is replaced with OnCheckedChangeListener

Bug: 306658427
Test: m Settings
Change-Id: I24021cb9acb308c3f85e51e9f79ad2bf564c789a
2023-11-07 14:18:13 +00:00
Chaohui Wang
08a1c9876e Revert^2 "Migrate to CompoundButton.OnCheckedChangeListener"
8979681a8d

Change-Id: I60edd3aabf49afbe4aa016af780baa68d928bddf
2023-11-07 14:17:15 +00:00
Sebastian Pickl
8979681a8d Revert "Migrate to CompoundButton.OnCheckedChangeListener"
Revert submission 25147565-onSwitchChanged-CompoundButton

Reason for revert: breaking builds 

Bug:309601476

Reverted changes: /q/submissionid:25147565-onSwitchChanged-CompoundButton

Change-Id: Ie746db87d9c642599593aa3d5e5baf6b7ba89c0e
2023-11-07 13:26:36 +00:00
Chaohui Wang
71d1f021af Migrate to CompoundButton.OnCheckedChangeListener
Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427
Test: manual - check Settings pages
Change-Id: If2e08a9a9557ec66a3b31ef18cd2e15943098a59
2023-11-07 20:22:27 +08:00
Wa Gao
2ddabf5785 Merge "Add the controller for the top switch." into main 2023-11-07 01:22:43 +00:00
Wa Gao
aa5d7420db Add the controller for the top switch.
Bug: 302189945
Change-Id: Ie43ac181e643a8b215ca830afc6ef670d91a5762
2023-11-06 23:46:56 +00:00
Nino Jagar
bf97254dd7 Use DeviceConfig flag instead of aconfig flag
Bug: 308610589
Test: Units
Flag: EXEMPT
Change-Id: I3ff34b4048d8c0f0101f74fbab0498f91c7c2409
2023-11-06 19:28:38 +00:00
Nino Jagar
c7628879da Disable content protection settings if no service
Bug: 308613762
Test: Unit tests and manual end-to-end
Change-Id: I0cc1ff1a260a7e14537036497a155135b7e2f0a9
2023-10-31 20:34:04 +00:00
Wa Gao
c80dfbccb6 Add the new content protection preference option and subpage in Settings -> Security & privacy -> More security & privacy settings.
Bug: 302189945
Test: robotests
m -j256 Settings
atest SettingsRoboTests:ContentProtectionPreferenceControllerTest
atest SettingsRoboTests:ContentProtectionPreferenceFragmentTest

Change-Id: I620d73f8674c1340f9b11cd910620f1d5afb0ec1
2023-10-26 19:34:58 +00:00
Chaohui Wang
15ca95a31b Migrate to TwoStatePreference
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference.

Using TwoStatePreference in Java will helps migration in the future.

Bug: 306771414
Test: manual - check Settings pages
Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
2023-10-23 09:28:57 +00:00
Peter Kalauskas
80e914a263 Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Change-Id: If75acb6b1c3f204e3686c20cef609f7cfabe15cf
2023-09-21 23:09:39 +00:00
Andreas Miko
a7d7eb9a16 Change nullability of inheriting function of PinPrivacyPreferenceController
Test: None
Bug: b/292569343
Change-Id: Idbfa244921957be2bba3cd02e5e873e81e8807d8
2023-08-09 16:35:09 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Elliot Sisteron
fb86e84186 Merge "Fix entrerprise strings replacement for Safety Center." into main 2023-08-02 12:11:17 +00:00
Elliot Sisteron
4688f3f642 Fix entrerprise strings replacement for Safety Center.
In ag/20641184, it looks like we changed the behavior to only replace
titles when in fact some strings were replacing the summary.

This causes some entries to have the summary as the title instead.

Bug: 283743216
Test: Manual
Change-Id: I7157fd04c32eebd89bdb825ccc3e8ef73c9075bf
2023-08-01 17:43:43 +00:00
Edgar Wang
ec69438819 Fix when turn off "Ask for PIN before unpinning" we don't check the result of ChooseLockSettings
Change-Id: I812a07b704022c5d4147c57410e8d3230fb26cdb
Fixes: 290181459
Test: manual verify
2023-07-20 08:58:02 +00:00
Chun-Ku Lin
20976c3a53 use L10n-friendly runtime number formatting based on locale
Arabic use Western or Eastern numbers depends on the regions.

Bug: 276479321
Test: atest AccessibilityButtonFooterPreferenceControllerTest
Test: manual
Change-Id: I855f4fd891893b094163b0d479bdf3e5155dffc1
2023-06-29 02:48:32 +00:00
TreeHugger Robot
663dfcd618 Merge "Protect App pinning" into udc-qpr-dev am: 7127e7606d am: 14a3bbbbea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23467969

Change-Id: I5d38e7f40f481a5fde77da5fd62faf97e62c366f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 04:59:59 +00:00
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