Commit Graph

13149 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
f962acdb70 Merge "Remove dependencies on hidden network stats APIs" 2022-02-07 05:36:49 +00:00
Steven Ng
d74f060971 Merge "Replace hard-coded bedtime action with Settings.ACTION_BEDTIME_SETTINGS" 2022-02-04 14:46:41 +00:00
Adam Bookatz
fd3c59aee2 Merge "Fix UserDetailsSettingsTest for mAppCopyingPref" 2022-02-03 22:36:12 +00:00
Remi NGUYEN VAN
0dd1b46fcf Remove dependencies on hidden network stats APIs
Replace usage with equivalent stable APIs.

Bug: 197717846
Test: atest SettingsRoboTests
Change-Id: I4151b831fc83dee9b36292cd7991f9b294ed4ff2
2022-02-03 18:02:17 +09:00
Etienne Ruffieux
55dff92a23 Merge "Replacing getActiveDevice by btAdapter.getActiveDevices()" am: 7ff6347c57 am: 3ddfa01d4d am: 89b43fde97 am: e89d54c739
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1966615

Change-Id: Iaa5af12751efa061229de1f2d255a48022d08940
2022-02-03 00:57:39 +00:00
Etienne Ruffieux
e89d54c739 Merge "Replacing getActiveDevice by btAdapter.getActiveDevices()" am: 7ff6347c57 am: 3ddfa01d4d am: 89b43fde97
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1966615

Change-Id: I666780f68471ba1235adc4a2f60e3a50ae5a868c
2022-02-03 00:36:45 +00:00
Etienne Ruffieux
9692c59d3a Replacing getActiveDevice by btAdapter.getActiveDevices()
BluetoothProfile.getActiveDevice() is hidden, packages
should call BluetoothAdapter.getActiveDevices(profile)
instead.

Tag: #feature
Bug: 200202780
Test: build
Change-Id: Id18658de82a7e8292942951a3832a36465a69da3
2022-02-02 15:29:34 +00:00
Darrell Shi
547416749e Settings for timeout to user 0 when docked.
Test: atest SettingsRoboTests:TimeoutToUserZeroSettingsTest
Test: atest SettingsRoboTests:TimeoutToUserZeroPreferenceControllerTest
Test: manually on device, video: http://shortn/_elZS1CdDtE
Bug: 213906356
Change-Id: I519345cdf44eaf452e092adee78ccf9d79130d33
2022-02-02 06:31:51 +00:00
Steven Ng
7f0cc14af8 Replace hard-coded bedtime action with Settings.ACTION_BEDTIME_SETTINGS
Test: atest SettingsRoboTests:com.android.settings.display.darkmode.*
Bug: 216645903
Change-Id: I3c3a00fa53528056538ab1ae34c011b4b44b3fdf
2022-02-01 16:56:17 +00:00
Jonathan Scott
c3dbc3ffbd Merge "Allow Device Management Role Holder to update Settings strings." 2022-01-31 19:10:30 +00:00
Lucas Silva
f0f7adc612 Implement dream complication settings.
This component allows the user to select dream complications to
enable/disable.

Bug: 215703483
Test: locally on device
Change-Id: I03dd9d67b4aeb3f41885b42391d97c18bd7465f6
2022-01-28 17:32:36 +00:00
Junyu Lai
4ff6cf0995 Merge "[MS49] Remove NetworkStats hidden Api usages" am: dac3f891ae am: 21d08383c0 am: eb68eb5ec3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1943133

Change-Id: Ib436a34bf1f094013b8ceb5f8acc67091117e668
2022-01-28 17:27:56 +00:00
Peter_Liang
1900be4361 New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (10/n).
1) Add a new text reading preference fragment for SetupWizard.
2) Add the entry into the vision settings, and temporarily set the visibility as gone.

Bug: 211503117
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER=TextReadingPreferenceFragmentForSetupWizardTest
Change-Id: I5582d79672a9a9a375a79dbdf3a2055e7d785269
2022-01-28 14:04:51 +00:00
Junyu Lai
e539db77c4 [MS49] Remove NetworkStats hidden Api usages
This includes:
1. Remove unused INetworkStatsService and NetworkStatsHistory.
2. Replace NetworkTemplate usages with builder.
3. Replace TrafficStats references to DataUnit.
4. Reimplement NetworkTemplate#normalize.

Test: make RunSettingsRoboTests
Bug: 204830222

  (cherry-picked from ag/16724040)

Change-Id: I8efecda5df403e9ed588daecd169cb3498d213a2
Merged-In: I8efecda5df403e9ed588daecd169cb3498d213a2
2022-01-28 13:08:52 +00:00
Ricky Wai
d3fe360d26 Merge "Add restricted settings UI in Settings accessibility screeen" 2022-01-28 11:23:17 +00:00
TreeHugger Robot
0ae266c6fb Merge "Add dark theme custom type into the dark theme settings page" 2022-01-28 01:59:07 +00:00
PETER LIANG
3774ff6813 Merge changes Ideea8589,Id8fe4fb6
* changes:
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (9/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (8/n).
2022-01-28 00:58:40 +00:00
Junyu Lai
893c1ee0cc Merge "[MS49] Remove NetworkStats hidden Api usages" 2022-01-28 00:42:44 +00:00
TreeHugger Robot
a36e4349ba Merge "Update BrightnessInfo construction in tests" 2022-01-27 23:21:30 +00:00
TreeHugger Robot
b27bad5154 Merge "Ask user to reboot when enabling freeform and desktop mode" 2022-01-27 22:55:30 +00:00
TreeHugger Robot
2335dd98e6 Merge changes from topic "a11y_qs_tooltip_framework"
* changes:
  Support OHM quick settings tooltips when feature on
  Support extra dim quick settings tooltips when feature on
  Support color correction quick settings tooltips when feature on
  Support color inversion quick settings tooltips when feature on
  Integrate Accessibility quick setting tooltips widget into ToggleFeaturePreferenceFragment
2022-01-27 22:10:33 +00:00
Adam Bookatz
1cd87986eb Fix UserDetailsSettingsTest for mAppCopyingPref
Test: somehow run UserDetailsSettingsTest
Bug: 201020580
Change-Id: Ieefc4a191fcb000bddba7fbb1f661ced05917106
2022-01-27 13:16:15 -08:00
Peter_Liang
88d63ea3af New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (9/n).
- Fine-tune the legacy interface of the LabeledSeekBarPreference
1) If not set any label, the layout should be gone instead of visible. If not gone, the preference will have redundant space.

Bug: 211503117
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER=LabeledSeekBarPreferenceTest
Change-Id: Ideea8589e35083eb89495c0eceba38c62b4807a7
2022-01-27 20:33:04 +08:00
Peter_Liang
cc5808cbd7 New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (8/n).
- Extending the LabeledSeekBarPreference
1) Add new attributes, "iconStart", "iconEnd",
"iconStartContentDescription", "iconEndContentDescription"
2) Add new interface setOnSeekBarChangeListener
- It will be integrated with display/font size items in next patches.

Bug: 211503117
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER=LabeledSeekBarPreferenceTest
Change-Id: Id8fe4fb68062c0e92ca4c291d2f7c47303e8691e
2022-01-27 20:32:52 +08:00
Ricky Wai
c76a11f0c1 Add restricted settings UI in Settings accessibility screeen
If OP_ACCESS_RESTRICTED_SETTINGS is rejected, it means accessibility page
for that app is gray out and app info won't show "unlock restricted settings menu"

If OP_ACCESS_RESTRICTED_SETTINGS is ignored, it means accessibility page
for that app is gray out, but app info shows "unlock restricted settings menu"

If OP_ACCESS_RESTRICTED_SETTINGS is allowed(default), it means users can
access accessibility page for that app.

OP_ACCESS_RESTRICTED_SETTINGS will be changed to ignored if user visited
the restricted settings dialog.

OP_ACCESS_RESTRICTED_SETTINGS will be changed to allowed if user passes
the confirmation screen.

Bug: 202130031
Test: Tested the UI and it works correctly
Change-Id: I3dfb94cee440658b4726a1c3f7265f93cd19ed3e
2022-01-27 09:50:40 +00:00
Jason Chiu
0ca89079f1 Merge "Fix broken SettingsSliceProviderTest" 2022-01-27 02:09:30 +00:00
Wilson Wu
d3582455e6 Merge "Introduce AvailableVirtualKeyboardFragmentTest" 2022-01-27 01:41:10 +00:00
Steven Ng
3859251be0 Add dark theme custom type into the dark theme settings page
Also fix some test cases.

I'd prefer using Robolectric shadows rather than mocking Android
framework classes. However, I can't do that in this CL due to the
lack of multiple shadow classes support.

Test: make RunSettingsRoboTests -j56
      ROBOTEST_FILTER=com.android.settings.display.darkmode.*
Bug: 215182463
Change-Id: If557d2933927a5dd0fadd3f6db6bb6f0ab7dd5ee
2022-01-26 16:15:52 +00:00
Lais Andrade
01baa2f640 Merge "Add VibrationPreferenceControler to check availability" 2022-01-26 14:27:45 +00:00
Junyu Lai
25e26ea7af [MS49] Remove NetworkStats hidden Api usages
This includes:
1. Remove unused INetworkStatsService and NetworkStatsHistory.
2. Replace NetworkTemplate usages with builder.
3. Replace TrafficStats references to DataUnit.
4. Reimplement NetworkTemplate#normalize.

Test: make RunSettingsRoboTests
Bug: 204830222
Change-Id: I8efecda5df403e9ed588daecd169cb3498d213a2
2022-01-26 11:05:57 +00:00
SongFerng Wang
b5318d465b Merge "The list does not follow the UX dialog design doc in alert dialog." 2022-01-26 08:55:19 +00:00
Jason Chiu
61db863533 Fix broken SettingsSliceProviderTest
Fix: 214944418
Test: robotest
Change-Id: Ib96bbcecbe9fab91ecae6fcaf32f90c11c3caced
2022-01-26 16:06:55 +08:00
SongFerngWang
f2a8008ae3 The list does not follow the UX dialog design doc in alert dialog.
Please refer the comment#1 at bug and there are change below
- the divider is 4dp
- the item's radius is different in the list.

Bug: 216233391
Test: manual test: check the UI
make RunSettingsRoboTests ROBOTEST_FILTER=SimListDialogFragmentTest (PASS)

Change-Id: I758d60202fcf477aeb49014e60b949e7ad08c082
2022-01-26 12:49:59 +08:00
menghanli
95eba64f85 Support OHM quick settings tooltips when feature on
Bug: 210356011
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityShortcutPreferenceFragmentTest
Change-Id: I3b35d9bb347b7e516db94a4b801a4484f6f38ca8
2022-01-26 07:55:52 +08:00
menghanli
ba9f097b03 Integrate Accessibility quick setting tooltips widget into ToggleFeaturePreferenceFragment
- Show tooltips when main switch is on
- Reshow tooltips when rotate device
- Add abstract functions for child components to show tooltips

Bug: 210356011
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: I543d8af7d24a9fc82659625961850f975a7a0787
2022-01-26 07:54:57 +08:00
Jonathan Scott
e0d439472f Allow Device Management Role Holder to update Settings strings.
Test: manual
Bug: 188414370
Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
2022-01-25 19:03:24 +00:00
Yuri Lin
8b8b06404c Merge "Rename Do Not Disturb -> Priority Mode" 2022-01-25 19:03:06 +00:00
Etienne Ruffieux
47d115c3ff Merge "Replaced use of Bluetooth resource by SystemApi" am: 49a9361062 am: 6f6f5e6b42 am: fe5b587245 am: 32c19cf335
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1939113

Change-Id: Idb1f5503265f831f6efa7c20cb3b5f15dbafad75
2022-01-25 15:21:00 +00:00
Etienne Ruffieux
32c19cf335 Merge "Replaced use of Bluetooth resource by SystemApi" am: 49a9361062 am: 6f6f5e6b42 am: fe5b587245
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1939113

Change-Id: I96bcc99cc3eb5d1dab33246f1046bd646c72e119
2022-01-25 15:02:12 +00:00
Etienne Ruffieux
49a9361062 Merge "Replaced use of Bluetooth resource by SystemApi" 2022-01-25 14:00:08 +00:00
Tsung-Mao Fang
5ff3e8dc8a Merge "Ignore broken tests" 2022-01-25 07:18:16 +00:00
Wilson Wu
56d8703fcb Introduce AvailableVirtualKeyboardFragmentTest
Add a test for AvailableVirtualKeyboardFragment

Fix: 207452897
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableVirtualKeyboardFragmentTest
Change-Id: I83d30ae9d085c2b90fd16e5f6c4100bb82b6b588
2022-01-25 14:29:24 +08:00
Garfield Tan
7a380f3dc6 Ask user to reboot when enabling freeform and desktop mode
The introduction of FreeformTaskListener in WM shell requires a reboot
after enabling freeform support fully. Let's add a dialog explaining the
requirement and ask user to reboot the device.

Enabling desktop mode also requires a reboot to take effect, so this CL
also adds the support to it.

There is also a cancel button to dismiss the dialog without a reboot,
just in case users need to hold off the reboot for any reason.

Bug: 215437867
Test: Pressing OK reboots the device. Pressing Cancel dismisses the
dialog.
Test: atest SettingsRoboTests:FreeformWindowsPreferenceControllerTest
Test: atest SettingsRoboTests:DesktopModePreferenceControllerTest

Change-Id: I553237a29751f73afa9fd4066241a19740872f6f
2022-01-24 21:19:46 -08:00
Tsung-Mao Fang
ff810c3a8a Ignore broken tests
Bug: 216213206
Test: run robo test
Change-Id: I4538465480595524f5d49861f822572842f503ae
2022-01-25 12:21:42 +08:00
TreeHugger Robot
1cdd5923f8 Merge "Mock UserManager.class for WifiSettingsTest" 2022-01-25 03:11:38 +00:00
Lais Andrade
f067833d56 Merge "Disable ring, notification and touch vibration in silent mode" 2022-01-25 00:09:36 +00:00
Yuri Lin
e6e5847cce Rename Do Not Disturb -> Priority Mode
in strings only -- no UI changes in this CL.

Bug: 190180868
Test: manual, ZenModeBypassingAppsPreferenceControllerTest (robotest)

Change-Id: I7bb74d2fd1a9d3b24a8b81a6cc8ba35d38b25656
2022-01-24 14:41:21 -05:00
Lais Andrade
dbcdd2bf46 Add VibrationPreferenceControler to check availability
Add check to Vibrator.hasVibrator() to the "Vibration & haptics"
settings page.

Bug: 178530831
Test: VibrationPreferenceControllerTest
Change-Id: Ia574d59ad086dd273a9a4ca9d3b472bf23e3684a
2022-01-24 15:45:13 +00:00
Lais Andrade
76b2cd60e5 Disable ring, notification and touch vibration in silent mode
Disable haptic settings for ring, notification and touch feedback when
the phone ringer mode is set to silent.

Preserve the setting values and display message explaining why those
settings are disabled.

Bug: 203188852
Test: *Vibration[Intensity|Toggle]PreferenceControllerTest
Change-Id: I6c24079ece9d637f2feb487f756937888a92caa7
2022-01-24 11:01:08 +00:00
TreeHugger Robot
3b362e84f4 Merge "Fix SliceContextualCardRendererTest" 2022-01-24 10:34:56 +00:00