Commit Graph

376 Commits

Author SHA1 Message Date
Manjeet Rulhania
09552b3caa Merge "mark developer settings page as sensitive" into main 2024-05-14 16:35:21 +00:00
Pawan Wagh
3e4a37adbb Merge "UI and error message fixes for 16k developer option" into main am: e550896658 am: 588dbe4b31
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3079811

Change-Id: Ie63bca803a77b8f3468e68050898934cc8b9e1b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-11 03:50:47 +00:00
mrulhania
532be5f4e9 mark developer settings page as sensitive
Marking the view as sensitive will black out the
screen during screen share. This will help prevent
scammers using remote viewing apps disable the
screen share protection option.

Fix: 332918161
Test: manual verification of black screen during screen share
Change-Id: Icaf0aacab5dc71a49c48f561f021af8b4e2d5211
2024-05-10 18:47:42 -07:00
Pawan Wagh
f815608a71 UI and error message fixes for 16k developer option
- Disallow disabling option when hardware offload
values aren't default ones. This was bypassing warning dialogue
- For ext4 format dialog, add a delete icon and change confirmation text
- Change error message when update is pending.
- Add padding to progress dialog

Test: m Settings && adb install -r $ANDROID_PRODUCT_OUT/system_ext/priv-app/Settings/Settings.apk
Bug: 295035851
Bug: 338139884
Change-Id: Ib1c3ac075a75a8515fe725103b062983ecf11fba
2024-05-08 20:49:12 +00:00
Treehugger Robot
f671734c1b Merge "Disallow turning off developer options in page-agnostic mode" into main am: 0d124654ca am: 74da70de2d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3073278

Change-Id: I985bf4d4f78e2d17915d330430eae5818e7fb44b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 07:03:35 +00:00
Pawan Wagh
e4b9c69442 Disallow turning off developer options in page-agnostic mode
When device is in page-agnostic mode, it would be OEM unlocked and
filesystem will be different than production. Don't allow to turn
off developer options in that state.

Bug: 329657279
Bug: 295035851
Test: m Settings && adb install -r $ANDROID_PRODUCT_OUT/system_ext/priv-app/Settings/Settings.apk
Change-Id: I9b8a9dbaf8192bb3758c53501450eb45e2fe8d9c
2024-05-07 05:30:23 +00:00
Tim Murray
431e86009e JobScheduler: remove TARE
Test: atest
Bug: 331617295

Change-Id: Ib5f363d6bbd5e1c9f817cc1987c1711c8135f70b
2024-03-27 10:23:16 -07:00
Edgar Wang
1a683a1007 Merge "Listen Developer option enable state" into main 2024-03-22 01:13:17 +00:00
Jakub Rotkiewicz
de27acef86 Refactor Bluetooth Codec settings to dynamic ListPreference
Fetch supported codecs from native and present to user using
ListPreference.

Bug: 305779598
Bug: 311451118
Bug: 323319530
Tag: #feature
Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.AbstractBluetoothListPreferenceController
Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.BluetoothCodecListPreferenceControllerTest

Merged-In: Iedbfd01c0d1b59df8a073f4e9aedca3913e6d45f
Change-Id: I90ed0d83c3250c64789e27707b0b7bff30043335
2024-03-21 11:06:18 +00:00
Edgar Wang
26a5c73dc7 Listen Developer option enable state
- When developer option disabled, any page in Developer option
  should be closed.

Bug: 293894425
Test: manual

Change-Id: I392b122e885118770be1af2b51c0c7ef92279e1b
2024-03-21 04:08:08 +00:00
Jakub Rotkiewicz
89612e53d7 Refactor Bluetooth Codec settings to dynamic ListPreference
Fetch supported codecs from native and present to user using
ListPreference.

Bug: 305779598
Bug: 311451118
Bug: 323319530
Tag: #feature
Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.AbstractBluetoothListPreferenceController
Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.BluetoothCodecListPreferenceControllerTest

Change-Id: Iedbfd01c0d1b59df8a073f4e9aedca3913e6d45f
2024-03-14 11:00:35 +00:00
Aditi Katragadda
5c98e0fbcc Enable Bluetooth stack logging from Developer Options UI Element
The goal is to be able to enable different log levels for Bluetooth
stack logging from Developer Options in Settings. This is done by
creating a Bluetooth property which houses the current state of the log
level, adding the required UI elements and linking the two together.

Tag: #feature
Bug: 307330446
Test: atest BluetoothStackLogPreferenceControllerTest
Change-Id: I8665b17622218743aa00250118b718d5cabdb9fc
2024-03-07 23:59:10 -08:00
Roshan Pius
a5bd1cf34f settings(dev): Remove NFC stack logging control
We are now turning on verbose logging by default.

Bug: 327517842
Test: Compiles
Change-Id: I3c6026e230c7d35f04d9771442fadbf040a84b94
2024-02-29 09:44:37 -08:00
Richard MacGregor
dc15244a5d Add developer option for screenshare protections
Add developer option that allows disabling screenshare protections to
allow for better bug reports and debugging.

Bug: 320757744
Bug: 316955558
Bug: 316954829
Flag: ACONFIG com.android.server.notification.sensitive_notification_app_protection DISABLED
Flag: ACONFIG com.android.server.notification.screenshare_notification_hiding DISABLED
Test: atest SensitiveContentProtectionPreferenceControllerTest
Change-Id: Ibcb9f886aa599fe2442e755653c49f44cfa1830f
2024-02-02 19:33:35 -08:00
Xin Li
6b4b7336bc Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: If21ca5e914a5ee5aff3fbeeee9595bb77a8fc3d0
Change-Id: I87182e72d0ceb75499528f9011d009d772045e09
2024-01-30 09:24:25 -08:00
Alice Kuo
37e1fef9d4 Change the switcher to switch LE audio mode with broadcast
Change the previous toggle design to list option for broadcast feature.
The new toggle change is only applied as broadcast feature enabled whcih
is behind a feature flag.

Bug: 273153850
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothLeAudioPreferenceControllerTest
Change-Id: Ic2ea10d9d9529a2d413525c1b660f8fbac371502
2024-01-26 20:22:45 +08:00
Pawan Wagh
7e2249a7dd Developer option for booting with 16K pages am: 8996ca9768 am: acd2de2533 am: 8e5eff37a9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2705817

Change-Id: Icaca8a91a01be73cdda9d61e2a2fbb6c82534a47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-12 21:33:41 +00:00
Pawan Wagh
8996ca9768 Developer option for booting with 16K pages
Adding developer option to boot with 16K compatible kernel. Adding
resources, layouts and dialog classes for 16k option. This needs
to integrated with update engine to make OTA switch happen.

Test: m Settings && adb install -r $ANDROID_PRODUCT_OUT/system_ext/priv-app/Settings/Settings.apk
Bug: 295035851
Bug: 294614538
Change-Id: I3a24fed059eee99407e3486a7254285e0e4a251c
2024-01-12 16:51:16 +00:00
Nikhil Kumar
1a115d3ea0 Toast warning message when non-admin user tries to open dev options.
Developer Settings are only accessible for the Admin users. Added a new toast warning message to be displayed when a non-admin user tries to open the Developer options.

Bug: 259941142
Test: Manually verfied by tapping on the USB debugging option from a Secondary user.
Change-Id: Ibd1b8e19d9130982982ee13ac98cbc1d8f5b8835
2024-01-11 16:27:07 +00:00
Andy Yu
fd6e4f8a9a Merge "Add Settings switch to disable Game default frame rate" into main 2023-12-20 21:59:42 +00:00
Andy Yu
e6e57cffbd Add Settings switch to disable Game default frame rate
This patch adds a new toggle under Developer settings. It defaults
to off, meaning game default frame rate is not disabled. Users
can choose to togge it on to disable game default frame rate.

When a user toggles this switch, it calls to GameManagerService
to update the frame rate of games that are currently in the
foreground and coming games.

screenshots:
https://screenshot.googleplex.com/8jTWyNBhJm7zC4x
https://screenshot.googleplex.com/5junmXtuHnRxyL2

Bug: 286084594
Bug: 306266471
Test: m; flash
Test: atest
SettingsRoboTests:GameDefaultFrameRatePReferenceControllerTest
Change-Id: Ide843f61e57e244d6e1fc30f93b2358b2bcb655b
2023-12-15 13:20:17 -08:00
Johannes Gallmann
bc669dc879 Readd predictive back developer setting
Bug: 315859328
Test: atest BackAnimationPreferenceControllerTest
Test: Verifying that predictive back developer setting is present
Change-Id: I8734a4cb135fbeb0d1787ca2acf569948c08c9ed
2023-12-12 12:42:28 +00:00
David Liu
13c63260a3 fixed NPE while initializing controllers by commenting out the failure
one for temporal fix

Added @Nullable in parameters of buildPreferenceControllers() to prevent using nullable parameter to functions requires non-nullable.

Bug: 315330037
Test: see developer options preferences show/hide based on the
controllers isAvailable()

Change-Id: If42faea900a2220d9b1f5e38e1befbd5a555e78a
2023-12-12 00:16:32 +00:00
Chaohui Wang
ee7139a889 Remove injecting developer options into Settings itself
- It can improve performance because we use less injected item
- Also use RestrictedPreference instead just checking restrictions,
  so we follow policy transparency.

Note: Renamed DevelopmentSettingsDashboardActivity to
DevelopmentSettingsActivity,
because DevelopmentSettingsDashboardActivity could in disabled state
even after Settings upgrades, use a new name to prevent this issue.

Bug: 311604902
Test: manual - turn on / off Developer Options
Test: unit test
Change-Id: I17be117ae59e59410687e6d08fd5edd034d0508f
2023-11-27 05:12:13 +00:00
Chaohui Wang
08a1c9876e Revert^2 "Migrate to CompoundButton.OnCheckedChangeListener"
8979681a8d

Change-Id: I60edd3aabf49afbe4aa016af780baa68d928bddf
2023-11-07 14:17:15 +00:00
Sebastian Pickl
8979681a8d Revert "Migrate to CompoundButton.OnCheckedChangeListener"
Revert submission 25147565-onSwitchChanged-CompoundButton

Reason for revert: breaking builds 

Bug:309601476

Reverted changes: /q/submissionid:25147565-onSwitchChanged-CompoundButton

Change-Id: Ie746db87d9c642599593aa3d5e5baf6b7ba89c0e
2023-11-07 13:26:36 +00:00
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