Commit Graph

18949 Commits

Author SHA1 Message Date
Treehugger Robot
24666c9737 Merge "Add developer option switch to set ANGLE as the default system driver" into udc-dev 2023-04-29 03:21:56 +00:00
Treehugger Robot
01c585ed27 Merge "Fixes broken Settings test." into udc-dev 2023-04-28 22:37:57 +00: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
Austin Delgado
9b94905c63 Merge "Hide enrollment options that don't match requested biometric strength" into udc-dev 2023-04-28 17:42:46 +00:00
TreeHugger Robot
6e524f6244 Merge "SettingsRoboTests: fix device state rotation related tests" into udc-dev 2023-04-28 17:01:39 +00:00
Edgar Wang
089e76c429 Fix test case failed in SystemControlsFragmentTest
Fixes: 280071271
Test: local robotest
Change-Id: I96867e9718b4a30289fdcd3fcd9dc70ed8c227b0
2023-04-29 00:42:45 +08:00
Ale Nijamkin
12e05b8c59 Fixes broken Settings test.
In ag/22187500, we added the requirement for a wallpaper picker app to be installed in order to treat the lock screen shortcuts feature as enabled (in addition to the feature flag). That broke this test.

To fix, we're adding a mocked result to the PackageManager to pretend like the wallpaper picker application is installed.

Change-Id: I8654375e3fa33df0984c48fcf91dd8f6c18e984f
Fix: 280017187
Test: the test is back to passing.
2023-04-28 16:22:59 +00:00
Christian Göllner
b613cc4a17 SettingsRoboTests: fix device state rotation related tests
Fixes: 280015539
Test: atest SettingsRoboTests
Change-Id: I0a3cc713f8df0477a172665a60551b456691b17c
2023-04-28 15:26:32 +02:00
Edgar Wang
f411b62425 Fix PrivateDnsPreferenceControllerTest test case failed
- getAvailibilityStatus_availableByDefault()

Fixes: 280048011
Test: locoal robotest
Change-Id: I490dc3348af241a76767885b52238d0b87880532
2023-04-28 21:04:59 +08:00
Chaohui Wang
fec25d4bad Merge "Fix ImeiInfoPreferenceControllerTest" into udc-dev 2023-04-28 11:52:50 +00:00
Treehugger Robot
060a56468d Merge "Revert "Back up the smooth display setting"" into udc-dev 2023-04-28 09:58:16 +00:00
Chaohui Wang
8470122ad1 Fix ImeiInfoPreferenceControllerTest
For test case updatePreference_simSlotWithoutSim_notSetEnabled,
mSecondSimPreference is a mock, instead of check the default value of
isEnabled(), verify it's setEnabled() not called.

Fix: 279880808
Test: RobolectricTest
Change-Id: I72064820754e053def46bdbf10317189c7ac608f
2023-04-28 15:53:44 +08:00
Edgar Wang
8155b72cf8 Merge "Fix test cases failed in WinscopeTraceTest" into udc-dev 2023-04-28 05:28:14 +00:00
Tom Hsu
bd9263b391 Merge "[Settings] UI part: Add metrics for language" into udc-dev 2023-04-28 02:49:59 +00:00
TreeHugger Robot
32602794ed Merge "Fixed speed selection lost when changing password in Wi-Fi hotspot settings" into udc-dev 2023-04-27 18:55:20 +00:00
Becca Hughes
c74ccee659 Merge "DO NOT MERGE Hide provider from this list if autofill provider" into udc-dev 2023-04-27 16:35:18 +00:00
Piotr Wilczyński
eef23f441c Revert "Back up the smooth display setting"
Revert submission 22741921-cherrypick-bug-211737588-lp9s6r5vn3

Reason for revert: b/279215664

Reverted changes: /q/submissionid:22741921-cherrypick-bug-211737588-lp9s6r5vn3

Change-Id: I9b50aa0e2c5a7d328c4aa70b049c37c81e49e89b
Merged-In: I9b50aa0e2c5a7d328c4aa70b049c37c81e49e89b
2023-04-27 16:13:03 +00:00
Zoey Chen
cfaa13442c [Settings] UI part: Add metrics for language
Bug: 279915462
Test: atest
Change-Id: Ie13c57b2b398beb48dfe0ac289ec336483575445
2023-04-27 15:55:45 +00:00
Edgar Wang
4cf60b02b2 Fix test cases failed in WinscopeTraceTest
Fixes: 276682211
Test: autotest
Change-Id: Id31d5c4e2e1dd61c4af24e042f4aaddee3d33439
2023-04-27 10:22:29 +00:00
Edgar Wang
e0049f0ae8 Merge "Remove restricted icon in SettingsMainSwitchBar" into udc-dev 2023-04-27 08:27:42 +00:00
Weng Su
8c50edd1e7 Fixed speed selection lost when changing password in Wi-Fi hotspot settings
- Use current SoftApConfiguration to build new SoftApConfiguration to keep unchanged properties

Bug: 279717060
Test: manual test
atest -c WifiTetherSettingsTest

Change-Id: I3ee7960b13b339445cc79c3d440f5c56c78c015f
2023-04-27 14:55:52 +08:00
Grace Cheng
54d1cfdae0 Fix flicker of “touch to unlock anytime” toggle
Fixes flicker of toggle by setting not visible when launching confirm
pin/pattern/password or enrollment prior to displaying
FingerprintSettings. Also cleans up FingerprintSettings and
security_settings_fingerprint.xml to better separate SFPS and non-SFPS
logic and rename methods for clarity

Test: (manual) navigate to sfps fp settings and observe toggle doesn’t flicker
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FingerprintSettingsRequireScreenOnToAuthPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FingerprintSettingsUnlockCategoryControllerTest
Fixes: 263843645
Change-Id: Ide3a666fc31b926ac14645dc22d090f77d81f901
2023-04-27 00:29:09 +00:00
Becca Hughes
99f1d5448d DO NOT MERGE Hide provider from this list if autofill provider
Since we are merging the two lists we should
hide the provider from this list to avoid
duplicates.

Test: local & unit
Bug: 279205251
Change-Id: I70ec4a4bda13bdcd5fd8f82f6ba6045e94d5daa9
2023-04-26 21:23:30 +00:00
Edgar Wang
cd74f76a43 Remove restricted icon in SettingsMainSwitchBar
- display disable status directly
- click disabled MainSwitchBar will show devicepolicy dialog
- make sure BT and location use MainSwitchBar correctly

Bug: 260406688
Test: manual
Change-Id: I8bb57213eec6dd5e991af580e1a06ebf8a867c28
2023-04-26 14:06:22 +08:00
Treehugger Robot
9cdf565458 Merge "Restart Wi-Fi tethering automatically if configuration change" into udc-dev 2023-04-26 03:59:47 +00:00
Matías Hernández
c49cb1014c Merge "Tweak refresh of notification channel group preferences" into udc-dev 2023-04-25 14:00:14 +00:00
SongFerngWang
c054498357 Replace the SlicePreference with Preference am: 794fc58235
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22755956

Change-Id: I5e9032624347b27acb02eafd28002744d92b5f2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-25 06:23:25 +00:00
Treehugger Robot
ea3a970826 Merge "Fix b/279120121: Unplug 100% Pixel phone won't reset the battery usage data when the phone is just started." into udc-dev 2023-04-25 03:59:03 +00:00
Zaiyue Xue
f3a3634aa5 Merge "Replace Screen system component time with device screen on time" into udc-dev 2023-04-25 03:32:02 +00:00
Zaiyue Xue
cfa374f997 Merge "Combine screen on time map into battery usage map" into udc-dev 2023-04-25 03:31:39 +00:00
Zoey Chen
c31cf3d3b4 Merge " [Settings] UI part: Add metrics for numbers preferences" into udc-dev 2023-04-25 03:00:20 +00:00
Zoey Chen
1d74998647 Merge changes from topic "regional_preference_metrics" into udc-dev
* changes:
  [Regional Pref] Remove Calendar controller and related Fragement
  [Regional Pref] 1. Add metrics for user changes the First day of week 2. Refactor to Settings design
  [Regional Pref] 1. Add metrics for user changes the Temperature unit 2. Refactor to Settings design
2023-04-25 02:59:27 +00:00
Zoey Chen
10fa1b8aec [Regional Pref] Remove Calendar controller and related Fragement
Bug: 275003276
Bug: 264483854
Change-Id: I2431ea55a7a69db8a4f661a125a6ca218ce41a94
2023-04-24 10:27:10 +00:00
Zoey Chen
4aa05e58bb [Regional Pref] 1. Add metrics for user changes the First day of week 2.
Refactor to Settings design

Bug: 275003276
Bug: 264483854
Change-Id: Ibea987b6e51fd76c89a0ff5269da6e99171f6b1c
2023-04-24 10:26:52 +00:00
Zoey Chen
5d2ce38d3a [Regional Pref] 1. Add metrics for user changes the Temperature unit 2.
Refactor to Settings design

Bug: 275003276
Bug: 264483854
Change-Id: Ib886ace45db8cfd7dd0f468d03a0aa0551f1f5c4
2023-04-24 10:25:44 +00:00
Zoey Chen
af05cf7e0e [Settings] UI part: Add metrics for numbers preferences
Bug: 275003276
Test: local test
Change-Id: I2455252f3ed7f5355a363a79076113bd4452732d
2023-04-24 10:22:03 +00:00
Matías Hernández
8c40305ad6 Tweak refresh of notification channel group preferences
Previously, we were discarding and re-adding all channel preference switches when a group was toggled. This caused the group switch itself to flicker and sometimes lose the a11y focus as well. Because the group toggle is always at the top, it's not necessary to ever re-sort it (which is the main reason for doing the remove+add dance).

This CL also resurrects ChannelListPreferenceControllerTest which was disabled.

Fixes: 248056830
Test: atest ChannelListPreferenceControllerTest

Change-Id: I5672c102d4571430e26ad6bee92d8c88794214ae
2023-04-24 11:39:59 +02:00
Zaiyue Xue
1237a70c96 Replace Screen system component time with device screen on time
Bug: 278022529
Fix: 278022529
Test: manual
Change-Id: I95a107ea5c3c5e15893c0846c8fd83757e7b9358
2023-04-24 14:10:51 +08:00
Zaiyue Xue
d92c4fc823 Combine screen on time map into battery usage map
This cl is refactor only. It makes next cl ag/22809776 easy to replace screen
compenent time with screen on time.

Bug: 278022529
Test: manual
Change-Id: I2538aeafb0c697f13ec617cea44a70a1b2a114b0
2023-04-24 14:08:13 +08:00
Chaohui Wang
8397287f87 Fix flicker for Data Usage page
Both "Mobile data usage" & "Non-carrier data usage".

By,
1. Use summary placeholder for usage amount to avoid shift
2. Before fix CycleListener's onItemSelected() is called multiple times,
   cause the app list to flash, let DataUsageList to handle the dedup
   logic to better handling.
3. Before fix if return from App Usage page, no loading view is
   displayed (only first enter has it), move this to onResume() to fix.
4. Before fix the cycles passed to App Usage page is cached (even when
   the cycles are changed), clear the cache when onResume() to fix.
5. Listener in SpinnerPreference could be null, add safety guard to it.

Cherry-pick from Change-Id: I95e544c46333496f4f30ed77dafa4779b4d66019

Fix: 277162513
Test: manual visual test
Test: Unit test
Change-Id: I50fb79aa3c888651a79fd1d030da554bebb6a660
2023-04-22 08:47:22 +08:00
Chaohui Wang
f46b33bbc4 Revert "[DataUsage] Adjusting the control of display sequence"
This reverts commit b8491032d7.

Bug: 277162513
Test: Manual
Test: Unit test
Change-Id: I5a84a9b1a99b1da4c18d786a6dff062b53cd46c6
2023-04-22 08:47:21 +08:00
SongFerngWang
794fc58235 Replace the SlicePreference with Preference
The Settings' 2 panel did not support SlicePreference, since it
always open activity with NEW_TASK and it casues the settings can't
set new page at right side.

Bug: 270544054
Test: build pass. local test: the phone pair the buds with fastpair, and
then check the slice preferences.
atest BlockingPrefWithSliceControllerTest (pass)

Change-Id: I0e8abfd284492f04ab322a5bed13741fc6b25b34
2023-04-21 23:08:06 +08:00
Philip Junker
134bea1957 Merge "List apps which requested the TURN_SCREEN_ON appOp permission" into udc-dev 2023-04-21 10:07:47 +00:00
Piotr Wilczyński
85d5e3efb8 Merge "Back up the smooth display setting" into udc-dev 2023-04-21 07:31:47 +00:00
Zaiyue Xue
aea4d365a6 Fix b/279120121: Unplug 100% Pixel phone won't reset the battery usage data when the phone is just started.
Bug: 279120121
Fix: 279120121
Test: manual
Change-Id: Ie793266f8453a2902d7e16e5c58443a3c7bf55ef
2023-04-21 14:43:10 +08:00
Treehugger Robot
0c1838807d Merge "Fix BatteryChartPreferenceControllerTest Fail" into udc-dev 2023-04-21 05:57:43 +00:00
Weng Su
bf0e8c1dc7 Restart Wi-Fi tethering automatically if configuration change
- When the Wi-Fi Hotspot is already started, if the user changes the configuration, the Wi-Fi Hotspot will be restarted automatically.

- When the Wi-Fi hotspot restarts, display a circle on the screen to indicate that it is processing.

Bug: 245258763
Test: manual test
atest -c WifiTetherSettingsTest \
         WifiHotspotSpeedSettingsTest
atest -c WifiHotspotRepositoryTest \
         WifiHotspotSecuritySettingsTest \
         WifiHotspotSecurityViewModelTest \
         WifiHotspotSpeedViewModelTest \
         WifiTetherViewModelTest

Change-Id: I6fdd5892916703095f28d0589ebc3b7dd59fcd61
2023-04-21 13:06:44 +08:00
Zaiyue Xue
74d8a4b745 Fix BatteryChartPreferenceControllerTest Fail
Bug: 279107937
Fix: 279107937
Test: presubmit
Change-Id: Ie5597361e4c3c90737b8dcfc302fc3aad94ea476
2023-04-21 11:12:14 +08:00
Austin Delgado
0ea56b4fec Hide enrollment options that don't match requested biometric strength
When calling biometric enroll intent with biometric_strong, don't include
weak enrollments as options.

Bug: 265898482
Test: Tested manually by calling enrollment and verifying correct
options are shown
Test: atest BiometricEnrollActivityTest

Change-Id: I5fa650a593aee536955ae806f5963ffbdc135a2e
2023-04-20 11:20:37 -07:00
Piotr Wilczyński
5c42659602 Back up the smooth display setting
- Convert "Smooth display" and "Force peak refresh rate" to a boolean. If they are a boolean, they can be backed up without being device-specific.
- Back up "Smooth display" and add a validator
- Upgrade the settings in SettingsProvider
- Create a utils class - RefreshRateSettingsUtils

Bug: 211737588
Test: atest DisplayModeDirectorTest
Test: atest ForcePeakRefreshRatePreferenceControllerTest
Test: atest PeakRefreshRatePreferenceControllerTest
Test: atest SettingsBackupTest
Test: atest SettingsProviderTest
Change-Id: Ib2cb2dd100f06f5452083b7606109a486e795a0e
Merged-In: Ib2cb2dd100f06f5452083b7606109a486e795a0e
2023-04-20 13:25:38 +00:00