Commit Graph

350 Commits

Author SHA1 Message Date
Chaohui Wang
71d1f021af Migrate to CompoundButton.OnCheckedChangeListener
Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427
Test: manual - check Settings pages
Change-Id: If2e08a9a9557ec66a3b31ef18cd2e15943098a59
2023-11-07 20:22:27 +08:00
Sally Qi
fbb088ffdb Settings: add a new developer menu entry to show hdr/sdr ratio overlay.
- The hdr/sdr ratio overlay will be shown on screen if the option is
  selected from the developer option.
- This option is hidden on non-HDR-supported devices.
- Add flags: com.android.settings.flags.development_hdr_sdr_ratio

Test: enable show hdr/sdr ratio from developer menu; com.android.settings.development.ShowHdrSdrRatioPreferenceControllerTest
Bug: 291863102
Change-Id: Idd72f95c67c95cd8127f9b94e031b3d87b18e307
2023-11-03 11:02:07 -07:00
Chaohui Wang
12ea5afdf1 Not call MainSwitchBar.getSwitch()
This is private implement details, will be removed in future.

Should call MainSwitchBar's isChecked() and setChecked() to ensure
main switch bar's style is set correctly.

Bug: 306658427
Test: manual - on wifi tether
Test: manual - on developer options
Test: m RunSettingsRoboTests
Change-Id: I292ffbcf73da0721fc206e3dac7610a0aeb20047
2023-10-25 13:52:43 +08:00
Alice Kuo
f8767cdd31 Remove allowlist reboot behavior
As we switch to use allowlist or bypass it, it would only impact the
default connection after the paring. So based on it, we don't need to
force device reboot to apply the setting

Bug: 300012501
Test: m SettingsGoogle
Change-Id: I0b63a68e1263692e922968c122b96b5635b9861f
2023-10-13 01:22:06 +08:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Brandon Liu
28800ec247 Developer option for Grammatical Gender
Bug: b/272626712
Test: Added and verified affected atests pass
Change-Id: Ie07f80d608b78dfce3309533ac02d9a907e5e7b4
2023-07-19 17:29:50 +00:00
Prabir Pradhan
8fca8a72dc Merge "Add "Show key presses" to input developer options" into udc-qpr-dev 2023-06-01 17:37:44 +00:00
Yuxin Hu
0183cfd816 Fix "Enable ANGLE" switch behavior when Developer Option Switch is off
Fix below bugs:
1) When developer option switch is turned off,
"Enable ANGLE" switch is not disabled. Fixed it in
GraphicsDriverEnableAngleAsSystemDriverController::update().

2) When user turns off developer option switch,
a restart is not always mandatory. However, we should ask
user to restart the device is "Enable ANGLE" is forced to
change due to developer option switch turning off.
Fixed it in DevelopmentSettingsDashboardFragment::onSwitchChanged().

3) When user turns off developer option switch and
the reboot dialog pops up, user can dismiss the dialog by
not clicking either POSITIVE_BUTTON or NEGATIVE_BUTTON.
We should enforce user to click the button and disallow the
option to dimiss the dialog by touching screen areas
outside the window's bounds.
Fixed it in DisableDevSettingsDialogFragment.java.

Did a few clean-up and in
GraphicsDriverEnableAngleAsSystemDriverController.java, and updated
unit test to reflect new code behavior.

Bug: b/270994705
Test: m; flash and device can boot.
Test: atest -c GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest
Test: atest GraphicsDriverEnableAngleAsSystemDriverControllerTest
Test: atest SettingsRoboTests:FreeformWindowsPreferenceControllerTest
Test: atest SettingsRoboTests:DesktopModePreferenceControllerTest

Change-Id: I199b2fe59b6ad948b753793254c822a293d8b40d
2023-05-24 01:37:35 +00:00
Prabir Pradhan
8b5efb6505 Add "Show key presses" to input developer options
Bug: 283524254
Bug: 282005442
Test: atest ShowKeyPressesPreferenceControllerTest
Test: manual
Change-Id: I120c8bf607a6073938eda91975e247905982c94d
2023-05-19 21:44:17 +00:00
Patty Huang
f05615f1e8 Add toggle to show/hide the Per Device Enable LE Audio Toggle in Device details
Bug: 280020008
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioDeviceDetailsPreferenceControllerTest
Change-Id: I559f34f2b0764c4f566fe1e0c1357929e2c88fb6
2023-05-04 01:26:15 +08:00
Yuxin Hu
25b270c0f8 Add developer option switch to set ANGLE as the default system driver
This change adds a new developer option switch called
"Enable ANGLE". It defaults to off. User can choose
to toggle it on and off, and the value of the system
property "persist.graphics.egl" is changed accordingly:

switch off: persist.graphics.egl=""
switch on: persist.graphics.egl="angle"

When user toggles the switch, a reboot window is
popped up asking user to reboot now to make the change
takes effect. If user chooses to cancel the reboot,
the switch is toggled back. This enforces that a reboot
is required whenever the "persis.graphics.egl" value
changes.

Upon reboot, we will load either ANGLE or native
GLES driver as the system driver, based on the value of
"persist.graphics.egl".

The switch is disabled if ANGLE is not installed
in /vendor partition. We use the system property
"ro.gfx.angle.supported" as an indicator. We set the
two conditions together in angle.mk file. Any device
mk file that inherits angle.mk file will result in
ANGLE libs installed in /vendor and "ro.gfx.angle.supported"
set to true.

Bug: b/270994705
Test: m; flash and check Pixel 7 boots fine
atest SettingsRoboTests:GraphicsDriverEnableAngleAsSystemDriverControllerTest

Change-Id: I565eff614472bb6ba50742e7dfa49b50dca2809f
2023-04-28 18:42:10 +00:00
Kweku Adams
21b9d15cd6 Merge "Hide TARE page when disabled." into udc-dev 2023-04-14 13:20:06 +00:00
Vania Januar
b79772ac3a Merge "Add developer options to force enable Notes role." into udc-dev 2023-04-12 09:54:15 +00:00
Vania Januar
bf4119b4b5 Add developer options to force enable Notes role.
The Notes role is enabled through a RRO that overlays the config
config_enableDefaultNotes (and its work profile counterpart).

Bug: 276432652
Test: ForceEnableNotesRolePreferenceControllerTest
Change-Id: Iab05b6c13dabda94c513919365a3a9f69dacb80e
2023-04-11 13:05:07 +00:00
Edgar Wang
b5774a8e2e Disable developer options when development_settings_enabled is disabled
Bug: 270966670
Test: manual
Change-Id: If4296c564ee64804b35a3357f40f8d1d49cd284a
2023-04-11 13:44:02 +08:00
Kweku Adams
d6409c4ee1 Hide TARE page when disabled.
Hide the TARE page option when TARE is disabled or the page is
explicitly flagged to be shown.

Bug: 270498386
Bug: 270964794
Test: manually modify flags and check if TARE option shows
Change-Id: Icc23a34ff1b9af5f1ddb649c4aefbea22a123498
2023-04-10 19:44:59 +00:00
Aurélien Pomini
649c5082c6 Add contrast setting in dev options
See the attached video from b/266071578#comment2 to see how the setting
looks like.

Bug: 266071578
Test: atest ContrastDialogTest
Test: atest ContrastDialogControllerTest
Change-Id: Id9fc31a0562059814d4e342ea8095adc5b53d5f3
2023-03-31 19:35:08 +00:00
Tiger Huang
2238b4e807 Merge "Add an developer option to enable config_navBarDefaultTransparent" into udc-dev 2023-03-08 12:47:29 +00:00
Patty Huang
9745460cad Merge "Add LE Audio allow list feature switcher in the developer option menu" am: 5bb798f518 am: 0086b200d0 am: ced8230ee9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2387973

Change-Id: I30cf2f5e5fcf534877986839aba2f908b8f3b461
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 19:44:08 +00:00
Patty Huang
0086b200d0 Merge "Add LE Audio allow list feature switcher in the developer option menu" am: 5bb798f518
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2387973

Change-Id: Ibb05089fd8a8245966e5ff9817e4a25833ccd442
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-06 05:54:06 +00:00
Patty Huang
5bb798f518 Merge "Add LE Audio allow list feature switcher in the developer option menu" 2023-03-06 05:14:07 +00:00
Jack Yu
e1dfe3d417 Show reboot dialog when users disable developer options am: d91e7a0565
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2332204

Change-Id: If1a8b237f58bcbb1c07a27b054be09a7530922f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 18:30:54 +00:00
Jack Yu
0797feaf7b Add a new NFC developer setting option for NFC vendor verbose log am: 8f1794043c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2332203

Change-Id: Ic9c47d49121184737369e041048a678dda53bf52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 18:30:50 +00:00
Jack Yu
81f481fac4 Add a new NFC developer setting option for NFCSNOOP am: a2f8944942
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2332202

Change-Id: Ic96878e632ec919f2486263a5cb479486b9d4c54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 18:30:37 +00:00
Tiger
f9616e0e5a Add an developer option to enable config_navBarDefaultTransparent
This enables the user to make navigation bar color transparent by
default. It will only affect apps which don't specify the navigation
bar color.

Fix: 232195501
Test: atest TransparentNavigationBarPreferenceControllerTest
Change-Id: I91581558b92abeaa3501b9749f1a1ab43db8e771
2023-02-22 14:44:16 +08:00
Jack Yu
d91e7a0565 Show reboot dialog when users disable developer options
When NFC detailed logging mechanisms are enabled and users try to
disable develoepr options, show reboot request dialog to make sure
NFC logging mechanisms are also disabled.

Bug: 204397062
Test: manual
Merged-In: I531c85fd77934ad7821c480df07465a8cd8f24f9
Change-Id: I531c85fd77934ad7821c480df07465a8cd8f24f9
(cherry picked from commit d270f29cc8)
2023-02-17 17:29:15 +00:00
Jack Yu
8f1794043c Add a new NFC developer setting option for NFC vendor verbose log
Add a new developer setting option to enable vendor verbose log.

Bug: 204397062
Test: manual
Merged-In: Ic837bbcc32979c44732e99d51e4dcf93eb201cf1
Change-Id: Ic837bbcc32979c44732e99d51e4dcf93eb201cf1
(cherry picked from commit 3d2aff896e)
2023-02-17 17:28:36 +00:00
Jack Yu
a2f8944942 Add a new NFC developer setting option for NFCSNOOP
Add a new developer setting option to enable full NFCSNOOP log.

Bug: 204397062
Test: manual
Merged-In: I3fd34500e5e7093c9d77ff737987a35f6866814e
Change-Id: I3fd34500e5e7093c9d77ff737987a35f6866814e
(cherry picked from commit b71de640b5)
2023-02-17 17:27:38 +00:00
TreeHugger Robot
834dda9105 Merge "Add persistent MTE toggle to development options." 2023-02-14 02:40:01 +00:00
Jakub Rotkiewicz
bd2f353f8b Merge "SnoopLogger: Debug enhancements added settings" am: cfde422f91
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2362495

Change-Id: I3c138106ebdaaf6b5597c6a79054915a04098117
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-13 13:35:37 +00:00
Jakub Rotkiewicz
5a1b8a11a6 SnoopLogger: Debug enhancements added settings
Bug: 247859568
Tag: #feature
Test: make RunSettingsRoboTests3
Test: make RunSettingsRoboTests4

Change-Id: I132a1558ea67400d9c10dda523456f99eb815b92
Merged-In: I132a1558ea67400d9c10dda523456f99eb815b92
2023-02-13 11:35:55 +00:00
Jakub Rotkiewicz
934b0bb739 SnoopLogger: Debug enhancements added settings
Bug: 247859568
Tag: #feature
Test: make RunSettingsRoboTests3
Test: make RunSettingsRoboTests4

Change-Id: I132a1558ea67400d9c10dda523456f99eb815b92
2023-02-10 09:59:52 +00:00
Florian Mayer
5b93b73df1 Add persistent MTE toggle to development options.
Bug: 245624194
Change-Id: I83283eb74360ec0eccd6b236b42eb987a580ec2c
2023-02-09 13:26:27 -08:00
Patty Huang
c55cddc422 Add LE Audio allow list feature switcher in the developer option menu
Add a switcher to enable/disable LE audio allow list feature. The switcher
could be enabled by setprop ro.bluetooth.leaudio_allow_list.supported=true

Bug: 239768625
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioAllowListPreferenceControllerTest
Change-Id: I290da870d952abd20bc25db7924fcc53ac39f880
2023-02-08 13:32:58 +08:00
Jing Ji
249283ffa0 Add a developer option to disable app child process restrictions
Bug: 205156966
Test: atest PhantomProcessPreferenceControllerTest
Change-Id: I87fd78b3dc7dea069823de6bef0bd7fe20d985ad
2022-11-22 22:22:47 -08:00
Stanley Wang
c0458b8a15 Send pre-index intent when developer options changed
Bug: 244521263
Test: manually test and review UI
Change-Id: I410dcc8ac8a9e131357a3e186e17b0d6363ad247
(cherry picked from commit 0b72d620a3)
2022-10-28 07:34:44 +00:00
Stanley Wang
0b72d620a3 Send pre-index intent when developer options changed
Bug: 244521263
Test: manually test and review UI
Change-Id: I410dcc8ac8a9e131357a3e186e17b0d6363ad247
2022-09-08 17:00:24 +08:00
Jack Yu
d270f29cc8 Show reboot dialog when users disable developer options
When NFC detailed logging mechanisms are enabled and users try to
disable develoepr options, show reboot request dialog to make sure
NFC logging mechanisms are also disabled.

Bug: 204397062
Test: manual
Change-Id: I531c85fd77934ad7821c480df07465a8cd8f24f9
2022-08-22 08:47:26 +00:00
Jack Yu
3d2aff896e Add a new NFC developer setting option for NFC vendor verbose log
Add a new developer setting option to enable vendor verbose log.

Bug: 204397062
Test: manual
Change-Id: Ic837bbcc32979c44732e99d51e4dcf93eb201cf1
2022-08-22 08:46:59 +00:00
Jack Yu
b71de640b5 Add a new NFC developer setting option for NFCSNOOP
Add a new developer setting option to enable full NFCSNOOP log.

Bug: 204397062
Test: manual
Change-Id: I3fd34500e5e7093c9d77ff737987a35f6866814e
2022-08-22 08:42:20 +00: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
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
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
Vadim Caen
d268b11e85 Add Settings for back animation developer option DO NOT MERGE
Bug: 228936326
Test: BackAnimationPreferenceController
Change-Id: I48516c1f68de799473eac99d35a086046d7e6de9
2022-05-02 18:07:27 +00:00
Gary Jian
e1356cdb64 Merge "Add a developer option to controll mockmodemservice permission" am: 78b2b241a9 am: 41ec2bc89b am: 24888461da
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2026223

Change-Id: I12e5aa6274b2db7f70a231d8b6512f40d32ff8a9
2022-03-23 06:56:17 +00:00
Gary Jian
78b2b241a9 Merge "Add a developer option to controll mockmodemservice permission" 2022-03-23 05:46:22 +00:00
Gary Jian
5a535e6674 Add a developer option to controll mockmodemservice permission
Bug: 220995034
Test: 1.enable/disable from developer option and check the property value
      2.atest MockModemPreferenceControllerTest

Change-Id: Iaa1a29f4214e1208fe4de497ff4b05c47c34b266
2022-03-22 12:02:52 +08:00
Treehugger Robot
3c209b06c0 Merge "Add LE audio hardware offload development option" 2022-03-21 05:24:10 +00:00
Eric Biggers
6a8f883aee Merge "Remove support for converting from FDE to FBE" am: 804dc16a03 am: 629db5f9f8 am: c749aa3ed1
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2026904

Change-Id: I919c43559218b13c0f6188e04f104f3051a28731
2022-03-16 19:33:25 +00:00