Commit Graph

17147 Commits

Author SHA1 Message Date
Piotr Wilczyński
369cfd8ea5 Don't back up Smooth Display if feature flag off
In the previous CL (ag/24838636), we decided to back up Smooth Display and Force Peak Refresh Rate even if the feature flag is off and then just convert the value in DisplayModeDirector based on the state of the feature flag. This was because it wasn't clear how to access the feature flag from the Settings module. This resulted in the feature partially working if the flag is off.

Bug: 313021502
Test: atest DisplayModeDirectorTest
Test: atest ForcePeakRefreshRatePreferenceControllerTest
Test: atest PeakRefreshRatePreferenceControllerTest
Test: atest SettingsBackupAgentTest
Test: atest SettingsBackupTest
Test: atest SettingsValidatorsTest
Change-Id: I3406bc5c5f49fe6102cdfe6934813a9c4073ac6f
2024-01-02 15:06:31 +00:00
Treehugger Robot
1a564010bf Merge "Inject mocks in RemoteVolumeControllerTest via constructor" into main 2024-01-02 14:03:43 +00:00
Iván Budnik
b02f9f38e4 Inject mocks in RemoteVolumeControllerTest via constructor
This fix avoids the test wrongfully initializing real components before
the tests can modify mockable fields, which causes NPEs.

Bug: 318078730
Test: atest RemoteVolumeGroupControllerTest
Change-Id: I350e3e2e45eadb0f9737ba5d4b45c9f80e3355fb
2024-01-02 13:10:19 +00:00
Jan Tomljanovic
b3e3fcb0fb Merge "Add auth challenge for increasing screen timeout." into main 2024-01-02 12:08:38 +00:00
Oli Thompson
1d0cadeac8 Merge "Fix incorrect test runner" into main 2024-01-02 09:31:17 +00:00
Chaohui Wang
355144675a Fix ANR in WifiCallingPreferenceController.getAvailabilityStatus
Move the following to background thread to avoid block main thread,
- MobileNetworkUtils.isWifiCallingEnabled(mContext, mSubId, null)
- MobileNetworkUtils.buildPhoneAccountConfigureIntent()
- getSummaryForWfcMode()
- Call State

Since WifiCallingPreferenceController no longer calculate availability
in getAvailabilityStatus(), also update the
CallingPreferenceCategoryController accordingly.

Also introduce ImsMmTelRepository for split business logic for easy
testing.

Fix: 292401934
Test: manual - on Mobile Settings
Test: unit test
Change-Id: If92e2c8f6e137e40b83e578294c03c1b917eef8e
2023-12-29 17:16:49 +08:00
Sunny Shao
946f52b2a1 Merge "Revert "Nullability Annotations replacement"" into main 2023-12-29 03:18:24 +00:00
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
Oli Thompson
da00c1e86f Fix incorrect test runner
Bug: 317966701
Test: atest WorkModePreferenceControllerTest

Change-Id: Idf2d66940bebff622c8f65c41ed846d9c24d0ba6
2023-12-28 17:22:44 +00:00
Allen Su
87f76d1c32 Merge "Add locale recommendation metrics" into main 2023-12-28 06:47:22 +00:00
Fan Wu
ec244f2f9c Merge "Ignore failing GraphicsDriverAppPreferenceControllerTest" into main 2023-12-28 05:05:52 +00:00
Fan Wu
c714de120b Ignore failing GraphicsDriverAppPreferenceControllerTest
Bug:317934814

Test: Existing tests are not impacted
Change-Id: I3688ee6ee03f2b40f9b455eb7ec3f1049744c7a9
2023-12-28 03:36:56 +00:00
ykhung
e69d57cfd6 Refine the DynamicDenylistManager dump() data format
Dump of DynamicDenylistManager:
      	ManualDenylist:
      	DynamicDenylist:
      		com.android.managedprovisioning
      		com.android.chrome

Bug: 306329984
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.datasaver"
Change-Id: If5eb8919ee8dc222692b7435f9670d861253be12
2023-12-28 02:37:47 +00:00
mxyyiyi
06fa244255 Update action log metircs of app optimize mode.
Bug: 317329360
Test: manual
Change-Id: Id4cd610a5bcc7988ecbd4545f5ef77a5253aac33
2023-12-27 14:13:25 +08:00
Varun Somani
a579912892 Merge changes from topic "cherrypicker-L33700000962584268:N96700001396822390" into main
* changes:
  ARC: Follow-up fix AndroidLint error
  ARC: Show location services setting in ARC-T
2023-12-26 20:26:40 +00:00
Haijie Hong
b250a8a6d4 Merge "Move hasHeadTracker to background thread in device details page" into main 2023-12-26 06:37:09 +00:00
Haijie Hong
debcc28413 Move hasHeadTracker to background thread in device details page
BUG: 316490612
Test: atest BluetoothDetailsSpatialAudioControllerTest
Change-Id: Ic9ca426190bd6389c05272416c87fbf9da392abd
2023-12-26 13:20:16 +08:00
Allen Su
30e1bf61b7 Add locale recommendation metrics
Bug: 275306065
Test: atest SettingsRoboTests:com.android.settings.localepicker
Change-Id: I7263c292eee51475274585fe4c0864f82fabf7d2
2023-12-25 09:13:39 +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
Graciela Putri
c9660627ea Merge "[3/n] Pre-select fullscreen option if overridden" into main 2023-12-22 16:45:02 +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
Haijie Hong
0731cd3c3c Merge "Fix AdvancedBluetoothDetailsHeaderControllerTest" into main 2023-12-22 06:55:17 +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
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
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
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
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
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
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
Andreas Miko
e6151c6d8f Merge "Fix PinPrivacyPreferenceControllerTest" into main 2023-12-15 12:48:11 +00: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
Manish Singh
aff8a7d231 Fix postsubmit test failures
Test: atest ProfileSelectFragmentTest
Bug: 314371622
Change-Id: Id31518fb92491e5a434cc4a3a95b6353d58a382f
2023-12-14 08:31:14 +00:00
Ziad Youssef
e41e5444e9 Block the disable option for WebView Default package
Test: atest ApplicationFeatureProviderImplTest

Bug: 308907090

Change-Id: I21785975b965b04895849d2df71fa2f2b4cb4b2d
2023-12-13 12:43:19 +00:00
Yiyi Shen
bf6e273ccb [Audiosharing] Update the media device based on assistant callback
Bug: 305620450
Test: atest AvailableMediaDeviceGroupControllerTest
Change-Id: I7a19edb4e408c59ead553ec10fd9e963674518a6
2023-12-13 18:16:55 +08:00
Yiyi Shen
a51097d008 Merge "[Audiosharing] Add prefix to device list item text in adapter." into main 2023-12-12 05:36:54 +00:00