Commit Graph

18548 Commits

Author SHA1 Message Date
Gil Cukierman
58f946072d Add Extra Exception Checks to Null Cipher Toggle
Adds broad exception safety to all TelephonyManager calls.
Without these extra catch blocks, the entire Settings app would
crash if a TelephonyManager API were to throw an exception.

Bug: 262914591
Test: atest NullAlgorithmsPreferenceControllerTest
Change-Id: I997a37fe71bf007d67989c89b3abe3e520d79d3c
2023-01-06 19:30:26 +00:00
Becca Hughes
6bd41f20c5 Fix settings bug (pt 2)
Follow on from ag/20862879 to keep track of prefs
so if the list of enabled providers is updated
we update the UI.

Bug: 253157366
Test: make & manual test
Change-Id: Ibf3c83fd445ced51a8cbea0113f12fc04002c23a
2023-01-06 17:23:56 +00:00
Bill Yi
1883efae0a Merge TQ1A.230105.002 to aosp-master - DO NOT MERGE
Merged-In: I11c236f3901c9faaeb6c702678d330dde8f07f38
Merged-In: I3d784788884f9b80733786dc73d9bb62ffef817b

Change-Id: Iabf5075f225933cd03d2d2ac43b9821ecc9fb7c1
2023-01-06 15:26:15 +00:00
Bonian Chen
7a714456fd [Settings] Support of Primary IMEI feature
Present primary IMEI information when there're multiple.

Bug: 260188417
Test: local

Change-Id: I7817fed506f8fc4fabd94f004c9a74b2fab25e10
2023-01-06 13:22:18 +00:00
Zaiyue Xue
e853dd3104 Change all the system items unclickable in battery usage list.
Bug: 264643763
Fix: 264643763
Test: manual
Change-Id: I5854f9517bfb308142cc5f3c5e5cd8f54a237d59
2023-01-06 19:42:46 +08:00
Vania Januar
ce93c656aa Show None default app in stylus preference if no Notes holder.
This also fixes the role holder not updating when the
default role holder has changed.

Test: StylusDevicesControllerTest
Bug: 254834764
Change-Id: Iec7ed7698f18279da9a04918dcdf3e20e73609d1
2023-01-06 11:25:35 +00:00
Zaiyue Xue
833e47d851 [Battery usage U] [UI] Show total "Screen On Time" in the battery usage page
Screen record: https://drive.google.com/open?id=16ZOp1E2YBzWQXbnXl786FaLFPel-S9CF&authuser=0&resourcekey=0-oRqCrdTc9FZjVgsq9orhEw&usp=drive_link
For Arabic: https://drive.google.com/open?id=1zh_4jcUnqLC6CDgwju1qQkWJ0QCtm19c&authuser=0&resourcekey=0-kuKfDdOTWxqOUmD0RfPNLQ&usp=drive_link

Next step: show screen on time for each app

Bug: 258120710
Test: manual
Change-Id: I2085a2a85ebd50b2ac876972f6a8ebbf6f20246c
2023-01-06 19:09:52 +08:00
Zaiyue Xue
814eff1c24 Fix the inverted logic to judge whether an app is system app.
Bug: 264626206
Fix: 264626206
Test: maunal
Change-Id: I3750e3b11e444add27243c492cf8968373cd57d0
2023-01-06 15:24:44 +08:00
Jason Hsu
ed2728073f Merge "Fix preferences under Related category can not launch its own page in bluetooth device details page" 2023-01-06 06:27:03 +00:00
TreeHugger Robot
2462e490ab Merge "Refine TetherSettings with ViewModel" 2023-01-06 03:38:49 +00:00
Vania Januar
c3f6c0d593 Merge "Replace placeholder ROLE_ASSISTANT with ROLE_NOTES." 2023-01-05 14:49:31 +00:00
Tetiana Meronyk
c0e31b3be1 Merge "Allow creating admin users when 'config_enableMultipleAdmins' property is enabled" 2023-01-05 14:30:34 +00:00
Chaohui Wang
4525cfb462 Merge "Remove EXTRA_USER_HANDLE from startSpaActivityForApp" 2023-01-05 11:06:08 +00:00
Chaohui Wang
875cbba0af Merge "Add spinner options to "All apps"" 2023-01-05 11:05:23 +00:00
jasonwshsu
829a671265 Fix preferences under Related category can not launch its own page in bluetooth device details page
Root Cause: KeyboardSettingsPreferenceController override
handlePreferenceTreeClick() without checking the preference key, it will lead to handle all preferences' click action.

Solution: Check the preference is the expected preference key

Bug: 264017256
Test: make RunSettingsRoboTests ROBOTEST_FILTER=KeyboardSettingsPreferenceControllerTest
Change-Id: Idcdadc323df5b758b4b21329227e2bb721b1c394
2023-01-05 10:48:55 +00:00
Weng Su
a396a4d8b9 Refine TetherSettings with ViewModel
- Use ViewModel to handle the TetheringManager's lifecycle.

- Use LiveData to observe TetheredInterfaces's changes instead of callbacks.

Bug: 246531382
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=TetherSettingsTest
atest -c TetheringManagerModelTest

Change-Id: Ib1a710a19a5340f63401a37b5c2b0bc307ac82f0
2023-01-05 17:13:57 +08:00
Tom Hsu
8d13ea9e64 Merge "[Regional Preference] Create each page for regional preferences" 2023-01-05 05:34:10 +00:00
Karen Lu
d6a9cba834 Merge "Revert "Use Mockito 4.6.1 API"" into tm-qpr-dev 2023-01-05 05:22:28 +00:00
Karen Lu
869fd2f33e Revert "Use Mockito 4.6.1 API"
Revert submission 20749672-cherrypick-robo-mockito-4.6.1-4rg619yrrf

Reason for revert: Breaking the build on tm-qpr-dev. Bug tracked here: b/264473028

Reverted changes: /q/submissionid:20749672-cherrypick-robo-mockito-4.6.1-4rg619yrrf

Change-Id: Ie9d9d944093752f44eff67627e4a35f4df47e6de
2023-01-05 05:15:10 +00:00
Chaohui Wang
c14729295e Merge "Move common startUninstallActivity to AppUtil" 2023-01-05 03:50:28 +00:00
tom hsu
278f2b07f4 [Regional Preference] Create each page for regional preferences
- Temperature unit
 - Calendar type
 - First day of week

Bug: b/246929960
Bug: b/247072550
Bug: b/247071792
Bug: b/247071572
Test: atest passed
Test: Manual test passed

Change-Id: Iea093588da33b352b5e7bfa5c483659e7afb8296
2023-01-05 10:10:44 +08:00
Matt Pietal
c617ae851d Update wallet setting availability
For devices that don't support wallet, don't even show the setting in
a disabled state, which can cause confusion and lead the user to
believe they can enable it somehow.

Fixes: 251089510
Test: WalletPrivacyPreferenceControllerTest
Change-Id: I5d60957f24712bb4d75e72fa5f64cab35b6d6a5f
2023-01-04 21:39:43 +00:00
Victor Truong
f03a60c67e Change screensaver option to be available to MainUser.
Bug: 262568884
Test: atest ScreenSaverPreferenceControllerTest
Change-Id: Ic9a9fc727cd0ce5311faa3dfc6e0ca8ce47605d7
2023-01-04 15:36:27 -05:00
Becca Hughes
71c948ce7b Add credential manager team to OWNERS
Adds Credential Manager team to owners
for where our settings UI lives (see
internal CL).

Change-Id: I0674b170c9b96e7e7dedbb5be63fa3929f292274
Test: presubmit
Bug: 253157366
2023-01-04 17:24:35 +00:00
Vania Januar
e5651cd86e Replace placeholder ROLE_ASSISTANT with ROLE_NOTES.
Bug: 254834764
Test: StylusDevicesController
Change-Id: I2303034180f9609db8f1a6d663c389a55dd04600
2023-01-04 16:22:38 +00:00
Kevin Liu
cb8c1c6c85 Merge "Use Mockito 4.6.1 API" into tm-qpr-dev 2023-01-04 14:50:04 +00:00
Zaiyue Xue
e756675e69 Combine system apps to one item in the battery usage app list.
Bug: 262952385
Test: 262952385
Test: maunal
Change-Id: I078677b13a22f5e2f8f194bb5d5259f8c54c6b1e
2023-01-04 20:32:56 +08:00
TreeHugger Robot
949dd58112 Merge "Replace battery usage breakdown list from tabs to dropdown list." 2023-01-04 12:17:41 +00:00
Chaohui Wang
74b3bfc066 Add spinner options to "All apps"
Spinner options only shows when there is any disabled or instant apps.

Fix: 264228237
Test: Manually with Settings
Test: Unit test
Change-Id: I9f916c1076b2d754b8c5f30244eac5d5c0bc78f4
2023-01-04 17:06:12 +08:00
Chaohui Wang
4710cfc7ed Move common startUninstallActivity to AppUtil
And also suppress the warnings.

Bug: 236346018
Test: Unit test
Change-Id: I469e563fdeea0bec0587a255b15fddcaaab7f2c3
2023-01-04 16:58:39 +08:00
Yilin Cai
21a633d1ce Merge "Fork the Wi-Fi control setting page to SPA." 2023-01-04 08:46:14 +00:00
Chaohui Wang
afeb7496bb Remove EXTRA_USER_HANDLE from startSpaActivityForApp
Bug: 263553430
Test: Unit test
Change-Id: I6739d4518eac00cfe22905c1a6589b6e9f91a1d3
2023-01-04 16:26:04 +08:00
Zaiyue Xue
778a4b42e3 Replace battery usage breakdown list from tabs to dropdown list.
screen records:
https://drive.google.com/file/d/15VJGQ_G2KIpyFcvZsyE0iRno0WZhfjGb/view?usp=sharing&resourcekey=0-bg48BsC2b-BT_80CGlzpWg
https://drive.google.com/file/d/1RaoysytQ5oZQu8CNPhYgxqBahk3UfVbr/view?usp=sharing&resourcekey=0-Xk2J36fjYWBo6KpFTrMr4Q

Bug: 264338267
Fix: 264338267
Test: manual
Change-Id: Ic020cce711b5232adfc80272836d7c2d0250d94a
2023-01-04 16:20:47 +08:00
TreeHugger Robot
7dfe918785 Merge "Launch settings for clicking fingerprint unlock" 2023-01-04 05:55:54 +00:00
Yilin Cai
fa93f941ef Fork the Wi-Fi control setting page to SPA.
The page is located at "Apps > Special app access > Wi-Fi control".

Test: atest SettingsSpaUnitTests:com.android.settings.spa.app.specialaccess.WifiControlAppListModelTest
Test: local device (http://screen/3a4mkuAwPJoY6rf, http://screen/4fzttXjBqcEKcXA)
Bug: 262206181
Change-Id: Ibef029e6d83849a0eb0d779e5ed6dedfc2fe4b43
2023-01-04 10:56:44 +08:00
Chaohui Wang
36903136af Fix AppDataUsagePreferenceTest#whenHasDataUsage
Fix: 264141691
Test: Unit test
Change-Id: I208f6f8f04d0ed59e31b795f5c90a64e0f76cfa3
2023-01-03 11:47:25 +08:00
Chaohui Wang
7430578af1 Merge "Add SpaAppBridgeActivity for application usage" 2023-01-03 03:06:18 +00:00
TreeHugger Robot
2451afc0df Merge "Refine TetherSettings to avoid activity leaks" 2022-12-30 16:41:19 +00:00
Vania Januar
3dcceea28f Merge "Set title for Bluetooth Details page to "Stylus" for styluses." 2022-12-30 09:32:43 +00:00
Tom Hsu
94cd62ff00 Merge "[Regional Preference] Add each option entry" 2022-12-30 03:20:13 +00:00
XingHai Lu
df1fc7e0fa Merge "Cleanup plurals format Change <one> to <1> in string res file Test: Update, existing tests still pass bug: 199230342" 2022-12-30 02:44:25 +00:00
Milton Wu
160661dc6d Launch settings for clicking fingerprint unlock
Launch FingerprintSettings directly when user clicks "Fingerprint
Unlock". Let Fingerprint settings peform confirmLock() or chooseLock().
And to have smoothly animation, instead of generating challenge in
FingerprintSettings::onActivityResult(), challenge is generated in next
visible activity, and pass it back through next activity result.

Bug: 197717071
Test: atest GatekeeperPasswordProviderTest CredentialModelTest
Test: atest AutoCredentialViewModelTest FingerprintStatusUtilsTest
Test: RunSettingsRoboTests2 FingerprintEnrollIntroductionTest
Test: Manually test fingerprint enroll in settings or suw
Change-Id: Ie27c3c493ea475f6b53cb6bb3f2d45d555f47cb3
2022-12-30 10:01:06 +08:00
TreeHugger Robot
ca0ff60d63 Merge "Fix the end-icon missing issue for Wi-Fi networks" 2022-12-30 01:29:29 +00:00
Weng Su
fbe02cd543 Fix the end-icon missing issue for Wi-Fi networks
- Because WifiEntryPreference needs to support policy transparency, the inherited class is changed from Preference to RestrictedPreference.

- The RestrictedPreference will hides the end icon as default, causing this issue to happen.

- Override the getSecondTargetResId() function with necessary resource id to avoid the end-icon being hidden.

- Remove the redundant setWidgetLayoutResource, because it will be initialized in the extended class.

Bug: 262456749
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiEntryPreferenceTest

Change-Id: Ie3d3a649d3137dc705d7887c8e74592437d9ce61
2022-12-30 05:06:54 +08:00
Vania Januar
8811c177ea Merge "Pass CachedBluetoothDevice into StylusDevicesController." 2022-12-29 14:55:56 +00:00
tom hsu
504a5dda43 [Regional Preference] Add each option entry
- Add a entry in langauge and input page
 - Add new page for the options of Temperature unit, calendar type,
   first day of week, and numbering system.

Bug: b/246929960
Test: atest pass
Test: Manual test pass
Change-Id: I69377fe9cd6dcd7a27c933a8dc98483df3da7665
2022-12-29 21:54:21 +08:00
Vania Januar
b837d57b02 Set title for Bluetooth Details page to "Stylus" for styluses.
Bug: 254835745
Test: BluetoothDeviceDetailsFragmentTest
Change-Id: I725877b0bcf44fa7be805e16fb2d695c9d6074dc
2022-12-29 12:31:59 +00:00
Bonian Chen
2c84a3ba8c Merge "[Settings] Remove EID from SimStatusDialog" 2022-12-29 12:31:49 +00:00
Vania Januar
57822a67a8 Pass CachedBluetoothDevice into StylusDevicesController.
Styluses can now be identified using the newly added DEVICE_TYPE_STYLUS
metadata.

Bug: 251200056
Test: StylusDevicesControllerTest
Change-Id: Ie89f6419cd16ed97299944b35497c6b2ee764dab
2022-12-29 12:31:31 +00:00
ykhung
553baca4ce Remove EarlyWarningTip and move the logic into LowBatteryTip
Fix: 263835342
Test: presubmit
Change-Id: I256cd6f364979046ee87524751c3fe137a0524c2
2022-12-29 15:53:57 +08:00