Commit Graph

17509 Commits

Author SHA1 Message Date
Xinyi Mao
9db553f264 Merge changes from topic "screentime" into main
* changes:
  Fix summary for system components which 30 sec <= usage time < 1 min.
  Fix purge condition for system component in BatteryDiffData.
2024-04-02 10:59:14 +00:00
mxyyiyi
52672ca34b Fix summary for system components which 30 sec <= usage time < 1 min.
- formatElapsedTimeWithoutComma(withSecords = false,) will round up minutes by adding 30 seconds.
https://screenshot.googleplex.com/8HrDpLi8FX8tjJy

Bug: 321265878
Test: Manual
Change-Id: I779bd7c33bbb3aefa0a88f6ba42d047259bc50cc
2024-04-02 17:00:51 +08:00
Fan Wu
a6289cddd9 Merge "Remove LooperMode.LEGACY usage from settings/development" into main 2024-04-02 08:13:37 +00:00
Treehugger Robot
3f3785aacb Merge "Fix the a11y focus problem in a long list page" into main 2024-04-02 03:56:29 +00:00
Jason Chiu
3f0eefbd37 Fix the a11y focus problem in a long list page
While a page is scrolling to the target position, the target can't
request a11y focus, and the highlight blink animation at the moment is
also invisible.

The patch is to skip the unseen highlight animation and focus operation
when onBindViewHolder() is called before scrolling. Therefore, when the
scrolling stops, the scroll listener will notify the item changed and
onBindViewHolder() will be called again to do the operations.

Also decrease the delay time of the scrolling start to make the a11y
smoother.

Bug: 318459003
Test: manual, robotest
Change-Id: Ie55b2edeb7e1feaaadb5e670f39f07f6f17b92b9
2024-04-02 10:43:28 +08:00
Marcus Ge
5143f265ae Merge "[Accessibility] Hide Color Contrast entry point in Accessibility" into main 2024-04-02 00:36:26 +00:00
Treehugger Robot
4f7bdc12c3 Merge "Clean up usages of flag remove_qs_tooltip_in_suw" into main 2024-04-01 21:33:42 +00:00
Derek Jedral
8802d4c085 Merge "getAuthority using resolveContentProvider" into main 2024-04-01 21:26:41 +00:00
marcusge
00b6384d3c [Accessibility] Hide Color Contrast entry point in Accessibility
Test: local raven device
Bug: 241805782

Change-Id: I9f0825df68a0c2bdb90ba068b0e4b133cbc8ae57
2024-04-01 20:53:14 +00:00
Chun-Ku Lin
dd915a5031 Clean up usages of flag remove_qs_tooltip_in_suw
This bug-fixing flag has been in Trunkfood in two months.

Test: existing presubmit (no functional change)
Bug: 294560581
Change-Id: I05282f1f7ee6b1bb4e4bf873771d80ae68204b4c
2024-04-01 20:13:01 +00:00
Derek Jedral
9cdb54315e getAuthority using resolveContentProvider
Gets the provider info directly by providing the authority, rather than
getting all providers, and then finding the matching authority. This
should be much more efficient.

Test: local test, confirm entry point still appears
Bug: 316799867
Change-Id: I9b98cff3b8f19a6cab8dd64b433a2b3129546ada
2024-04-01 17:41:01 +00:00
Treehugger Robot
b9c1632a5f Merge "Fix the action bar shows up problem" into main 2024-04-01 09:29:28 +00:00
Fan Wu
39d87927de Remove LooperMode.LEGACY usage from settings/development
Bug: 331566352

Test: atest
Change-Id: I3be4baff5cf556a875af8b4410cc2dd870fd290c
2024-04-01 17:08:36 +08:00
Daniel Norman
27607a47a5 Merge "fix(magnification): make always on toggle unavailable when capabilities is window only" into main 2024-03-29 19:09:35 +00:00
Fan Wu
70272cdcde Merge "Remove LooperMode.LEGACY usage from two test classes" into main 2024-03-29 10:10:18 +00:00
Fan Wu
3fdb68c2c2 Merge "Remove LooperMode.LEGACY usage from settings/applications path." into main 2024-03-29 10:09:59 +00:00
Jason Chiu
0bd014c497 [Safer intents] Settings misc
To avoid implicit intents, make intents launch explicitly.

Test: build
Bug: 323061508
Change-Id: Ie19cbceb89842a75a180898abcce81b63c18d46c
2024-03-29 04:22:45 +00:00
Fan Wu
4bb2bff03e Remove LooperMode.LEGACY usage from two test classes
Bug: 330824314

Test: atest
Change-Id: Ic8e6aa633d72b7680a9ff8c6e37a66c64778c26a
2024-03-29 10:49:53 +08:00
Fan Wu
cf3649f21b Remove LooperMode.LEGACY usage from settings/applications path.
Bug: 331546577

Test: atest
Change-Id: I419100b302bee55a06fbc481232927ea44a68bd3
2024-03-29 10:48:50 +08:00
Sunny Shao
8803ae7823 Fix the action bar shows up problem
- Hide the internal action bar.
- Refine the Utils.setupEdgeToEdge API.
- Rollback the testcases.

Bug: 328622648
Fixes: 331308440
Test: atest com.android.settings.UtilsTest SettingsActivityTest
Change-Id: I7dfbc93def3e772b57bf06b8276315cee7402a9c
2024-03-29 08:32:22 +08:00
Jason Chiu
071dfe8691 [Safer intents] Applications
To avoid implicit intents, make intents launch explicitly.

Test: build, robotest
Bug: 323061508
Change-Id: I9bf4eb102550f4afd8d14a6799940d37fc0ab9a7
2024-03-28 04:13:47 +00:00
josephpv
14b2f9568e Add new filter to list private space apps when not in quite mode
This change handles listing of private space apps in Settings > Sound &
vibration > Do Not Disturb > Apps page.

Based on the new filter this page
- lists the apps from private space whenever profile is unlocked.
- when quite mode enabled privat space apps in the list is hidden.

Recording Link: b/322316632#comment3

Bug: 322316632
Test: Manual
Change-Id: Ie8a7b3376351c031a1abb8488eceb7859a1930fd
2024-03-27 20:43:12 +00:00
Neil Fuller
6ed3743755 Merge "UI changes to support time feedback" into main 2024-03-27 13:25:57 +00:00
Matías Hernández
4267835c15 Merge "Populate new fields in modes created via Settings" into main 2024-03-27 09:55:24 +00:00
Treehugger Robot
a2d95c9a9c Merge "ApnSettingsActivity shows the ActionBar" into main 2024-03-27 09:41:59 +00:00
Fan Wu
0a0e591b96 Ignore failing tests to unblock presubmit
Bug: 331324279

Test: atest
Change-Id: Ia38c223ac7aa4aed2739a0fd371c7496811d2054
2024-03-27 15:37:45 +08:00
Sunny Shao
e6104d7546 ApnSettingsActivity shows the ActionBar
- Use the Theme.Settings.NoActionBar
- Update test cases

Fixes: 331308440
Test: atest com.android.settings.UtilsTest SettingsActivityTest
Change-Id: Ica93e765690707654ae651261ac8d236ed8e1d58
2024-03-27 13:45:28 +08:00
Chris Antol
15ff73e825 Merge "Restrict Settings Homepage prior to provisioning" into main 2024-03-27 00:09:37 +00:00
Marcus Ge
660defe7a6 Merge changes I60d2b23a,I7cb15a46 into main
* changes:
  [Accessibility] Color Contrast address talkback bugs
  [Accessibility] Color Contrast address UX bugs
2024-03-26 20:26:10 +00:00
marcusge
9ec6673b3f [Accessibility] Color Contrast address talkback bugs
Test: local raven device
Bug: 329352987
Bug: 329192396
Bug: 329187057
Flag: aconfig
com.android.settings.accessibility.enable_color_contrast_control

Change-Id: I60d2b23acb2e406db15f348ba7881577e55a8868
2024-03-26 19:08:42 +00:00
Chun-Ku Lin
2664bb004d Merge "Rename AccessibilityGestureNavigationTutorial to AccessibilityShortcutsTutorial" into main 2024-03-26 06:47:03 +00:00
Roy Chou
1c898252cb fix(magnification): make always on toggle unavailable when capabilities is window only
As b/328787031, we make the MagnificationAlwaysOnPreferenceController observe the magnification capabilities then update the preference enabled state. Therefore, when changing the capabilities to window mode only, the preference will become unavailable.

We use the bug-fix flag to verify the fix with rollout process.

Bug: 328787031
Flag: ACONFIG com.android.settings.accessibility.hide_magnification_always_on_toggle_when_window_mode_only DEVELOPMENT
Test: manually flip the flag
      atest MagnificationCapabilitiesTest
      atest ToggleScreenMagnificationPreferenceFragmentTest
      atest MagnificationAlwaysOnPreferenceControllerTest
Change-Id: I1a25f80131d84ecdd927030e40a18ebb32b7862f
2024-03-26 05:11:06 +00:00
Haijie Hong
f5d8f4afa9 Merge "Disable media output switcher in Settings when audio sharing" into main 2024-03-26 03:23:51 +00:00
Fan Wu
be3633ac17 Merge "Remove LooperMode.Legacy usage from settings/biometrics/" into main 2024-03-26 01:49:30 +00:00
Chun-Ku Lin
4c9d268fdf Rename AccessibilityGestureNavigationTutorial to AccessibilityShortcutsTutorial
AccessibilityGestureNavigationTutorial is not only for displaying
tutorial for accessibility gesture shortcut. It's used for display the
tutorials for all the selected accessibility shortcuts. Renamed the
class to match it's responsibility.

Bug: N/A
Flag: EXEMPT Strict mechanical refactors
Test: build succeed locally

Change-Id: I1dd212abc660454e77f18f770c2ecc17be320eaa
2024-03-26 01:13:28 +00:00
Chris Antol
70a5a0fd35 Restrict Settings Homepage prior to provisioning
Bug: 327749022
Test: manual test
1. factory reset + launch Settings via ADB during Setup -> verify app closes
2. factory reset + bypass Setup + tap Settings icon in launcher -> verify app closes

Change-Id: I8cbe38109ebf88a0f68f3917e95468a81c6463c1
2024-03-25 23:51:04 +00:00
Chun-Ku Lin
3aee92e2e8 Update a11y edit shortcut screen's text and tutorial text
Bug: 323792194

Test: manual
Test: atest com.android.settings.accessibility
Test: atest com.android.settings.accessibility.shortcuts

Flag: N/A simple string changes

NO_IFTTT=Introduce new IfThisThenThat lint

Change-Id: I7ba4096d669453c33257880407e85ffe76d358f8
2024-03-25 22:19:10 +00:00
Neil Fuller
43ded696dd UI changes to support time feedback
The feature is behind a release flag. It is also behind an experiment
flag so it can be trialed with Googlers before general release even
after being enabled in a release.

The feedback button only shows up if there is an intent URI configured,
which should be handled via an overlay. The design means that the intent
is potentially dependent on the manufacturer (good!), though I expect we
will suggest a standard one for GMS devices so we get feedback from a
variety of devices with different form factors / capabilities.
In this default, GMS core (Google Play Services) will handle the intent
and take the user through a feedback UI flow.

Testing:

To enable the button you need to build with one of release variants that
supports dynamic flags, e.g. trunk_food.

Then release flag:
$ adb shell device_config put location com.android.settings.flags.datetime_feedback true

It still won't work without the experiment flag:
$ adb shell device_config put settings_ui time_help_and_feedback_feature_supported true

Finally, the settings entry will launch an intent when pressed which has
to have a receiver. The receiver will be in GMS core but will be subject
to its own review / launch process. Until then, this feature will remain
quiet, biding its time.

Bug: 283239837
Test: Manual (see above)
Test: atest SettingsRoboTests:com.android.settings.datetime
Change-Id: I68798798fc0a47ae4c6755174ce509fbaee24142
2024-03-25 19:00:47 +00:00
Matías Hernández
a1d8044cbf Populate new fields in modes created via Settings
Type and trigger description on creation; trigger description on update.

Bug: 317370174
Bug: 320997361
Test: atest ZenModeScheduleRuleSettingsTest ZenModeEventRuleSettingsTest
Change-Id: Idb1edcc8829b54ec85494966eb391e52012a5348
2024-03-25 15:57:10 +01:00
Treehugger Robot
333b21c6d0 Merge "Disable even dimmer setting conditionally" into main 2024-03-25 12:59:59 +00:00
Fan Wu
8d1aa43cc5 Remove LooperMode.Legacy usage from settings/biometrics/
Bug: 330824314

Test: atest
Change-Id: I12e0d807c80469f219eb9c57bed1bbbb5da487b1
2024-03-25 18:23:10 +08:00
Fan Wu
20f85c5282 Merge "Remove all LooperMode.LEGACY usages from settings/accessibility" into main 2024-03-25 07:40:22 +00:00
Haijie Hong
c1a5a7c9b1 Disable media output switcher in Settings when audio sharing
Bug: 327080094
Test: atest MediaOutputPreferenceControllerTest
Change-Id: I1e81d507c5c92c2b6f21494551931b359d5043cb
2024-03-25 14:01:35 +08:00
Fan Wu
c788a90669 Remove all LooperMode.LEGACY usages from settings/accessibility
Bug: 331124680

Test: atest
Change-Id: I21cc137358e5cb29c16aeda0b744f36d9f8bf010
2024-03-25 11:42:34 +08:00
Yiyi Shen
9ba24a5d2d Merge "[Audiosharing] Support sharing dialog when click media devices." into main 2024-03-25 02:44:35 +00:00
Fiona Campbell
4a401d4313 Disable even dimmer setting conditionally
- Disable even dimmer settings option if autobrightness is not enabled
  on the device

Bug:179428400
Test: manual

Change-Id: I8f7add839022fc7c27694fd8daa83a608cf2736a
2024-03-23 02:09:46 +00:00
Joseph Vincent
4230ad4b07 Merge "Add a preference in reset options to delete private space" into main 2024-03-22 10:01:19 +00:00
Yiyi Shen
87629f2470 [Audiosharing] Support sharing dialog when click media devices.
Instead of directly stop audio sharing, clicking on media devices will
lead to different sharing dialogs based on different scenarios. The
scenarios are align to cases when a new device is connected.

Test: atest
Bug: 305620450
Fix: 327259953
Change-Id: Ibb591cb1a59f31c8f0be4f3e72e45378b17e3809
2024-03-22 14:11:11 +08:00
Fan Wu
fd882624f9 Merge "Re-enable failed test in FactoryResetPreferenceControllerTest" into main 2024-03-22 04:13:29 +00:00
Fan Wu
e4bfb2d2b5 Merge "Fix test failures under settings/wallpaper" into main 2024-03-22 04:13:11 +00:00