Commit Graph

5555 Commits

Author SHA1 Message Date
menghanli
236a376211 Refactor AccessibilityControlTimeoutPreferenceFragment to improve maintainability
Root cause: There is a bunch of different logic of preferences in AccessibilityControlTimeoutPreferenceFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out logic of AccessibilityControlTimeoutPreferenceFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility
Change-Id: I22e6e3b9e2f199ac1721fc069690321ad5f7a0d4
2022-07-18 15:50:52 +08:00
Menghan Li
95c771c02f Merge changes Ia52cd272,Ie8acdcb8
* changes:
  Refactor CaptionAppearanceFragment to improve maintainability (2/n)
  Refactor CaptionAppearanceFragment to improve maintainability (1/n)
2022-07-15 11:47:37 +00:00
menghanli
3a591f9a34 Refactor CaptionAppearanceFragment to improve maintainability (2/n)
Root cause: There is a bunch of different logic of preferences in CaptionAppearanceFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out font size and type face preference logic of CaptionAppearanceFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility
Change-Id: Ia52cd272495d49a772c981f51e190ff7d29ee14f
2022-07-15 06:55:54 +08:00
Nate Myren
22e23bf4e5 Remove location toggle from privacy controls screen am: d18f11a84f am: b055df3b8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19281813

Change-Id: I501b834e2fff7655a94eb32e0d1d552ed8709774
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 21:11:05 +00:00
menghanli
591e44bb99 Refactor CaptionAppearanceFragment to improve maintainability (1/n)
Root cause: There is a bunch of different logic of preferences in CaptionAppearanceFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out preview preference logic of CaptionAppearanceFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility
Change-Id: Ie8acdcb8659606ce3faf6d5532cc73ee19024725
2022-07-14 16:55:08 +08:00
Nate Myren
d18f11a84f Remove location toggle from privacy controls screen
Bug: 238857896
Test: manual
Change-Id: Ifc4ccc13271c42a0dd1941e8f26842afbe0411d6
2022-07-13 11:31:16 -07:00
TreeHugger Robot
f38e8e6194 Merge "RESTRICT AUTOMERGE Implement advanced vpn ui in vpn settings" into tm-qpr-dev 2022-07-11 22:50:58 +00:00
Peter_Liang
772e114438 Avoid the reset item having inconsistent alignment with the others under SuW.
Replaces the LayoutPreference with native Preference for the reset preference which is used for resettings the status of all preferences.

Bug: 232528123
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingResetControllerTest,TextReadingResetPreferenceTest
Change-Id: I00719f13dc78039269ee373c6b35e12e7ff595ce
2022-07-05 15:32:37 +08:00
Aleksandar Kiridzic
82ef1ef6db speech: Add on-device speech recognition settings entry
Currently under `Settings > System > Languages & input > Speech` there
is a `Voice input` entry with a cog which starts the SSBG model manager
settings activity. Under the same preference group another entry
labeled `On-device recognition` is added which would open a similar
model manager settings activity, but for the on-device recognizer. That
settings activity is yet to be implemented.

The new entry should appear only under the following conditions:
 - An on-device speech recognition service must be available in the
system.
 - A speech recognition service with a proper settings activity
meta-data must exist in the same package as the default on-device
speech recognition service.

Bug: 235457391
Test: Manual, already existing robotests
Change-Id: I17208c8725500ccb3dd2fa51a12b003d32073c4e
(cherry picked from commit 31473663f5)
2022-06-30 19:12:07 +00:00
Menghan Li
9450735e38 Merge "Refactor CaptionPropertiesFragment to improve maintainability" 2022-06-30 03:48:33 +00:00
menghanli
1d26b6d898 Refactor CaptionPropertiesFragment to improve maintainability
Root cause: There is a bunch of different logic of preferences in CaptionPropertiesFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out different logic of CaptionPropertiesFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CaptionPropertiesFragmentTest CaptionTogglePreferenceControllerTest
Change-Id: I7013a7aa284b587c329c2e678dbb079e553ea94d
2022-06-30 09:01:13 +08:00
menghanli
deb72e29ef Refactor CaptionMoreOptionsFragment to improve maintainability
Root cause: There is a bunch of different logic of preferences in CaptionMoreOptionsFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out different logic of CaptionMoreOptionsFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CaptionMoreOptionsFragmentTest CaptionLocalePreferenceControllerTest
Change-Id: Ifdf3e22b027328a9f8eb13d756730ca047ece047
2022-06-30 00:16:19 +00:00
Aleksandar Kiridžić
2050925500 Merge "speech: Add on-device speech recognition settings entry" 2022-06-24 15:59:08 +00:00
Sunny Shao
d46dff8d4f Fix UI flicker problem and update wordings
- "Set time zone automatically" changes to "Set automatically".
- "Use location to set time zone" changes to "Use location"
- Add a new summary text with "Location may be used to set time zone".

Fixes: 233968737
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.datetime
Change-Id: Ia16c428e906cda4ebe052bad83c3f574075a7a64
2022-06-23 10:52:23 +08:00
Zaiyue Xue
7e6aa69cca Merge "Move battery usage files to a separate folder." into tm-qpr-dev am: 3b7953eac2 am: 6470ada117
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18797446

Change-Id: I3d6a155e80a5d54c309061c41d0b6436e61cc4cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 09:42:01 +00:00
Aleksandar Kiridzic
31473663f5 speech: Add on-device speech recognition settings entry
Currently under `Settings > System > Languages & input > Speech` there
is a `Voice input` entry with a cog which starts the SSBG model manager
settings activity. Under the same preference group another entry
labeled `On-device recognition` is added which would open a similar
model manager settings activity, but for the on-device recognizer. That
settings activity is yet to be implemented.

The new entry should appear only under the following conditions:
 - An on-device speech recognition service must be available in the
system.
 - A speech recognition service with a proper settings activity
meta-data must exist in the same package as the default on-device
speech recognition service.

Bug: 235457391
Test: Manual, already existing robotests
Change-Id: I17208c8725500ccb3dd2fa51a12b003d32073c4e
2022-06-20 08:48:10 +00:00
xuezaiyue
ac7318419a Move battery usage files to a separate folder.
Bug: 202118250
Test: presubmit
Change-Id: I21aa58ebc02327849ed2161dbbafcdc806c007f2
2022-06-19 05:59:35 +00:00
Anna Bauza
ab64c52f7d Merge "Fix "Turn on phone calls" for guest user" 2022-06-09 08:46:38 +00:00
Avinash Vadlamudi
26e3744221 Merge changes from topic "avivadla-ephemeral-guest-ui-fixes-tm-qpr-dev" into tm-qpr-dev
* changes:
  Rename method for better readability
  Fix the Ephemeral guest mode UI bugs
2022-06-08 04:03:11 +00:00
Edgar Wang
7ab5a44498 Merge "Recalculate view's height when tab is selected" into tm-dev am: 1f6334825f am: 47b4c86524
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18197509

Change-Id: I3d2bdadb80d2a1189e8e7e69d883ac2f4763bbd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 04:58:36 +00:00
Edgar Wang
160d3af916 Merge "Recalculate view's height when tab is selected" into tm-dev am: 1f6334825f am: e7d6508284
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18197509

Change-Id: If4f5d9eb91c4e5f74747ba391caba5ea7351cdd2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 04:57:57 +00:00
Edgar Wang
47b4c86524 Merge "Recalculate view's height when tab is selected" into tm-dev am: 1f6334825f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18197509

Change-Id: I0f6f87246effdc808b77726a0519d4b063ef4fba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 04:41:48 +00:00
Edgar Wang
1f6334825f Merge "Recalculate view's height when tab is selected" into tm-dev 2022-06-07 04:17:39 +00:00
Alice Kuo
b8b79e0574 Unify the LE audio string and refine the layout to put LE audio switch together am: ed1a79a97e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18740332

Change-Id: I2200a81b0d63cc690b475e5eed43e6f3e9f49ffe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 04:00:24 +00:00
Alice Kuo
b045c57fe6 Add LE Audio feature switcher in the developer option menu am: 948b7cb959
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18740331

Change-Id: Ia0fa92a5061bdb75a648dbb3d8db9fd2bcbdb1a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 04:00:22 +00:00
Alice Kuo
ed1a79a97e Unify the LE audio string and refine the layout to put LE audio switch together
Screenshot: https://screenshot.googleplex.com/A6PwLhscRUypgYK

Bug: 233018305
Bug: 233005340
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioPreferenceControllerTest
Test: switch LE audio feature, and check LE audio functionality status
Change-Id: I2d650eb315790c3efc7510d9e125aeaf4464cda6
Merged-In: I2d650eb315790c3efc7510d9e125aeaf4464cda6
(cherry picked from commit b13abc03dd)
2022-06-07 09:39:25 +08:00
Alice Kuo
948b7cb959 Add LE Audio feature switcher in the developer option menu
Add a switcher to enable/disable LE audio feature. The switcher could be
enabled by setprop ro.bluetooth.leaudio_offload.supported=true

screenshot: https://screenshot.googleplex.com/6aGP664S9PX5EMS

Bug: 233018305
Bug: 233005340
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioPreferenceControllerTest
Test: switch LE audio feature, and check LE audio functionality status
Change-Id: I8adcf27edd1438df445d32fca93f35ff5020a3b3
Merged-In: I8adcf27edd1438df445d32fca93f35ff5020a3b3
(cherry picked from commit 0d11fd07e7)
2022-06-07 09:36:15 +08:00
Treehugger Robot
413494717d Merge changes I0ea498d2,I2d650eb3,I8adcf27e am: 2bec16eda0 am: 4494e0fcfe am: 0570287625 am: c5c6474b70 am: b7cb8d2e21
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2115174

Change-Id: I12907c723c05e1f52e859853592c63a540a18b86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 08:24:20 +00:00
Treehugger Robot
b7cb8d2e21 Merge changes I0ea498d2,I2d650eb3,I8adcf27e am: 2bec16eda0 am: 4494e0fcfe am: 0570287625 am: c5c6474b70
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2115174

Change-Id: Ia4544fef9ee7d7428d9c430da2b68fb2c820538d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 08:07:06 +00:00
Treehugger Robot
0570287625 Merge changes I0ea498d2,I2d650eb3,I8adcf27e am: 2bec16eda0 am: 4494e0fcfe
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2115174

Change-Id: I29df0438b0286cd08ecf714585d60bf234985321
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 07:38:18 +00:00
Treehugger Robot
4494e0fcfe Merge changes I0ea498d2,I2d650eb3,I8adcf27e am: 2bec16eda0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2115174

Change-Id: Ia42f377f4688deb033a87d7ea47e9c4194980517
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 06:52:27 +00:00
Hugh Chen
858e6ff3d5 RESTRICT AUTOMERGE Implement advanced vpn ui in vpn settings
Bug: 220684478
Test: atest -c VpnSettingsTest

Change-Id: If89de16d02cb8b1f387b8f388f8fcf82ad39066b
2022-06-06 06:37:26 +00:00
Treehugger Robot
2bec16eda0 Merge changes I0ea498d2,I2d650eb3,I8adcf27e
* changes:
  Grey out LE audio offload switcher as LE audio isn't enabled/supported
  Unify the LE audio string and refine the layout to put LE audio switch together
  Add LE Audio feature switcher in the developer option menu
2022-06-06 06:37:11 +00:00
Kuan Wang
02b6451258 Clean up legacy "optimization mode" design.
We have two different "Optimization mode" page design in the android R to support bi-state for AOSP and tri-state for Pixel device. From android T, we always show tri-state for both AOSP and Pixel. So it's time to clean up the legacy design for bi-state.
This change doesn't include string resources cleanup, which will be
included in a separated cl.

Bug: 232037602
Test: make RunSettingsRoboTests
Change-Id: I5194201d0b11e2dcea958d49bf07ed837a386465
2022-06-06 02:11:09 +00:00
Avinash Vadlamudi
d23aba7042 Fix the Ephemeral guest mode UI bugs
- Update the user-icon size to 40dp to align with add-icon size
- Remove the guestInfo preference and add the infoText as the summary for the guestExit preference and fix UserSettingsTest

Bug: 231592331
Test: Manual test, atest SettingsRoboTests
Change-Id: I2591bc19a7b2381d1842f0b28ab8fa19c15c19b8
(cherry picked from commit 9cf1d188a2)
2022-06-03 10:58:54 +00:00
Alice Kuo
b13abc03dd Unify the LE audio string and refine the layout to put LE audio switch together
Screenshot: https://screenshot.googleplex.com/A6PwLhscRUypgYK

Bug: 233018305
Bug: 233005340
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioPreferenceControllerTest
Test: switch LE audio feature, and check LE audio functionality status
Change-Id: I2d650eb315790c3efc7510d9e125aeaf4464cda6
2022-06-03 11:52:50 +08:00
Lin Yuan
d207ad5b48 Merge "Fix: policy enforcement for location wifi scanning" into tm-dev am: 6ffe64a0a9 am: 86c609fc27
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18670858

Change-Id: I8f27d54b9b621968ad7e09916a42d028473cb68f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 20:53:24 +00:00
Avinash Vadlamudi
9cf1d188a2 Fix the Ephemeral guest mode UI bugs
- Update the user-icon size to 40dp to align with add-icon size
- Remove the guestInfo preference and add the infoText as the summary for the guestExit preference and fix UserSettingsTest

Bug: 231592331
Test: Manual test, atest SettingsRoboTests
Change-Id: I2591bc19a7b2381d1842f0b28ab8fa19c15c19b8
2022-06-02 15:38:46 +00:00
TreeHugger Robot
3f205a646e Merge "Add Settings for back animation developer option" 2022-06-02 05:13:31 +00:00
Betty Chang
d131bdfbec Merge "[LE Audio] Broadcast Sink UI" am: e3295efcd0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2113244

Change-Id: I4d58377302a60869bce6cd4d2a70a6f61d35e752
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 04:01:11 +00:00
Vadim Caen
ce4990aed9 Add Settings for back animation developer option
Bug: 228936326
Test: BackAnimationPreferenceController
Change-Id: I48516c1f68de799473eac99d35a086046d7e6de9
2022-06-01 16:50:52 +00:00
changbetty
a7b89ba24b [LE Audio] Broadcast Sink UI
- Add dialog for Broadcast and find broadcast source

 - Add Activity for find broadcast source

Bug: 228274114
Test: Manual test
Change-Id: I830efc3514fc42aaa4e53f491ed3a7459bd9bb41
Merged-In: I830efc3514fc42aaa4e53f491ed3a7459bd9bb41
2022-06-01 06:40:07 +00:00
Lin Yuan
c877dce583 Fix: policy enforcement for location wifi scanning
Make DISALLOW_CONFIG_LOCATION effectively disallow wifi scanning and
bluetooth scanning settings for location services.

screenshots: http://shortn/_EUOdqrOcnS, http://shortn/_j320QDm1Zo

Bug: 228315522
Bug: 228315529
Test: atest SettingsRoboTests, on device

Change-Id: I78291579a79e915a27ebdd051b3caf3fc04efc41
(cherry picked from commit fcae147f58)
2022-05-31 23:00:32 +00:00
Alice Kuo
0d11fd07e7 Add LE Audio feature switcher in the developer option menu
Add a switcher to enable/disable LE audio feature. The switcher could be
enabled by setprop ro.bluetooth.leaudio_offload.supported=true

screenshot: https://screenshot.googleplex.com/6aGP664S9PX5EMS

Bug: 233018305
Bug: 233005340
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioPreferenceControllerTest
Test: switch LE audio feature, and check LE audio functionality status
Change-Id: I8adcf27edd1438df445d32fca93f35ff5020a3b3
2022-05-31 18:11:58 +08:00
Anna Bauza
935b735fb4 Fix "Turn on phone calls" for guest user
Move "Turn on phone calls" from guest detail user screen to user screen.
Optimisation: Applying restrictions to default guest user has been moved
to UserManagerService -> setDefaultGuestRestrictions.

Following UX there is no need for confirmation dialog.

Bug: 191483069
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER="com.android.settings.users.GuestTelephonyPreferenceControllerTest"
       make RunSettingsRoboTests -j128 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: Id7391d3f85954ea7f9c94791f24174105ec8073e
2022-05-28 07:18:40 +00:00
Lin Yuan
fcae147f58 Fix: policy enforcement for location wifi scanning
Make DISALLOW_CONFIG_LOCATION effectively disallow wifi scanning and
bluetooth scanning settings for location services.

screenshots: http://shortn/_EUOdqrOcnS, http://shortn/_j320QDm1Zo

Bug: 228315522
Bug: 228315529
Test: atest SettingsRoboTests, on device

Change-Id: I78291579a79e915a27ebdd051b3caf3fc04efc41
2022-05-26 19:38:07 -04:00
Edgar Wang
fc81123555 Merge "Fix talkback speak "double tap to activate" on LabeledSeekBarPreference" into tm-dev am: 4c07e2b865 am: 0c461ec850 am: 73f218bd81 am: caaf1d83f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18475669

Change-Id: I3af68321af5896e8e34c9dcae656b30f0cabcd9e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 13:37:36 +00:00
Edgar Wang
caaf1d83f2 Merge "Fix talkback speak "double tap to activate" on LabeledSeekBarPreference" into tm-dev am: 4c07e2b865 am: 0c461ec850 am: 73f218bd81
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18475669

Change-Id: Id1c120a3d5dd5796ebd952dcb71a18cbfb297ac1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 13:01:37 +00:00
Edgar Wang
8f75078181 Merge "Fix talkback speak "double tap to activate" on LabeledSeekBarPreference" into tm-dev am: 4c07e2b865 am: 9b81fec6a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18475669

Change-Id: I0a5f1a4bed9e2fd4d57119e0fb9572c367c9e644
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 12:54:03 +00:00
Edgar Wang
4c07e2b865 Merge "Fix talkback speak "double tap to activate" on LabeledSeekBarPreference" into tm-dev 2022-05-24 12:07:41 +00:00