Commit Graph

2854 Commits

Author SHA1 Message Date
Chun Zhang
f7a128496c Add WearSafetySource (Without Listener)
Bug: 389841524
Test: TreeHugger
Test: manual
Test: atest SafetySourceBroadcastReceiverTest
Test: atest LockScreenSafetySourceTest
Test: atest ActiveUnlockStatusUtilsTest
Test: atest WearSafetySourceTest
Flag: com.android.settings.flags.biometrics_onboarding_education
Change-Id: I7f4b41bf33d1e0fb7988f756a466e4d80bcec25e
2025-03-05 17:31:26 +00:00
Menghan Li
86fa16ba52 Merge changes from topics "A11yFeedback1P", "A11yFeedbackTopLevelPage", "AccessibilityPageIdFeatureProvider" into main
* changes:
  refactor(A11yFeedback): Rename AccessibilityMetricsFeatureProvider
  feat(A11yFeedback): Add feedback entry for downloaded Accessibility
  chore(A11yFeedback): Removing Legacy Android M Menu Behavior
  feat(A11yFeedback): Implements page ID to feedback bucket ID mapping
2025-03-05 00:06:01 -08:00
Menghan Li
b511fe690b refactor(A11yFeedback): Rename AccessibilityMetricsFeatureProvider
The AccessibilityMetricsFeatureProvider currently provides page IDs
derived from component names, primarily for metrics purposes.
However, its functionality should be expanded to also support
feedback needs, not just metrics collection, by returning
appropriate settings enum values.

Bug: 393980229
Test: atest AccessibilityMetricsFeatureProviderGoogleImplTest
Flag: com.android.server.accessibility.enable_low_vision_generic_feedback
Change-Id: I2d64db866010ae5e3c6a9738f92860df3d0b86aa
2025-03-05 05:25:05 +00:00
Treehugger Robot
26023eb72f Merge "Use Fake context and settings provider to prevent test flakiness" into main 2025-03-03 15:06:43 -08:00
Jan Tomljanovic
6fd9cd771b Merge "Always set source status, even when null." into main 2025-03-03 14:57:37 -08:00
Matthew DeVore
0a583b223e Connected displays: use Robolectric for tests
Use Robolectric for tests so that we don't have to deploy to a device
emulator. TestHandler is not available in Robolectric tests, so this CL
includes a substitute.

Flag: com.android.settings.flags.display_topology_pane_in_display_list
Test: atest <all moved tests>
Bug: b/399743032
Change-Id: I95721d9b90376374da7011e42c70e474b494e992
2025-03-03 10:37:48 -06:00
Matthew DeVore
ded1d1c0d6 CD settings: minimal DisplayDevice metadata class
This saves tests from interacting with DisplayManager completely,
simplifies the Injector API, and makes mocking that API easier. This
addresses the first difficulty I had in converting our tests to
Robolectric.

Bug: b/399743032
Flag: com.android.settings.flags.display_topology_pane_in_display_list
Test: verify disabled and enabled displays appear correctly in display list fragment
Test: atest ExternalDisplayPreferenceFragmentTest.java
Test: atest ExternalDisplayUpdaterTest.java
Test: atest ResolutionPreferenceFragmentTest.java
Change-Id: Id43d2f108f3e85e6596eb2271b1de6b1afd2338f
2025-03-03 10:37:48 -06:00
Chun-Ku Lin
877f2a6d35 Use Fake context and settings provider to prevent test flakiness
**Root cause**
The ReduceBrightColorsIntensityPreferenceControllerTest would modify the
settings during test. However, since this is a unit test, it shouldn't
trigger modifying the brightness on the attached test device. Otherwise,
the test would be unstable depends on how stable the device is, which
should be tested by the integration test.

Bug: 397762527
Test: abtd
Flag: EXEMPT test only
Change-Id: I0c0d7327d4356482295121c11c3a1e5ed814ffec
2025-02-28 23:59:34 +00:00
Matthew DeVore
02fff0174f Show options greyed out inactive display
Test: ExternalDisplayPreferenceFragmentTest
Flag: com.android.settings.flags.display_topology_pane_in_display_list
Bug: b/398846256
Change-Id: I6020212843c10867447809910a0202b7dbacd909
2025-02-27 09:43:04 -06:00
Matthew DeVore
29132988b2 Merge "Show expanded display settings in list fragment" into main 2025-02-27 07:22:05 -08:00
Matthew DeVore
f87293fc5d Show expanded display settings in list fragment
Stop distinguishing between the display list and per-display fragments.
Instead, always show all displays that are available. This is closer to
how the UI will eventually look, which is each display in a tab.

Setting an OnChangeListener for multiple preferences with the same key
did not work, even though the conflicting preferences had different
parent preferences. Only the listener of the top-most preference was
notified even when changing a different one. So this CL changes
PrefBasics so that it can set unique keys for otherwise identical
preferences.

Flag: com.android.settings.flags.display_topology_pane_in_display_list
Bug: b/352648432
Test: ExternalDisplayPreferenceFragmentTest
Test: set rotation of two overlay displays to different non-default values
Change-Id: Idabef1e03afd496bfc955927a2894f14f999a105
2025-02-26 13:38:57 -06:00
Matthew DeVore
6a4ac9cdbf CD updater: add missing call in tests
ag/31885242 changed the behavior for registerCallback such that it no
longer automatically scheduled an update. This CL adds the missing call
in tests.

Flag: com.android.settings.flags.display_topology_pane_in_display_list
Test: atest ExternalDisplayUpdaterTest.java
Test: atest ConnectedDeviceGroupControllerTest.java
Bug: b/399273324
Change-Id: If030e7cc98289fe3062c1a638580ec6c6479d97a
2025-02-26 19:23:57 +00:00
Treehugger Robot
dc8db1bd63 Merge "Add metrics for biometric onboarding & education" into main 2025-02-26 03:25:41 -08:00
Zoey Chen
3fd943e8b3 [Settings] Add test case for new LocalePicker page - supported language
Bug: 396285228
Test: atest
Test: atest SettingsRoboTests:com.android.settings.localepicker.SystemLocaleAllListPreferenceControllerTest
Test: atest SettingsUnitTests:com.android.settings.localepicker.SystemLocaleAllListPreferenceControllerTest
Flag: EXEMPT refactor
Change-Id: I7ac4052df14a2657810c48199ac8c72e5dfc85a4
2025-02-26 06:39:55 +00:00
Garvita Jain
06ba5d4d13 Merge "[L10n fix] Use whitespace regex for splitting string by delimiter." into main 2025-02-25 17:16:51 -08:00
Vadym Omelnytskyi
26d0f62bc3 Merge changes from topic "shadow-color-mode-manager-extend" into main
* changes:
  Display: make Colors settings entry preference reactive
  Display: refactor Color Mode settings
2025-02-25 03:07:55 -08:00
Garvita Jain
08e18d6241 [L10n fix] Use whitespace regex for splitting string by delimiter.
BUG: 387197875
Test: manual, logging
Flag: EXEMPT bugfix
Change-Id: Ic36257f33101d5e50496b5ca9e189efa447490f5
2025-02-25 09:28:06 +00:00
Zoey Chen
4cbc560d1d Merge "[Settings] Add test case for new LocalePicker page - suggested language" into main 2025-02-25 00:40:30 -08:00
Zoey Chen
c0a09796b8 [Settings] Add test case for new LocalePicker page - suggested language
Bug: 396285228
Test: atest
Test: atest SettingsRoboTests:com.android.settings.localepicker.SystemLocaleSuggestedListPreferenceControllerTest
Test: atest SettingsUnitTests:com.android.settings.localepicker.SystemLocaleSuggestedListPreferenceControllerTest
Flag: EXEMPT refactor
Change-Id: I70d731b50775bf45ae0d73e4da9ea78dfcd3826c
2025-02-24 22:36:29 -08:00
Zoey Chen
6429735cb3 [Settings] Fix test failure
Change-Id: I06b56a378ab37f476801d0da97b68c4e3e07906c
Test: atest SettingsUnitTests:com.android.settings.localepicker.LocaleDialogFragmentTest
Bug: 396802384
Flag: EXEMPT bugfix
2025-02-24 20:09:09 -08:00
Jan Tomljanovic
eeea2fc024 Always set source status, even when null.
This makes sure it erases old data about the source when it's no longer
used.

Bug: 398185839
Test: Treehugger
Flag: com.android.settings.flags.biometrics_onboarding_education
Relnote: N/a
Change-Id: I94020c99a1e15348868aaef180972439dcb3266f
2025-02-24 16:40:23 +00:00
Vadym Omelnytskyi
a8f1da6994 Display: refactor Color Mode settings
1. Refactor Color Mode by moving color summary functionality to the ColorModeUtils
class.
2. Migrated `ColorModeUtils` from Java to Kotlin.
3. Changed ColorModePreferenceControllerTest according to changes

Bug: 390644464
Flag: EXEMPT refactoring
Test: atest com.android.settings.display
Test: atest -c packages/apps/Settings/tests/robotests/src/com/android/settings/display/colors/ColorModePreferenceControllerTest.kt
Test: atest -c packages/apps/Settings/tests/unit/src/com/android/settings/display/ColorModePreferenceFragmentTest.java

Change-Id: I55ac6129b93e4e35bd58f0313215b711ce954c0a
2025-02-24 10:36:23 +00:00
Matthew DeVore
bdd9cca602 Merge changes I550fc918,I16b3ae92 into main
* changes:
  Disable mirror toggle if feature turned off
  Use PrefRefresh for Preference caching
2025-02-21 08:59:44 -08:00
Matthew DeVore
c37fc8b827 Use PrefRefresh for Preference caching
Refactor a couple of fields to use PrefRefresh for caching instead
instead of fields. This makes us construct PrefRefresh for display
categories, which we hadn't been doing before, and was causing
b/397466966. This also limits the tests' dependency on implementation.

We had been using fields for caching Preference objects, which doesn't
account for the same preference being needed for each display.
PrefRefresh is a more flexible mechanism for recycling View objects and
it largely makes the fields obsolete.

The reuse* methods (previously get*Preference) can actually be inlined
now that tests aren't calling into them, but to keep the diff easy to
review I left them as separate methods.

Because @NonNull doesn't actually do anything, and is considered the
default, I neglected to add them to new arguments, and deleted them from
lines I modified.

Flag: com.android.settings.flags.display_topology_pane_in_display_list
Test: ExternalDisplayPreferenceFragmentTest.java
Test: with fragment visible, plug-in and activate a new physical display with the Mirror prompt
Test: with topology disabled, verify footer is shown with and without a display attached
Bug: b/397466966
Bug: b/397591022
Change-Id: I16b3ae925ca3d9d79471fd5df00b571ae3fc696f
2025-02-21 09:43:10 -06:00
Shawn Lin
738d13829d Add metrics for biometric onboarding & education
Log the stats for the new changed buttons

Bug: 370940762
Test: atest FaceSettingsAppsPreferenceControllerTest
            FaceSettingsKeyguardUnlockPreferenceControllerTest
	    FingerprintSettingsAppsPreferenceControllerTest
	    FingerprintSettingsKeyguardUnlockPreferenceControllerTest
Flag: com.android.settings.flags.biometrics_onboarding_education
Change-Id: Ic14ffc43457a71f1f70ace0479410b7449dcc539
2025-02-21 08:39:46 +00:00
Tom Hsu
3c1e8e19cb Merge "Make Satellite UI updatable during receiving callback" into main 2025-02-20 23:27:01 -08:00
Treehugger Robot
540361621a Merge "Fixed crash issues in Emergency Callback Mode" into main 2025-02-20 03:35:54 -08:00
Weng Su
af065146d5 Fixed crash issues in Emergency Callback Mode
- Avoid using controllers when Catalyst design is enabled

Bug: 394015881
Flag: EXEMPT bugfix
Test: Manual testing
  atest NetworkDashboardFragmentTest
Change-Id: I4393be5e76c0328f2a53f1d828814491991557f1
2025-02-20 18:24:16 +08:00
tom hsu
d5548d1463 Make Satellite UI updatable during receiving callback
- Refactor code
 - Make Satellite category be updatable by callback.

Flag: EXEMPT bug fix
Fix: b/396233604
Fix: b/382664790
Test: atest pass
Change-Id: I893030005ae5af1403557f7bd22e8cdaf038ffcf
2025-02-20 09:34:45 +00:00
Garvita Jain
c543fa8101 Merge "L10n fix for IW locale in storage_summary string" into main 2025-02-19 01:38:19 -08:00
Garvita Jain
4e5595050f L10n fix for IW locale in storage_summary string
storage_summary is passed as a single string of format "32 GB".
Spliting the phrase to allow TC to remove whitespace in case of iw
translations.

Old Translation : <free_space>
New Translation: <free_space_value> <free_space_unit>

Bug: 387197875
Test: manual
Flag: EXEMPT bugfix
Change-Id: I91abf58df472650a6278b08e4daa5d32e7f90da9
2025-02-19 04:19:16 +00:00
Liana Kazanova (xWF)
a17dfe4ecc Merge changes from topic "revert-31790253-UHOKZZQOPA" into main
* changes:
  Revert "Make Satellite UI updatable during receiving callback (P..."
  Revert "Modify the default satellite category title."
2025-02-18 10:46:03 -08:00
Liana Kazanova (xWF)
790fa6e00e Revert "Make Satellite UI updatable during receiving callback (P..."
Revert submission 31790253

Reason for revert: DroidMonitor: Potential culprit for http://b/397368653 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:31790253

Change-Id: I851046019821fff0d132efb0b00cbff1e3ecbe72
2025-02-18 09:35:50 -08:00
Hakjun Choi
0be57cf311 Merge "Clean up aconfig flag carrier_enabled_satellite_flag" into main 2025-02-18 03:29:48 -08:00
Hakjun Choi
1a53ea7a05 Clean up aconfig flag carrier_enabled_satellite_flag
Bug: 393951373
FLAG: EXEMPT flag clean up
Test: atest NetworkSelectSettingsTest WifiCallingSettingsForSubTest SatelliteSettingsPreferenceControllerTest
Test: manual test in live network
Change-Id: I154e9be8a8c771fafb37af078be7b495f18b6100
2025-02-18 08:41:14 +00:00
tom hsu
9df2e6fdc9 Make Satellite UI updatable during receiving callback (Part II)
- Refactor code
 - Make Satellite category and preference be updatable by callback.

Flag: EXEMPT bug fix
Fix: b/396233604
Fix: b/382664790
Test: atest pass
Change-Id: I55423317d82589312ce4a2f851b32b242529e922
2025-02-18 06:32:33 +00:00
tom hsu
048be18c5e Make Satellite UI updatable during receiving callback (part I)
- Refactor code
 - Make Satellite category and preference be updatable by callback.

Flag: EXEMPT bug fix
Fix: 396233604
Test: atest pass
Change-Id: If2e3d9b82950f05c4911ee7ce3bb41fb26e0d3e4
2025-02-18 06:19:47 +00:00
Treehugger Robot
be9c39f0aa Merge "Fix test error of SatelliteSettingsPreferenceControllerTest" into main 2025-02-17 05:51:07 -08:00
tom hsu
543e446150 Fix test error of SatelliteSettingsPreferenceControllerTest
- Root cause is wrong Resouce string got.

Flag: EXEMPT bug fix
Fix: b/396571641
Test: atest passed
Change-Id: I25a4c7fff0ea20ab3c6e7fde99e1fba2b0288dfd
2025-02-17 11:28:47 +00:00
Menghan Li
972e7a320c Merge changes from topics "A11yFeedback", "AccessibilityFeedbackFeatureProvider" into main
* changes:
  feat(A11yFeedback): Pixel overlay to expose the feedback bucket ID
  feat(A11yFeedback): Add feedback entry for Accessibility page
  feat(A11yFeedback): Add FeedbackManager for Accessibility page
2025-02-16 19:45:09 -08:00
tom hsu
bb80fe2df1 [Satellite Settings] Show device's app info on Satellite settings page.
- Shows device apps' info up to 3 on Satellite settings' page.
 - Add a new page to show all device's app info with Satellite supported.

Flag: com.android.internal.telephony.flags.satellite_25q4_apis
Fix: b/395813844
Test: atest pass
Change-Id: Ibd5e1c74b636639082ec9477f2b6796bcbc8340d
2025-02-14 06:40:10 -08:00
Menghan Li
6b916e6f29 feat(A11yFeedback): Pixel overlay to expose the feedback bucket ID
This change introduces a feature provider for Pixel overlays, allowing
customization of the feedback bucket ID on Android.

Bug: 393980229
Test: Manual testing for Pixel and non-Pixel overlay in real device
Test: atest AccessibilitySettingsTest
            FeedbackManagerTest
Flag: com.android.server.accessibility.enable_low_vision_generic_feedback
Change-Id: Ieeb1dba4de5c13a275e66781621cbfcca7219a5e
2025-02-14 03:01:41 +00:00
Treehugger Robot
63e919d927 Merge "Inline MODES_API flag" into main 2025-02-13 09:43:04 -08:00
Matthew DeVore
3d09a33a73 Merge "Show per-displays pref groups after built-in" into main 2025-02-13 08:13:44 -08:00
Matthew DeVore
2edcb8de0c Show per-displays pref groups after built-in
When the built-in display settings as well as CD settings are both
present in the fragment, show external display settings category after
built-in. This applies to the per-display fragment and the initial
display list fragment.

Stop showing per-display settings nested in a parent list, as this was
causing extra spacing and complicating the code.

Flag: com.android.settings.flags.display_topology_pane_in_display_list
Test: ExternalDisplayPreferenceFragmentTest
Test: manually check topology mode for single display, multiple displays, in both fragments
Test: manually check v1 UI for single display, multiple displays, in both fragments
Bug: b/352648432
Bug: b/396116157
Change-Id: I7fdf72d198988feb1e7559f96a54f7680cf5b8a6
2025-02-13 05:27:05 +00:00
Zoey Chen
ceaa16575a Merge "[Settings] Apply new style to dialog" into main 2025-02-12 17:28:45 -08:00
Zoey Chen
09841d6bb4 [Settings] Apply new style to dialog
Bug: 394542699
Test: manual
Test: atest SettingsRoboTests:com.android.settings.localepicker.LocaleListEditorTest
Flag: EXEMPT refactor
Change-Id: Idfed52722d1113e432742342fd8a56958e84406e
2025-02-12 12:59:54 +00:00
Matías Hernández
7235474792 Inline MODES_API flag
Bug: 310620812
Test: Preexisting
Flag: EXEMPT Inlining flag
Change-Id: I54ad81d87ea4ce85940400b0e8680a1bac0ca342
2025-02-11 15:14:24 +01:00
Treehugger Robot
1b1fa4810f Merge "[Satellite] Add satellite string for KDDI if no entitlement" into main 2025-02-10 19:30:27 -08:00
tom hsu
292f1bdd01 [Satellite] Add satellite string for KDDI if no entitlement
- Currently Android only handles Satellite w/ entitlement for any notifications. Some carriers such as KDDI have no entitlement for satellite service, so this change is to add some strings to avoid any confuse to Android user on satellite service.

Flag: EXEMPT resource update
Fix: b/382387532
Test: Manual test
Test: atest pass
Change-Id: I835787c9e0fe29eeecec0470e9bd6b38939abd8c
2025-02-10 18:26:35 -08:00