Commit Graph

21238 Commits

Author SHA1 Message Date
Iavor-Valentin Iftime
86a377dc11 Merge "Move vibrate while unlocked behind a flag" into main 2024-01-08 16:45:16 +00:00
mxyyiyi
b20f910cd1 Update accessibility content description for battery usage chart view.
- Add battery level percentage description.

Bug: 317000579
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.batteryusage.*"
Change-Id: I03c8a97c521997170cbd72b7e0fcc88f7eb97221
2024-01-08 18:30:01 +08:00
Charlotte Lu
8ef68fb1fc Add WEPNetworksPreferenceController.
Test: Visual Test
Fix: 317453032
Change-Id: Ifce83ffa32eeb0d1245b7c5e61c3cad3f85fa14e
2024-01-08 16:45:42 +08:00
Chaohui Wang
f28d119560 Show "0 B used" when no data usage this cycle
When the latest cycle has no data usage, currently it shows all time
usage without cycle info, which could confuse user.

Change to "0 B used used xxx - xxx" to fix this issue.

Fix: 292346951
Test: manual - on Mobile Settings
Test: unit tests
Change-Id: Ic06fd63a3bc049d70538d0a3cd1fa3d62dbd71d7
2024-01-06 19:05:47 +08:00
Piotr Wilczyński
c7de74ac4b Merge "Don't back up Smooth Display if feature flag off" into main 2024-01-05 12:48:32 +00:00
Chaohui Wang
df5c4f69a8 Fix DataUsageSummaryPreferenceController ANR
By off load data loading to background.

Fix: 295260929
Test: manual - on Mobile Settings
Test: unit test
Change-Id: Ib2ef19301b1e97af8a7f3861829779c3b70da4a4
2024-01-05 16:07:28 +08:00
SongFerng Wang
8663deec9b Using ACTION_SIM_CARD_STATE_CHANGED to detect simSlotMapping is complete am: e51d8515c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/25809891

Change-Id: I0bed6503fbce6204b2da75f6dc25364148f1ce8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-05 07:23:19 +00:00
Treehugger Robot
e8d26737a6 Merge "Reset telephony stack during Reset Mobile Network flow" into main 2024-01-05 04:49:29 +00:00
Rambo Wang
4c384506d5 Reset telephony stack during Reset Mobile Network flow
This CL introduces two more steps to restart Phone process and RILD
during the Reset mobile network flow by the help of the
TelephonyContentProvider which has been used by Pixel Adaptive
Connectivity Services ("SCONE") for a while.

The additional reset options can resolve issues like resources leak
and internal state stuck, effectively recover telephony stack into
fresh state.

The reset options are performed in the background and have no impact
on UX of the reset flow.

Bug: 271921464
Test: ResetNetworkOperationBuilderTest
Test: Feature test with both flag on and off
Change-Id: If09d20d79e908dd43f3f654fb7cca7f713b7f03a
2024-01-05 03:53:21 +00:00
SongFerng Wang
e51d8515c0 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.
(cherry picked from commit ba2a86ad9f)
2024-01-05 03:38:30 +00:00
Chaohui Wang
7cbfc40681 Migrate NetworkOperatorPreference to Kotlin
Bug: 293845605
Test: manual - with SIM Settings
Test: unit test
Change-Id: I5c21085a4ec9c2f53f93867813ba298690f161ff
2024-01-04 13:02:31 +08:00
Chaohui Wang
92ae630598 Merge "Fix SIM Settings crash when IllegalArgumentException" into main 2024-01-04 04:51:46 +00:00
Chaohui Wang
3bd2e55b23 Fix SIM Settings crash when IllegalArgumentException
By catch exception.

Fix: 318460644
Test: manual - with SIM Settings
Test: unit test
Change-Id: I99025125b5fe71c6507afc355a881af8948d6a7a
2024-01-04 10:47:48 +08:00
Jason Chiu
2c2dd72ff7 Merge "Support "Add account" search indexing" into main 2024-01-04 02:39:05 +00:00
Raphael Kim
e89aa195f1 Update test with new AssociationInfo constructor.
Bug: 314992577
Change-Id: I0be91dc331e6ae5f3b410cdf057ca547bb4dd862
Test: m
2024-01-04 01:47:36 +00:00
Jan Tomljanovic
be50a8f6f3 Merge "Require authentication for changing USB preferences." into main 2024-01-03 15:19:21 +00:00
Allen Su
ef83eeb1db Merge "Remove the xml entry when the system language is removed" into main 2024-01-03 08:29:07 +00:00
Allen Su
d8695cbf9b Remove the xml entry when the system language is removed
Bug: 301395074
Test: atest SettingsRoboTests:com.android.settings.localepicker
Change-Id: Ic771cd5146ab954c3da65748bf87cd14d30770b4
2024-01-03 07:27:52 +00:00
Chaohui Wang
ce84bfbc7e Merge "Refactor CellInfoUtil" into main 2024-01-03 07:05:11 +00:00
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