Commit Graph

17830 Commits

Author SHA1 Message Date
Ankita Vyas
3503cc3cbf Merge "Do not show Choose Profile dialog for clone user." 2022-11-15 11:13:26 +00:00
ykhung
3cf14b682e Clean up the KEY_ROUTINE from the Settings
Fix: 258603978
Test: make RunSettingsRoboTests
Change-Id: I65033ca18953b57317af64418bb0b18d48eaacd8
2022-11-15 16:07:57 +08:00
“Ankita
9304977674 Do not show Choose Profile dialog for clone user.
Bug: 249194639
Test: make RunSettingsRoboTests -j64
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ProfileSelectDialogTest
Change-Id: I35279f643f8c562df7b407fdf2cbfd2ae5ee9890
2022-11-15 07:49:09 +00:00
Adam Bookatz
e5e232428d Introduce concept of DockUser
Dreams and docking often refers to "user zero" or "system user".
But more generally, the special user for dreams or switching-to-on-docking
need not be user 0, and in fact won't be in certain modes. So this needs updating.

Test: the files mentioned in the topic
Bug: 257333623
Change-Id: If068aa79a770bed4abf3f7ca1859a95cd1eb4ecd
Merged-In: If068aa79a770bed4abf3f7ca1859a95cd1eb4ecd
2022-11-14 19:19:21 +00:00
João Victor Mendes Freire
0ed6e65e44 Merge "Fix settings crash when interact uninstalled app" 2022-11-14 16:31:35 +00:00
TreeHugger Robot
2c45688a13 Merge "Introduce concept of DockUser" 2022-11-14 15:00:56 +00:00
Binyi Wu
7078a7662c Update survey triggering mechanisms
Settings will send the Settings screen to a central decision-making
place instead of each page handling its own.

Bug: 236662190
Test: robotest, manual

Change-Id: Ibfbdd421c723158d8d317aa4a02d9b51f877316a
Merged-In: Ibfbdd421c723158d8d317aa4a02d9b51f877316a
2022-11-14 19:56:03 +08:00
Milton Wu
b9b8b8a512 Fingerprint Introduction FragmentActivity
Introducing MVVM architecture & fragments to biometric settings.
Here, we modify the first page of FingerprintEnrollIntroduction to use
new MVVM with Fragment architecture.

And with this new architecture, unit test and screen order will be
easier to be written or changed.

Bug: 236072782
Test: atest FingerprintEnrollmentViewModelTest AutoCredentialViewModelTest
	    FingerprintEnrollIntroViewModelTest FingerprintRepositoryTest
Change-Id: Icf12c91625db86c2c99081a0108203e607e77f74
2022-11-14 15:36:03 +08:00
ykhung
d66fd82c35 Verify and reset invalid battery setting in the data restore stage
Verify and reset invalid battery setting configuration in the data
restore stage to avoid resoring invalid configuration from other devices

Bug: 258243197
Test: make RunSettingsRoboTests
Change-Id: I1a0febd2ad527147e4e9e9c77734c4b51963263a
2022-11-14 01:51:46 +00:00
Hao Dong
3ca9965a96 Fix the flicker of FingerprintSettings before FingerprintEnrollIntro.
Change to launch FingerprintEnrollIntroductionInternal directly when no fingerprint enrolled and fingerprint is the only biometrics. This avoids the flicker of FingerPrintSettings before showing the enroll introduction.
This partially reverts the change in ag/19732076.

Bug: 256334588

Test: manual test following cases on fp-only devices, and enable don't
      keep activity and test them again.
      1. fp enrollment on SUW
      2. fp add another on SUW
      3. add first fp on Security Settings
      4. add another fp on Security Settings
Test: atest FingerprintStatusUtilsTest BiometricsSafetySourceTest

Change-Id: I057b00fbca6660012887ebedf4d65c2c3d35792b
Merged-In: I057b00fbca6660012887ebedf4d65c2c3d35792b
(cherry picked from commit 6bed01f315)
2022-11-12 23:41:37 +00:00
TreeHugger Robot
470afd9a85 Merge "[Panlingual] Improve performance of displaying app list in Settings." 2022-11-12 00:16:12 +00:00
TreeHugger Robot
e1be0e41ba Merge "Monitor the page scrolling jank for app list pages" 2022-11-11 22:00:11 +00:00
Steve Elliott
a92688d642 Add configuration for defaulting notification behavior
Test: RedactionInterstitialTest
Test: go through SUW on a phone
Bug: 240472040
Change-Id: I7bcd9f1a128c757881693e0251d305d2e26e4fd8
2022-11-11 14:08:09 -05:00
Tetiana Meronyk
b1a21505d7 Merge "Hide "Add user" button for secondary user" 2022-11-11 14:19:23 +00:00
Treehugger Robot
61e8616ddf Merge "Fix potential crash in AppAllServicesPreferenceController" am: ccfa7fa918 am: 0ecb9e76fe am: cf573d51c6
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2296917

Change-Id: Ic7a008dc9320d6687ec44a14ec0caa8f4bfd5b96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 12:48:31 +00:00
João Victor Mendes Freire
a713f28bc5 Fix settings crash when interact uninstalled app
Set the AdvancedAppInfoPreferenceController preference to disabled when
the app is uninstalled for the current user. This results in every
preference under the advanced section to be greyed out, avoiding the
null pointer exception.

Bug: 238839849
Test: Unit tests && Manual test on multiple apps
Change-Id: I5cdf47575da96f53915f5b552213bf0176f9d1d7
2022-11-11 12:36:46 +00:00
Treehugger Robot
cf573d51c6 Merge "Fix potential crash in AppAllServicesPreferenceController" am: ccfa7fa918 am: 0ecb9e76fe
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2296917

Change-Id: I8047a4e55b534076ac9fb65e99934fe7d3a3e695
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 12:17:57 +00:00
Treehugger Robot
0ecb9e76fe Merge "Fix potential crash in AppAllServicesPreferenceController" am: ccfa7fa918
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2296917

Change-Id: I7477f18dc0e0a0aea9adf8e996171210dc194ed9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 11:48:15 +00:00
Yanting Yang
9f6c5bdadc Monitor the page scrolling jank for app list pages
Bug: 254237663
Test: take the trace and check the cuj section name
Change-Id: Id9b7affcad354c43c1e8934d81abd1bb51fb2956
2022-11-11 10:59:33 +00:00
Bonian Chen
647e3fe4e5 Merge "[Settings] Improve PremiumSMS's auto test" into tm-qpr-dev am: 30ce9a78ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20429443

Change-Id: I712b90a9a09ebb2bfe064f4e6a37930d2b977bcf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 10:24:00 +00:00
Bonian Chen
56e5d50ca7 Merge "[Settings] enhancing data saver config control" into tm-qpr-dev am: 106fd86520
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20419511

Change-Id: I5338c24812346b79068b1fee0c5ba98ff07eec33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 10:23:48 +00:00
Bonian Chen
86e2948eb6 Merge "[Settings] Hide data usage when SIM support is turn OFF" into tm-qpr-dev am: a6824c9b34
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20419510

Change-Id: Ie433daffbe56a1a526880c2e254a13ff17aaa3c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 10:23:44 +00:00
Bonian Chen
30ce9a78ee Merge "[Settings] Improve PremiumSMS's auto test" into tm-qpr-dev 2022-11-11 09:35:42 +00:00
Bonian Chen
106fd86520 Merge "[Settings] enhancing data saver config control" into tm-qpr-dev 2022-11-11 09:35:21 +00:00
Bonian Chen
a6824c9b34 Merge "[Settings] Hide data usage when SIM support is turn OFF" into tm-qpr-dev 2022-11-11 09:35:21 +00:00
Ankita Vyas
094d858cd1 Merge "AppClone: Add preference to display new page Cloned Apps" 2022-11-11 07:01:04 +00:00
tom hsu
8bd5e2a52f [Panlingual] Improve performance of displaying app list in Settings.
- Use existed ApplicationInfo to get needed info.
 - Add unittest to AppLocaleUtil.java

Bug: b/238054165
Bug: b/231904717
Test: Maunal test passed
Test: atest passed
Change-Id: I23f354c366b45d4b684184b3366aeab913bcd3c8
2022-11-11 14:25:19 +08:00
TreeHugger Robot
7578a43c94 Merge "Fix app battery usage list launch incorrect works app" into tm-qpr-dev am: b0503be6fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20336174

Change-Id: I9a92a7de4f517330604673ce97bb1a626f824626
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 03:41:29 +00:00
TreeHugger Robot
b0503be6fd Merge "Fix app battery usage list launch incorrect works app" into tm-qpr-dev 2022-11-11 03:10:06 +00:00
Adam Bookatz
81e5f3730c Introduce concept of DockUser
Dreams and docking often refers to "user zero" or "system user".
But more generally, the special user for dreams or switching-to-on-docking
need not be user 0, and in fact won't be in certain modes. So this needs updating.

Test: the files mentioned in the topic
Bug: 257333623
Change-Id: If068aa79a770bed4abf3f7ca1859a95cd1eb4ecd
2022-11-10 16:14:22 -08:00
Florian Mayer
862e9b3040 Merge "Add MTE Settings." 2022-11-10 18:02:51 +00:00
Jason Hsu
98f5f21031 Merge "Fix TalkBack shortcut keeps showing enabled when entering into that page." 2022-11-10 15:34:28 +00:00
Bonian Chen
b4511365cb [Settings] Improve PremiumSMS's auto test
Fix PremiumSMS's test case when config_show_premium_sms is false.

Bug: 240515161
Test: test cases and local testing
Change-Id: I3f1710bcf2c123553af7646c030bfe87f569324a
2022-11-10 15:11:36 +00:00
Bonian Chen
dae659e358 [Settings] Improve PremiumSMS's auto test
Fix PremiumSMS's test case when config_show_premium_sms is false.

Bug: 240515161
Test: test cases and local testing
Change-Id: I3f1710bcf2c123553af7646c030bfe87f569324a
2022-11-10 13:18:12 +00:00
jasonwshsu
ce487188a0 Fix TalkBack shortcut keeps showing enabled when entering into that page.
Root Cause: TextUtils.isEmpty() will return true both null and empty case, and write config key into it.

Solution: Write config key only if settings key is null. That means no one (developers or users) touch the key ever, so we should respect config key here.

Bug: 255912415
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: I092975ea3de8fce78b7ae2a6241a30f6af8125a6
2022-11-10 12:21:04 +00:00
Kuan Wang
6e23499e98 Remove the timestamps of last day for battery level chart if last day has less than 2 hours data. am: 57cb76428e am: 28bdf84b5a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20309948

Change-Id: I748c1247a96b3d4ae9160d76c768e2db7af2611a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 11:46:43 +00:00
Bonian Chen
2a6792540b [Settings] enhancing data saver config control
Enhancing the control of R.bool.config_show_data_saver when false, which including:
1. Initial presentation is invisible
2. Leaving UI when triggered
3. Avoid from getting searched
4. Robolectric test case support

Bug: 243877672
Test: test cases and local testing
Merged-In: I909522c0244ebb012a27d6aff34120a4f90128c6
Change-Id: I909522c0244ebb012a27d6aff34120a4f90128c6
2022-11-10 11:23:20 +00:00
Bonian Chen
5a264f69f4 Merge "[Settings] Hide data usage when SIM support is turn OFF" 2022-11-10 11:21:20 +00:00
Bonian Chen
f11cd3d275 Merge "[Settings] enhancing data saver config control" 2022-11-10 11:21:20 +00:00
Kuan Wang
28bdf84b5a Remove the timestamps of last day for battery level chart if last day has less than 2 hours data. am: 57cb76428e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20309948

Change-Id: Ifd9c932a870117e278c59af45c6a57132831de5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 11:14:37 +00:00
YK Hung
2cdc7409b5 Merge "Verify and reset invalid scheduled battery level in the booting stage" 2022-11-10 10:23:04 +00:00
Zaiyue Xue
240ff56875 Merge "Fix b/257404630 Inconsistent strings in battery chart" into tm-qpr-dev am: aee2d55bfa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20410009

Change-Id: I89a8e622134524f701e440a9bd3e2cf0c84fae8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 09:33:08 +00:00
Kuan Wang
57cb76428e Remove the timestamps of last day for battery level chart if last day has less than 2 hours data.
Test: make RunSettingsRoboTests
Bug: 256525782
Change-Id: I3f735f8f3ec10b2952b93111f0243e44117ff58a
2022-11-10 08:56:39 +00:00
ykhung
4c0de2685a Verify and reset invalid scheduled battery level in the booting stage
The minimum scheduled battery level is changed from 5% to 10% in T, if
users upgrade the device from S to T with invalid level value in
the Settings.Global, we have to force reset it into the new minimum
battery level value.

Bug: 258243197
Test: make RunSettingsRoboTests
Change-Id: I89003120aaebcff78d4bf3f7ae8b54e97adae3c8
2022-11-10 16:38:18 +08:00
“Ankita
a6ff897cf3 AppClone: Add preference to display new page Cloned Apps
Also adds a faeture flag and controller class for this page.
UX path: Apps > Cloned Apps

Bug: 249916503
Bug: 248235441
Test: manual
Test: make RunSettingsRoboTests -j30 ROBOTEST_FILTER=AppsPreferenceControllerTest
Test: make RunSettingsRoboTests -j30 ROBOTEST_FILTER=ClonedAppsPreferenceControllerTest
Change-Id: I2f68f4365ce08481c7db7bfdda4fdffc369321a9
2022-11-10 06:52:44 +00: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
Shen Lin
e8a0ba688b Fix potential crash in AppAllServicesPreferenceController
This CL contains two fixes:

- Fix potentialcrash when calling getAvailabilityStatus, we should use
  the latest packageName to decide.

- Add test class

Bug: 258270151
Test: atest
Change-Id: I3e6aa7e0773a73d2e3dfa996e42087f3ec80627b
2022-11-10 10:18:14 +08:00
Kweku Adams
d7194ad75d Set package name.
The system expects an actual package name in the ApplicationInfo object
so make sure to set it in the test object.

Bug: 258472566
Test: atest AppButtonsTest
Change-Id: I3bee07a6a395c9962af57f934cf3ca86eb60354a
2022-11-09 20:57:23 +00:00
Tetiana Meronyk
19fcb87e39 Hide "Add user" button for secondary user
Bug: 258447375
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest" && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.MultiUserSwitchBarControllerTest"

Change-Id: I5f0fd25fb9f710f7311275b2a840663f2bf3eeab
2022-11-09 19:35:32 +00:00
Bonian Chen
d3b35f24f0 [Settings] Hide data usage when SIM support is turn OFF
Enable the UI control through configuration.

Bug: 240515161
Test: local, auto test
Merged-In: I5e49a2b0f2b563b426354f4d2e6e650dcc02c98b
Merged-In: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
Change-Id: I4e0db5688dc1b074d43f9d77dd2f6d4cc53a353c
2022-11-09 10:52:35 +00:00