Commit Graph

21392 Commits

Author SHA1 Message Date
Chaohui Wang
29a3a0f4f4 Merge "Fix lateinit property allowedNetworkTypesFlow" into main 2023-12-25 06:39:25 +00:00
Jun Lan
be1538671f Fix test failure with package user id
Context: https://android-build.corp.google.com/test_investigate/?invocationId=I73600010230800138&testResultId=TR57529105387126666

Bug: 315477872
Test: manual
Change-Id: I8d0bd970bb43cc27b7f280c50cfcf4e3ea01f321
2023-12-25 13:06:50 +08:00
Chaohui Wang
956894caff Fix lateinit property allowedNetworkTypesFlow
Which has not been initialized.

Convert it to factory to fix.

Fix: 317353030
Test: manual - on Mobile Settings
Test: unit test
Change-Id: Ie5f22d47cb3f3fe036c706ba77ed3bdaad0b54a2
2023-12-25 12:28:14 +08:00
Rambo Wang
5e27df82ee Merge "Support reset IMS stack in Reset Mobile Network flow" into main 2023-12-22 18:19:37 +00:00
Kevin Jeon
dc8508293e Merge "Hide Memory usage UI fields if flag is enabled" into main 2023-12-22 17:39:09 +00:00
Graciela Putri
c9660627ea Merge "[3/n] Pre-select fullscreen option if overridden" into main 2023-12-22 16:45:02 +00:00
rambowang
41ba9dc658 Support reset IMS stack in Reset Mobile Network flow
Reset the IMS stack for the specified subscription
with the help of API TelephonyManager#resetIms.

Bug: 271921464
Test: ResetNetworkOperationBuilderTest
Change-Id: I61575f18bcc300f362000dc7f4257b9d794b6b69
2023-12-22 10:33:46 -06:00
Jan Tomljanovic
db40deb26f Require authentication for changing USB preferences.
Test: atest SettingsRoboTests
Test: also tested manually
Bug: 317367746
Change-Id: I17daaad7c7772664cae6d12cf2322991827f33bb
2023-12-22 15:18:05 +00:00
Graciela Wissen Putri
480d523a0c [3/n] Pre-select fullscreen option if overridden
Settings > Apps > Aspect ratio (experimental)

Pre-select the fullscreen option if all are true:
- device manufacturer has overridden app to fullscreen
- app has not opted out of orientation override
- app has not opted out of user's fullscreen option
- user has not set any aspect ratio (USER_MIN_ASPECT_RATIO_UNSET)

"App default" will have a new value of USER_MIN_ASPECT_RATIO_APP_DEFAULT
if device manufacturer has overridden app to fullscreen, which will
behave the same as USER_MIN_ASPECT_RATIO_UNSET without the
device-applied fullscreen override.

Bug: 310816437
Test: atest UserAspectRatioDetailsTest
      atest UserAspectRatioManagerTest
      atest UserAspectRatioAppPreferenceTest
Change-Id: I6be634bb4369292687b865ce30d902540419183c
2023-12-22 13:15:56 +00:00
Yanting Yang
cf3f89d4fb Merge "Support search index for Accessibility button & gesture" into main 2023-12-22 09:34:11 +00:00
Chaohui Wang
a5d537053a Merge "Show "MMS messages" when mobile data is off" into main 2023-12-22 09:08:12 +00:00
Haijie Hong
0731cd3c3c Merge "Fix AdvancedBluetoothDetailsHeaderControllerTest" into main 2023-12-22 06:55:17 +00:00
Kevin Jeon
55c8c9b86c Hide Memory usage UI fields if flag is enabled
This change updates the Memory use UI in developer settings to hide
memory fields by default if the AppProfiler PSS deprecation flag is
enabled. A toggle is provided to resume PSS profiling and reinstate the
memory fields, and shows a dialog to reboot if the toggle is updated.

The summary for the "Memory" button in developer settings will show
"Memory profiling disabled" instead of "Avg X GB of Y memory used" if
PSS profiling is not enabled.

Test: With the flag enabled, flash and verify that:
      - The memory fields are hidden by default, and the summary shows
	the expected "Memory profiling disabled" text
      - Clicking the toggle shows the reboot dialog, which will
	correctly change the setting and reboot if accepted, and keep
	the setting and not reboot if denied
      - Check that AppProfiler correctly profiles PSS or RSS based on
	the state of the toggle, which persists across reboots
      - Included UI test for Memory page elements based on flag value.
Bug: 296454553
Change-Id: Ie21791502445a321446cb8110e5800089f47ac58
2023-12-22 01:15:04 -05:00
SongFerng Wang
ba2a86ad9f Using ACTION_SIM_CARD_STATE_CHANGED to detect simSlotMapping is complete
Sometime modem can't return the GET_SIM_STATUS immediately, so that the settings send the sim switching too early after simSlotMapping.

Bug: 291733084
Change-Id: If547c8b02020bc86c83915334e29945176a4ee9f
Test: tester will test it manually.
2023-12-22 05:57:53 +00:00
Yanting Yang
6c0f9e68d1 Support search index for Accessibility button & gesture
Bug: 223514494
Test: manual & atest AccessibilityButtonPreferenceControllerTest
Change-Id: I2433e5aaccd8eb92325141246d9b409bb2b97e08
2023-12-22 04:07:36 +00:00
Rhed Jao
b1ab7f0373 Merge "Do not finish the activity if the activity result is required" into main 2023-12-22 01:57:58 +00:00
Jason Chiu
05c7b59361 Merge "Make the suggestion view dismissible" into main 2023-12-21 06:23:33 +00:00
Fangqiu Su
a7164bbb35 Merge "Update the imports to androidx.test.filters.*" into main 2023-12-20 23:18:59 +00:00
Varun Somani
a36612c003 ARC: Follow-up fix AndroidLint error
Add missing default resource value to fix AndroidLint failure.

Bug: 295397004
Test: Presubmit
Change-Id: If7ff54c527f48b5260a9f8f8bdddcbf410ac8931
2023-12-20 23:00:10 +00:00
Fangqiu Su
4c40fd308f Merge "Update the imports to androidx.test.filters.*" into main 2023-12-20 22:34:52 +00:00
Andy Yu
fd6e4f8a9a Merge "Add Settings switch to disable Game default frame rate" into main 2023-12-20 21:59:42 +00:00
Jan Tomljanovic
6b4c754f5e Add auth challenge for increasing screen timeout.
We only require one auth after onStart(), and only for increasing the
timeout.

Test: atest SettingsRoboTests:com.android.settings.display.ScreenTimeoutSettingsTest
Test: also manually tested
Bug: 315937886
Change-Id: If4aed67736cd7545d3a518aadd8253ea6a9fae43
2023-12-20 21:53:56 +00:00
Rhed Jao
19dcf2dc19 Do not finish the activity if the activity result is required
Repair mode requires the completion result after an user chooses
a new screen lock. This change defers finishing the activity until
the activity result is available.

Bug: 281641188
Test: atest SettingsRoboTests:com.android.settings.password
Change-Id: If635521ef7e1c509950d9683c15dffe45375cf4f
2023-12-20 09:47:51 +00:00
Chaohui Wang
ce18c81da6 Show "MMS messages" when mobile data is off
For some corner case,
- Single SIM, data off, auto switch on (although hidden)
- Dual SIM, default data off, auto switch on

Bug: 303759893
Test: manual - on Mobile Settings
Test: unit test
Change-Id: I70dd792ecff590f34100efaaf6ee4efcc2b759fd
2023-12-20 17:07:45 +08:00
Chaohui Wang
28b85b5810 Refresh "Choose network" summary when service state changes
This summary display service connection state, which should be refreshed
when service state changes.

Fix: 313026209
Test: manual - on Mobile Settings
Test: unit test
Change-Id: I6ca2f89e05f21460a7db055f037919b6ebd19182
2023-12-20 16:19:08 +08:00
Jason Chiu
72d638e681 Merge "Finish HomepageActivity when it's not the root of a task and not singleTask." into main 2023-12-20 06:10:18 +00:00
Jason Chiu
5a305645c1 Finish HomepageActivity when it's not the root of a task and not singleTask.
HomepageActivity should be the first activity in a task, or be launched
in singleTask mode. Finishing it will bring up the previous activity in
the task.

Fix: 297857732
Test: robotest
Change-Id: Iddcba1652060d755693dd20d0e350e3d6c1ae138
2023-12-20 03:40:29 +00:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
Mark Kim
6ca4c0fb5a Merge "Update archive's button enable property whenever hibernation toggle has changed its value" into main 2023-12-19 21:55:56 +00:00
josephpv
0b7d46746c Add Biometrics settings inside private space One Lock settings
This includes below changes:
- Add Biometrics preferernce in Private Space One Lock settings page
- Face and Fingerprint enrolment for Private profile
- Feature is behind flag android.multiuser.enable_biometrics_to_unlock_private_space

Screenshots:
go/ss/9cWZRAuvGGW7gMm.png
go/ss/B3NoFbL3KbpSzeN.png
go/ss/7xH3DLi9d6Lu2mR.png
go/ss/8WBEgKychWpduXg.png
go/ss/8pmPGshd9aiPvVC.png
go/ss/AFPBPbiaBBvTj3p.png
go/ss/3fE4XKLLUdP8LmF.png

Bug: 308862923
Test: atest CombinedBiometricStatusUtilsTest, atest FaceFingerprintUnlockControllerTest
Change-Id: I1853107a4df4fc97db53c97524c6d44a4f554e37
2023-12-19 18:57:10 +00:00
Fangqiu Su
69c5d2f4af Update the imports to androidx.test.filters.*
Bug: 316941721
Test: mmma .
Change-Id: Id77c442066426ab52fb5c976f980a8881d0f8615
2023-12-19 18:12:48 +00:00
Fangqiu Su
7dfb2a182b Update the imports to androidx.test.filters.*
Bug: 316941721
Test: mmma .
Change-Id: Ia19c53850a0440b89434fcb5bf3fc1f61b58a46c
2023-12-19 18:12:46 +00:00
Mark Kim
5528e94455 Update archive's button enable property whenever hibernation toggle
has changed its value

Test: AppArchiveButtonTest

Bug: 304257274
Change-Id: I95b8a2219a7d04437b5c7d217a520e8c8b05d395
2023-12-19 14:11:16 +00:00
Jason Chiu
dfd802da92 Make the suggestion view dismissible
The suggestion view could just be operated once to eliminate flicker.
When the suggestion is completed, there was no way to dismiss it unless
users kill Settings.

This patch allows updating the view's visibility after the activity is
stopped. When the activity restarts, the view can be updated.

Fix: 294153594
Test: robotest
Change-Id: Idc3aada3bff001d603bf2f7737f70f2880f6cc35
2023-12-19 16:12:42 +08:00
Chaohui Wang
83c46eb1b6 Fix DataUsageListTest
Using androidx.fragment.app.testing.launchFragment to rewrite the test.

Bug: 315449973
Test: manual - on DataUsageList
Test: unit test
Change-Id: Ief373becb4ac8ab1ba93b8ff3c594b5682c4821e
2023-12-19 12:54:31 +08:00
Matías Hernández
c76c679f63 Merge "Tag Zen operations from Settings as coming from the user" into main 2023-12-18 22:57:58 +00:00
Varun Somani
45711dccb4 ARC: Show location services setting in ARC-T
Add a new flag that controls location services setting. The current flag
controls location services as well as wifi and bluetooth scanning.
Seperating these flag will help show GLA setting to the user.

UI: go/screen-recording-location-setting-arc-t

Bug: 295397004
Test: atest SettingsRoboTests and manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:37a14be139542f0d6dbc4b75863368279e8053ba)
Merged-In: I3fc377fb118fea031b0ca7dca84f645998486304
Change-Id: I3fc377fb118fea031b0ca7dca84f645998486304
2023-12-18 21:55:24 +00:00
Treehugger Robot
f5f4e0eebd Merge "Block the disable option for WebView Default package" into main 2023-12-18 15:59:38 +00:00
Matías Hernández
907b47105b Tag Zen operations from Settings as coming from the user
Bug: 308670715
Test: atest ApprovalPreferenceControllerTest
Change-Id: Id118f867e84f3d742db6b12eab0f34df1357d178
2023-12-18 13:32:32 +01:00
Haijie Hong
6b1393a2d7 Fix AdvancedBluetoothDetailsHeaderControllerTest
Bug: 313014781
Test: atest AdvancedBluetoothDetailsHeaderControllerTest
Change-Id: I42cea3add9d61abeae339b3aa0ec7025ab238d89
2023-12-18 20:17:02 +08:00
Andy Yu
e6e57cffbd Add Settings switch to disable Game default frame rate
This patch adds a new toggle under Developer settings. It defaults
to off, meaning game default frame rate is not disabled. Users
can choose to togge it on to disable game default frame rate.

When a user toggles this switch, it calls to GameManagerService
to update the frame rate of games that are currently in the
foreground and coming games.

screenshots:
https://screenshot.googleplex.com/8jTWyNBhJm7zC4x
https://screenshot.googleplex.com/5junmXtuHnRxyL2

Bug: 286084594
Bug: 306266471
Test: m; flash
Test: atest
SettingsRoboTests:GameDefaultFrameRatePReferenceControllerTest
Change-Id: Ide843f61e57e244d6e1fc30f93b2358b2bcb655b
2023-12-15 13:20:17 -08:00
Chaohui Wang
51fc4bef49 Use single queryDetailsForDevice if possible
To improve performance.

Since queryDetailsForDevice() also aggregated the uids into one,
the apps list in DataUsageList still needs another separated api call.

Fix: 315449973
Test: manual - on DataUsageList page
Test: unit tests
Change-Id: I96c23dd7d0d40ecd183e0fb0f61329db42dae1ab
2023-12-16 02:01:22 +08:00
Andreas Miko
e6151c6d8f Merge "Fix PinPrivacyPreferenceControllerTest" into main 2023-12-15 12:48:11 +00:00
Chaohui Wang
007ef134b6 Hide MMS messages if switch mobile data automatically
Per designer's comment, hide the "MMS messages" if user cannot use it to
control MMS.

Fix: 303759893
Test: manual - turn "Switch mobile data automatically" on / off
Test: unit test
Change-Id: I874524c0cedb48f7daf87f32920e26428ae78c89
2023-12-15 17:00:22 +08:00
Fan Wu
5ae70ad1e2 Ignore FingerprintSettingsFragmentTest failing test. This test is blocking SettingsRoboTests from turning green and getting promoted to Presubmit
Bug: 315519360

Test: atest
Change-Id: I78500762fd21693f275abce8651a31a648846a02
2023-12-15 11:02:38 +08:00
Chun-Ku Lin
b4665e6714 Merge "Apply Setup styles to the a11y edit shortcut full screen." into main 2023-12-14 22:51:31 +00:00
Chun-Ku Lin
d92f17cdf5 Merge "Convert a11y shortcut edit screen to a full screen." into main 2023-12-14 22:19:08 +00:00
Chun-Ku Lin
9d6bf1b784 Apply Setup styles to the a11y edit shortcut full screen.
Bug: 300302098

Test: atest AccessibilitySetupWizardUtilsTest
Test: atest EditShortcutsPreferenceFragmentTest (Unable to make
Robolectric inflate the view of the edit shortcut fragment with the Setup wizard
theme)
Test: manual (Launch the setup wizard and check the screen)

Change-Id: I2995e914d622e9865101ef16e3b280c65371a252
2023-12-14 20:50:45 +00:00
Chun-Ku Lin
64e946c7fa Convert a11y shortcut edit screen to a full screen.
Bug: 300302098

Flag: adb shell device_config put accessibility com.android.settings.accessibility.edit_shortcuts_in_full_screen true

Test: manual
Test: atest com.android.settings.accessibility.shortcuts

Change-Id: I0b5e367fed962ff01036122ce7ff32a8ae47fbc3
2023-12-14 20:50:33 +00:00
Andreas Miko
dfa081da0c Fix PinPrivacyPreferenceControllerTest
isAvailable_lockSetToPinOrPw_shouldReturnTrue() was never functional and is not a valid test case because the functionality was removed in a later patchset within ag/21369281

Test: PinPrivacyPreferenceControllerTest
Bug: b/313612259
Flag: NONE

Change-Id: Id8c91b8d7267a74eb84225e73043f1d4308b6ce0
2023-12-14 12:32:30 +00:00