Commit Graph

15754 Commits

Author SHA1 Message Date
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
Kevin Han
c721a44f20 Merge "Pull unused app count from PermissionController" 2022-01-27 23:50:03 +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
SongFerngWang
28bed8ec9f [MEP]The Esim's PhysicalSlotIndex is wrong
Using the getUiccSlotInfo API to get the PhysicalSlotIndex of esim

Bug: 215302360
Test: atest UiccSlotUtilTest
Change-Id: Ic43d6c4a3209d24673769b71b9a148e780ee81ab
2022-01-27 21:13:16 +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
Weng Su
535d47b298 Owners updates
- Open to everyone for tests/unit modification

Test: N/A, just owners update
Change-Id: I8f1a13af54c5f995e8171e2bdddb4d01e0eb5f53
2022-01-27 08:46:18 +00:00
Yuri Lin
b5e4fabf76 Merge "Change zen schedules page to use switches." 2022-01-27 04:51:46 +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
Yuri Lin
a91e2daea7 Change zen schedules page to use switches.
Also add clearer summaries for schedule and calendar events (rather than just "Off" and "On"): for schedules, list the days & times for which the schedule is active, and for events, the calendar whose events it triggers on.

Bug: 190180868
Bug: 215564123
Test: manual for switches, ZenRuleScheduleHelperTest for descriptions

Change-Id: I3ad579503adae0a66dfa3093b4e3df77db0ede31
2022-01-26 11:21:53 -05: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
Etienne Ruffieux
865cad2665 Removed mocked BluetoothAdapter
Bluetooth adapter can not be mocked anymore, using config
resource instead.

Tag: #feature
Bug: 216422716
Test: robotest
Change-Id: I92e503cbceb8412031c7f3b08a3e1016d38da18c
2022-01-26 13:26:00 +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
Kevin Han
350a1785de Pull unused app count from PermissionController
Use the new PermissionControllerManager API to get the number of unused
apps directly from PermissionController instead of replicating the
logic

Bug: 200087723
Test: atest HibernatedAppsPreferenceControllerTest
Change-Id: I989219cfb2a44b5acb054ff5fb744e68d8e118b3
2022-01-26 01:07:38 +00: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
Julia Reynolds
87d1db904e Update notification settings OWNERS
Change-Id: Ic69ea984ab439f1d2795daf82c516878aed420ce
2022-01-25 21:38:29 +00: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
Jan Tomljanovic
1e81c40558 Merge "Call system service API instead of checking the phenotype flag directly." 2022-01-24 12:55:20 +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
TreeHugger Robot
cf5edf2cc1 Merge "Fix ContextualCardsFragment test failure" 2022-01-24 10:19:53 +00:00
TreeHugger Robot
544397015b Merge "Fix WifiSummaryUpdaterTest issues for registerReceiver security design" 2022-01-24 09:46:33 +00:00
Yi-Ling Chuang
85356adb94 Fix EligibleCardChecker test failure
Use a fake slice instead of a wifi slice to decouple the dependency.

Fixes: 215046603
Test: robotest
Change-Id: I02da766007c5bb096dc0844f9ea62d0b49e1f4d6
2022-01-24 15:59:57 +08:00
Yi-Ling Chuang
beb88dc4a9 Fix SliceContextualCardRendererTest
Fixes: 215046609
Test: robotest
Change-Id: I6b48d3b0739fe64a2380426efa03acd1971cd6b1
2022-01-24 14:04:01 +08:00