Commit Graph

21569 Commits

Author SHA1 Message Date
Pajace Chen
6bdfac7cdd Merge "[Shadow] Switch the button for defend battery tips" into main 2024-01-03 06:24:28 +00:00
Chaohui Wang
e3b527a2bf Refactor CellInfoUtil
Unify and simplify the logic, and add unit test.

Bug: 293845605
Test: manual - on Mobile Settings
Test: unit test
Change-Id: I5467b92baa8e47fbd400c7a21fd39fd5ec90ed3a
2024-01-03 13:41:45 +08:00
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
Pajace Chen
484f82e776 [Shadow] Switch the button for defend battery tips
Align the button position of defender settings tips with new design

Bug: 299403437
Test: Manual Test
Flag: None
Change-Id: I897d7291bfc21da69b661893368ddf4d6af7b06b
2024-01-02 14:37:36 +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
Jason Chiu
01f992a698 Support "Add account" search indexing
Implement a default getRawDataToIndex method of preference controller
base for indexing preference's raw data.

Test: manual, robotest
Fix: 243899250
Change-Id: I3fb4f88c881edcbaa3c5bfc7f78cc2e169b0380f
2023-12-29 10:36:57 +08: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
Chaohui Wang
851996d01c Clean up ServiceStateStatus
And LifecycleCallback*, which is no longer used.

Bug: 299068234
Test: m Settings
Change-Id: I29ce5609db2a4b249477da1bcbb0502fa04902fa
2023-12-28 16:58:42 +08:00
Chaohui Wang
2ec3840987 Improve AutoSelectPreferenceController
Deprecate ServiceStateStatus (which could produce wrong value),
and replaced with serviceStateFlow.

Fix: 299068234
Test: manual - turn auto select off and on
Test: unit test
Change-Id: I42fe160500c68cc9ee0fe383121f64146ddbb7f2
2023-12-28 16:58:42 +08: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
Jason Chiu
2a29d67710 Merge "Finish HomepageActivity when it's not the root of a task and not singleTask." into main am: 4f4bb89a23 am: 36dc648ca5
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2884507

Change-Id: If9497561d0efa2311a18886105a1ce02709373be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-26 09:18:32 +00:00
SongFerng Wang
4ee6d84eb4 Merge "Using ACTION_SIM_CARD_STATE_CHANGED to detect simSlotMapping is complete" into main 2023-12-26 06:47:44 +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
Jason Chiu
706907b7b2 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
Fix: 309045575
Test: robotest
Change-Id: Iddcba1652060d755693dd20d0e350e3d6c1ae138
Merged-In: Iddcba1652060d755693dd20d0e350e3d6c1ae138
2023-12-26 02:08:14 +00: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
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