Commit Graph

1815 Commits

Author SHA1 Message Date
Weng Su
bcca5ebf1a Add "Speed & compatibility" preference to Wi-Fi hotspot Settings
- Show 4 speed types in summary
  - 2.4 Ghz
  - 5 Ghz
  - 2.4 and 5 GHz
  - 6 GHz

Bug: 245258763
Test: manual test
atest -c WifiTetherViewModelTest
atest -c WifiHotspotRepositoryTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Change-Id: I6deb41cb355b0ceb1f1fd2d84408a83b90433e7d
2023-03-09 20:06:37 +08:00
Becca Hughes
e174f66a71 Move CredentialProviderInfo for test/settings (settings)
This is a precusor CL to adding a subtitle for settings
to use so we need to move CPI where it can be used
by settings, atest and CTS.

Test: ondevice & atest & cts
Bug: 253157366
Change-Id: Ief25f562eb5c2ca4438701de8a8e26941a8370a3
(cherry picked from commit on googleplex-android-review.googlesource.com host: 573e844275)
Merged-In: Ief25f562eb5c2ca4438701de8a8e26941a8370a3
2023-03-07 17:14:09 +00:00
Tom Hsu
39129e09d3 Merge "Add confirmation dialog for system locale change." into udc-dev 2023-03-07 03:31:02 +00:00
tom hsu
04eae5cc60 Add confirmation dialog for system locale change.
Bug: b/243511340
Test: atest passed.
Change-Id: I7ef4ed4557a1064d078e49a372f11a573b81058a
2023-03-06 16:01:27 +08:00
Milton Wu
7b817dd0a0 Fix icon touch dialog in Enrolling page
1. Fix icon touch dialog not shown in Enrolling page for SFPS and RFPS
   devices
2. Remove AccessibilityRepository and VibratorRepository because they
   only bypass info w/o actual effect.
3. Add/Refine missing test cases for FingerprintRepositoryTest,
   CredentailModelTest, AutoCredentialViewModelTest,
   FingerprintEnrollEnrollingViewModelTest,
   FingerprintEnrollFindSensorViewModelTest,
   FingerprintEnrollIntroViewModelTest

Bug: 271535048
Bug: 271220339
Test: atest FingerprintEnrollmentActivityTest CredentialModelTest
      FingerprintRepositoryTest AutoCredentialViewModelTest
      FingerprintEnrollEnrollingViewModelTest
      FingerprintEnrollFindSensorViewModelTest
      FingerprintEnrollIntroViewModelTest
Test: Manually test enrollment
Change-Id: I7d1ed935e156bbd41d5da63902683e430fd3fc1f
2023-03-03 17:49:17 +08:00
William Leshner
01dfbcc297 Merge "Restrict screen saver settings searches to enabled users." into udc-dev 2023-02-27 17:30:48 +00:00
Will Leshner
ca1379f0b3 Restrict screen saver settings searches to enabled users.
If a user can't enable screen saver, they shouldn't be able to
accidentally find screen saver related settings in Settings.

Bug: 260276394
Test: atest ScreenSaverPreferenceControllerTest
Test: manually by settings up a second user on a device that supports
screen saver, switching to that user, and making sure that searches for
"screen saver" don't accidentally reveal settings that can't be
accessed.

Change-Id: If2f465b2acb548455f0868507cf47217ea1a626f
2023-02-24 15:36:48 -08:00
Weng Su
d7bbd4505c Refer to the last Hotspot password when generating the password
- Query the last Hotspot password when security type is SECURITY_TYPE_OPEN and it will be used when the user changes to another security type

- If the last hotspot password is an empty string, then generate random password

Bug: 201789473
Test: manual test
atest -c WifiHotspotRepositoryTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherPasswordPreferenceControllerTest

Change-Id: Id3a846099238433e7b6c8b934fa26a74df0dcb61
2023-02-24 11:22:40 +08:00
Derek Jedral
eb08a84437 Merge "Show CombinedBiometric if active unlock enabled" 2023-02-15 18:03:55 +00:00
Alex Johnston
97658e3a1f Merge "Implement OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS exemption" 2023-02-15 09:37:12 +00:00
Derek Jedral
4d32e70a60 Show CombinedBiometric if active unlock enabled
We want to show this page as long as active unlock is enabled. The
underlying check of isAvailable checks if the appropriate biometrics are
available and updates the title accordingly.

Test: manual test, confirm combined page appears when active unlock on
Test: atest BiometricsSafetySourceTest
Bug: 264812908
Change-Id: I5da1c20d65b879751bdd615c14c2f8a71cc54d80
2023-02-14 22:24:25 +00:00
Milton Wu
211313b52d Attach FingerprintEnrollFinishFragment to activity
Start FingerprintEnrollFinishFragment when enrolling page is done.

Bug: 260960831
Test: atest FingerprintEnrollmentActivityTest
      FingerprintEnrollmentViewModelTest
Change-Id: Ia751c20330dfdcac91e961acc70aa033b05de03f
2023-02-14 19:18:56 +08:00
Prabal Singh
402f1d0f73 Merge "Merge Advanced Security and Privacy Category keys" 2023-02-14 08:47:13 +00:00
Xinyi Zhou
19e792ae4b Merge "Revert "Revert "Delete Fast Pair Settings""" 2023-02-13 19:58:23 +00:00
Bonian Chen
0996decc69 Merge "[Settings] User restriction should be applied" 2023-02-13 12:38:41 +00:00
Bonian Chen
ceaa5cd7ae [Settings] User restriction should be applied
Simply verify isAdminUser() could be insufficient, since there're some
other use cases (such as managed device).

Bug: 228079419
Test: local

Change-Id: Ic9f27deafada31dacef03e27bf02ecbc9a8b3231
2023-02-13 09:04:04 +00:00
Alex Johnston
2747dc6e8c Implement OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS exemption
OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS details:
* An app with this appop will be made exempt from all
  power restrictions, including app standby and doze.
* In addition, the app will be able to start fgs from
  the bg, and the user will not be able to stop fgs
  run by the app.

Changes:
* Implement the OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS

Bug: 246330879
Test: atest PowerAllowlistBackendTest

Manual testing:
- Give OP_SYSTEM_EXEMPT_FROM_POWER_RESTRICTIONS appop to TestDPC app
- Verify the app can start fg services from the bg
- Verify fgs started by the app cannot be stopped
- Verify the app cannot be put into background restricted via Settings

Change-Id: If9e76076c59195f1e6e5f3eee3c8e7a0c754d8de
2023-02-10 13:37:38 +00:00
Tom Hsu
d3ff83eb4f Merge "[Regional Preferences] Remove u extension for subtitle of Language" 2023-02-10 03:57:51 +00:00
tom hsu
e2aeded3de [Regional Preferences] Remove u extension for subtitle of Language
- Remove the language tag info of subtitle in  Settings -> System -> Languages
 - Syuc same result to entry of numbering system.

Bug: b/268278327
Bug: b/268276472
Test: atest passed
Test: Manual test passed
Change-Id: I46dd0899059e9209b99f5ef3b7b84eb083d4e140
2023-02-09 18:05:01 +08:00
TreeHugger Robot
8750e58ed6 Merge "Refine RFPS enrolling v2" 2023-02-09 09:35:31 +00:00
Milton Wu
fa496047a4 Refine RFPS enrolling v2
1. Fix skip button doesn't work case
2. Support rotation during enrollment
3. Show error dialog page
4. Show icon touched dialog page

Bug: 260957939
Test: atest FingerprintEnrollFindSensorViewModelTest
      FingerprintEnrollProgressViewModelTest
      FingerprintEnrollmentViewModelTest
      FingerprintEnrollmentActivityTest
Change-Id: I617e3e64a130682002b07551d11aff2864fd4538
2023-02-09 13:26:44 +08:00
Prabal Singh
44d858e405 Merge Advanced Security and Privacy Category keys
Test: atest CategoryManagerTest
Bug: b/260060884
Change-Id: I376aa8af6c19cfcca2b84d6ccbd5cd497fa298b8
2023-02-08 17:41:49 +00:00
SongFerngWang
f7685dd715 Add a config to hide the 3G option at preferred network mode UI
Add a config config_display_network_mode_3g_option to hide the 3G
option at preferred network mode UI

Bug: 261615630
Test: build pass. local test pass.
atest EnabledNetworkModePreferenceControllerTest

Change-Id: I4f94971add1d1eddc9f7c7458b8fc8fdcec3935e
2023-02-08 07:48:08 +08:00
Zoey Chen
69fe84219a [Settings] Add the CarrierNetworkChange case
Bug: 262927206
Test: atest SubscriptionsPreferenceControllerTest
Change-Id: If7eeb185224179d59ab841af0062ec5b98b956e9
2023-02-07 08:59:14 +00:00
Amy Hsu
2209c02dfe Merge "[RRS] show resolution option on Settings page." 2023-02-04 15:10:13 +00:00
Amy Hsu
be19785b51 [RRS] show resolution option on Settings page.
Due to the special width/ height of the device, we have to modify the
available condition otherwise the resolution option cannot be shown on Settings.

Bug: 258346214
Test: Lunch Settings and check the Display page
      atest SettingsUnitTests:ScreenResolutionControllerTest
      atest SettingsUnitTests:ScreenResolutionFragmentTest
Change-Id: Ie22df7dff6e31a7697c128eabe69dfe4bba29746
2023-02-04 06:48:03 +00:00
Xinyi Zhou
dd5a7d27f0 Revert "Revert "Delete Fast Pair Settings""
This reverts commit 6db89c73d6.

Reason for revert: the feature is no longer needed

Test: -m
Change-Id: I3c8b3af68cb2b6e8ad1690cab1a5bbf3c92b2481
2023-02-02 15:22:47 -08:00
Victor Truong
71fd373fd0 Merge "Replace SystemUser checks with MainUser." 2023-02-02 02:51:26 +00:00
Victor Truong
f3c9a09cac Replace SystemUser checks with MainUser.
Bug: 257333623
Test: atest CommunalPreferenceControllerTest, atest UtilsTest, atest
TimeoutToDockUserPreferenceControllerTest

Change-Id: I5d2a818f9f35968ced1db7f9fa4b79432a502023
2023-02-01 15:16:48 -05:00
TreeHugger Robot
afb30cdd08 Merge "Make pre-upgrade footer appear more consistently" 2023-02-01 18:30:13 +00:00
Julia Reynolds
3bab3c429c Make pre-upgrade footer appear more consistently
It's useful info regardless of whether the NLS is enabled

Test: PreUpgradePreferenceControllerTest
Fixes: 233963916

Change-Id: Idc6b2cebe18b119052233775bd4dcd561fd8b4fa
2023-01-27 16:49:42 -05:00
Julia Reynolds
a50c0b9636 Update icon sizing
Fixes: 233087471
Test: BridgedAppsPreferenceControllerTest, view 'see all apps' screen
Change-Id: I1090f2461f22bf87f20de969d1a0c5b8c2c6b7b7
2023-01-27 21:18:33 +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
TreeHugger Robot
0bc03ce795 Merge "Add a test method in DashboardFragmentRegistryTest." 2023-01-20 15:57:45 +00:00
Milton Wu
df8d2d9da9 Refine FingerprintEnrollmentActivity
1. Add missing test cases for DeviceFoldedViewModel,
   DeviceRotationViewModel, and FingerprintEnrollFindSensorViewModel
2. Move most of init value of ViewModels into
   getDefaultViewModelCreationExtras
3. Fix FindSfpsFragment lottie because of incorrect rotation value.
4. Feed configuration change into DeviceFoldedViewModel

Bug: 260957195
Test: atest CredentialModelTest AutoCredentialViewModelTest
      DeviceFoldedViewModelTest DeviceRotationViewModelTest
      FingerprintEnrollFindSensorViewModelTest
      FingerprintEnrollIntroViewModelTest
      FingerprintEnrollProgressViewModelTest
      FingerprintEnrollmentViewModelTest
      FingerprintEnrollmentActivityTest
Change-Id: Ied55a895bc1774af5bdd256eccd806aaaa1680ef
2023-01-20 14:42:48 +08:00
Yilin Cai
8efd72e642 Add a test method in DashboardFragmentRegistryTest.
This is a followup of Edgar's comment in http://ag/21009318.

Test: atest SettingsUnitTests:com.android.settings.dashboard.DashboardFragmentRegistryTest
Bug: 242280896
Change-Id: Icecaf875b944a9a16986fae2d06a6ed84b29bc06
2023-01-20 12:52:18 +08:00
Tom Hsu
aa1e252742 Merge "[Languages] Add new information to system language page." 2023-01-18 15:09:00 +00:00
tom hsu
f33ac498c2 [Languages] Add new information to system language page.
- Add top Intro preference
 - Add footer preference
 - Add sub string to language picker
 - Modify title of app locale pages

Bug: 242182598 Add information to system language page.
Bug: 241600418 [Panlingual] Change strings on App languages
Test: Maunal test
Change-Id: I9bca8911e8e70c97c273294b3c9d1d73d4ea0cb2
2023-01-18 15:22:27 +08:00
TreeHugger Robot
69b8706b9d Merge "Move bimetrics v2 tests to unit/" 2023-01-17 15:26:46 +00:00
Gil Cukierman
36517a0bcd Merge "Change Toggle UX to "Require encryption"" 2023-01-17 14:13:07 +00:00
Milton Wu
546c507aec Move bimetrics v2 tests to unit/
Move biometrics enrollment v2 tests from robotests/ back to unit/

Bug: 265723532
Test: atest FingerprintRepositoryTest CredentialModelTest
      AutoCredentialViewModelTest FingerprintEnrollIntroViewModelTest
      FingerprintEnrollProgressViewModelTest
      FingerprintEnrollmentViewModelTest
Change-Id: Id35e52a97df757f8c4473c5bf7f46ba051816d42
2023-01-17 18:13:21 +08:00
TreeHugger Robot
452d69e6e8 Merge "Relocate biometrics enrollment v2 tests" 2023-01-17 07:27:05 +00:00
TreeHugger Robot
009601eca0 Merge "Ignore unit test to avoid timing issue" 2023-01-17 05:46:47 +00:00
tom hsu
5baac40801 Ignore unit test to avoid timing issue
- This is a race condition. Ignore it first and improve it later

Bug: b/265733270
Test: atest passed
Change-Id: I6c206483dd588c04a8ab2433915862909c526906
2023-01-17 12:24:05 +08:00
Milton Wu
c132008623 Relocate biometrics enrollment v2 tests
Put biometrics enrollment v2 tests into tests/robotests/

Bug: 265723532
Test: RunSettingsRoboTests2 FingerprintRepositoryTest
      CredentialModelTest AutoCredentialViewModelTest
      FingerprintEnrollIntroViewModelTest
      FingerprintEnrollmentViewModelTest

Change-Id: I94804c07e0278713fcfb6e9889edc5092cfd9d13
2023-01-17 10:15:05 +08:00
tom hsu
00bfd7e299 Remove the unit test which has problem.
Bug: b/265613591
Test: atest passed
Change-Id: I0df58e76171fdc49f405cb88d20469b0693f0041
2023-01-16 15:56:18 +08:00
TreeHugger Robot
1e7401401d Merge "[Regional Preference] Remove unit tes tof systemproperty" 2023-01-13 14:30:02 +00:00
tom hsu
7b0c8cfb53 [Regional Preference] Remove unit tes tof systemproperty
- Unit test of System Property failed due to timing issue. Remove it to avoid to impact formal unit test tracker.

 - This system property is feature flag.

Bug: b/265410669
Test: atest passed.
Change-Id: I65b4a34e1a362428ccb18611c90702650a5cdf8f
2023-01-13 13:15:06 +00:00
TreeHugger Robot
8fce459806 Merge "Fix settings crash" 2023-01-13 02:51:11 +00:00
Becca Hughes
e1608b369f Fix settings crash
Fix settings crash when dialog is shown
becuase the wrong fragment manager is
used.

Bug: 264939770
Test: unit test and test on device
Change-Id: I5f4c04740058baaa1c96a7108dc4b08b3e467fb8
2023-01-12 18:10:24 +00:00