Commit Graph

22354 Commits

Author SHA1 Message Date
mxyyiyi
8eaf8edf7e Add AppOptimizationModeEventsUtils to save & update app optimization mode expiration events.
- [Update] Save app optimizaiton mode set & expire events from turbo.
- [Reset ] Restore optimization mode for expired events in Periodic job.
- [Delete] Cancel expiration event if user updates mode in app usage page.

Bug: 338965652
Test: atest + manual
Change-Id: I3fb7311207da1bdb1146ea1ff041aca6adb66052
2024-06-03 19:42:26 +08:00
chelseahao
5ce2589dba [Audiosharing] Clean up some tests - properly reset shadows and removed unused spy.
Test: atest -c com.android.settings.connecteddevice.audiosharing.audiostreams
Bug: 308368124
Change-Id: If47a00ec02fbd78146483d5a409d9bcc42b5e841
2024-06-03 15:53:58 +08:00
Daniel Norman
c3b2165dfe Update A11ySettings to load preferences in onCreate().
This version still only loads preferences once, but the previous attempt
commit 774bbc1ff2
created a "sliding" effect as the preferences were loaded after the page
became visible to the user.

Also reorders methods so that their position in the source file matches
the Activity lifecycle ordering.

Bug: 327052480
Test: existing A11y Settings robotest presubmit
Test: Launch this page from the Settings app, observe no sliding UI
Flag: NONE low risk visual bug fix
Change-Id: I44312ada359aef7dec8eb27c57cde2a8e00f254b
2024-06-01 22:24:18 +00:00
Chun-Ku Lin
38236869ee Merge "Update a11y shortcut images" into main 2024-05-31 17:53:12 +00:00
Yiyi Shen
b38092cb6c Merge "[Audiosharing] Add audio sharing loggings (P1)" into main 2024-05-31 05:40:03 +00:00
Matías Hernández
8f93b4d789 Merge "Add default icons for all mode types" into main 2024-05-30 21:10:16 +00:00
Matías Hernández
fcb8acc277 Add default icons for all mode types
Also a couple of icon-related fixes:
* Use the proper context, since we need theming (this also means it cannot be stored in IconLoader, which is a singleton, and must be supplied).
* Force apply the standard size and tint, since app-provided icons may be arbitrary.
* Fix the schedule-time icon (the viewport size was incorrect).

Bug: 308819461
Fixes: 333528437
Flag: android.app.modes_ui
Test: atest com.android.settings.notification.modes
Change-Id: Iae447c8c4a0218a8bc989c01d1d56d0c06abd8e7
2024-05-30 18:11:25 +02:00
Yuri Lin
cfaedb0199 Merge "Add page for choosing calendar & reply for event modes." into main 2024-05-30 14:59:00 +00:00
Julia Reynolds
3f208db1dd Merge "Update check boxes to switches" into main 2024-05-30 13:08:45 +00:00
Chaohui Wang
1bfea5d472 Check if ECBMode when deactivate SIM card
If in ECBMode, start ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS to show a
dialog instead.

This align with the current airplane mode switch.

Fix: 191943857
Test: adb shell cmd phone emergency-callback-mode
Test: unit test
Change-Id: Icf646cd76990d621121b4367ec0fd02a3880b85c
2024-05-30 16:37:51 +08:00
Yiyi Shen
24589b1668 Merge "[Audiosharing] Add flag to start broadcast with no lea headset connected" into main 2024-05-30 07:00:20 +00:00
Ram Peri
cffe3114c0 Merge "Disable ChooseLockTypeDialogFragmentTest for robolectric" into main 2024-05-30 03:54:11 +00:00
Yiyi Shen
d1ea3b4d96 [Audiosharing] Add audio sharing loggings (P1)
Bug: 331515891
Test: atest
Change-Id: I7396f99538f36b47086e0c4f45ef775535f2f321
2024-05-30 11:11:48 +08:00
Treehugger Robot
7a0d5b98e8 Merge "Split ChangeReason and decouple it from Observer" into main 2024-05-30 02:33:11 +00:00
Ram Peri
985b27c6a1 Disable ChooseLockTypeDialogFragmentTest for robolectric
Flag: NA
Bug: 342667939
Test: atest SettingsRoboTests
Change-Id: I13807fd0feb399ab000350152e1de7d67b4e96da
2024-05-29 16:07:27 -07:00
Julia Reynolds
2af266f423 Update check boxes to switches
To match the rest of the settings

Test: ZenModeNotifVisPreferenceControllerTest
Bug: 337087926
Flag: android.app.modes_ui
Change-Id: I193db8404a3b6c8bdacbbb9e19e3a7c1826d745f
2024-05-29 18:35:31 +00:00
Yuri Lin
f29f44296a Add page for choosing calendar & reply for event modes.
Also adds the link to set trigger behavior to the main mode page (only for calendar so far), and the switch preference to enable/disable automatic rules (for all but manual DND mode).

Removes the "escape hatch" to allow manual mode to also use the new modes pages.

Ported from ZenModeEventRuleSettings.

Flag: android.app.modes_ui
Bug: 332730302
Test: ZenModeSetCalendarPreferenceControllerTest, ZenModeSetTriggerLinkPreferenceControllerTest, manual
Change-Id: Ia7a716c66663a21494a6c05711250a5bda87ca8c
2024-05-29 17:29:23 +00:00
Vlad Marica
e968a66489 Merge "Ignore OEM Unlocking when wiping PDB during factory reset on V+" into main 2024-05-29 16:23:18 +00:00
Alexander Roederer
4e10ac8dae Merge changes from topic "b308819928-ModesSettingsAppBreakthroughPage" into main
* changes:
  Moves ZenModeBypassingAppsSettings into modes dir
  Adds modes settings page for bypassing apps
2024-05-29 14:20:02 +00:00
Alexander Roederer
c50457613e Moves ZenModeBypassingAppsSettings into modes dir
Copies these files into modes dir, so we can continue to deprecate the
old zen directory

Bug: 308819928
Test: flash+test, atest ZenModeAllBypassingAppsPreferenceControllerTest,
atestZenModeAddBypassingAppsPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: Ib18930bb16a3d675e460028f5c52ef32060541ad

Change-Id: Id6c8d834bbd106fef068c5f04acf8cd71229a5e3
2024-05-29 12:23:59 +00:00
Edgar Wang
fc53dbe13b Merge "Fix homepage icon didn't hide in portriat mode" into main 2024-05-29 08:56:32 +00:00
Edgar Wang
fb30cb68cf Fix homepage icon didn't hide in portriat mode
- also fix don't tint homepage icons when homepage_revamp enabled

Bug: 343162224
Test: manual
Change-Id: I85b65239cb852cd914a5fd889ec366bf336fd446
2024-05-29 08:54:12 +00:00
Yiyi Shen
bfdcc82dc7 [Audiosharing] Add flag to start broadcast with no lea headset connected
Allow audio sharing with no connected le audio headset when settings_need_connected_ble_device_for_broadcast is false

Bug: 343277847
Test: atest
Change-Id: I560338d53ddf290550faf8198cd7173bb734d150
2024-05-29 15:46:37 +08:00
Tom Hsu
c3e9cd5969 Merge "Fix Crash due to runtime exception from CarrierManager" into main 2024-05-29 06:38:30 +00:00
tomhsu
a5f3d46539 Fix Crash due to runtime exception from CarrierManager
Fix: 329754400
Test: atest passed
Change-Id: I6065160dcd15d547241dd8bc0f9f99c336c59625
2024-05-29 05:11:59 +00:00
Tom Hsu
49abe4c03d Merge "Fix when edittext only has space and cause name look like blank" into main 2024-05-29 05:08:07 +00:00
Chaohui Wang
48e3f2a882 Merge changes Iccd209fd,Ia0c32882 into main
* changes:
  Refactor signal strength in SIM status
  Refactor SimStatusDialogRepository
2024-05-29 04:13:32 +00:00
Jason Chiu
5d44b3f0c8 Merge "Suppress rawData settings from indexing when page is disabled for search" into main 2024-05-29 03:51:38 +00:00
tomhsu
d5556c59e9 Fix when edittext only has space and cause name look like blank
fix: 335763360
Test: Manual test. see b/335763360#comment14
Test: atest passed
Change-Id: I9ebae13039d7b78b7acfea545a89d3096aa82c31
2024-05-29 03:42:35 +00:00
Sunny Shao
c725c5ba5a Split ChangeReason and decouple it from Observer
Observer is flexible to be used for other scenarios.

Bug: 325144964
Test: atest SettingsLibDataStoreTest
Test: atest com.android.settings.fuelgauge
Change-Id: I50c0c6267b29460efa3861e609d64a4d92db7b89
2024-05-29 11:39:23 +08:00
Chun-Ku Lin
a384bb2cbc Merge "Use CheckFlagsRule when the test requires the device's implementation" into main 2024-05-29 03:10:17 +00:00
Joseph Vincent
9ebdedd2f6 Merge "Private space auto lock on device restart during setup" into main 2024-05-29 02:12:44 +00:00
Chun-Ku Lin
833bbccd30 Update a11y shortcut images
- Update QS, gesture, volume keys shortcut type images
- Change FAB image to animated image
- Change 2-finger double tap, triple tap animated images
- Fix the alpha value set in the FAB preview

Bug: 324312956
Test: Run and view the images
Test: atest com.android.settings.accessibility
Flag: EXEMPT low risk, resource change
Change-Id: Ic0f1953ca20fc8a3dc7b684f95ee18dae67c4f09
2024-05-29 01:43:44 +00:00
Chun-Ku Lin
0122f8a1dc Use CheckFlagsRule when the test requires the device's implementation
Bug: 341699461
Test: atest com.android.settings.accessibility on next-userdebug build
Flag: TEST_ONLY
Change-Id: I348252519a8af4b7c890b4e8a03752c918c94b94
2024-05-29 01:35:09 +00:00
Alexander Roederer
c512046eb9 Adds modes settings page for bypassing apps
Adds the settings page that a user will reach from a mode settings page
when they tap on "App," to allow  them to select whether all, none, or
priority modes can break through and send notifications.

Bug: 308819928
Bug: 331267485
Flag: android.app.modes_ui DEVELOPMENT
Test: build and test, controller unit tests
Change-Id: I5bcebfca0fc2882f839afdced8d2b817dad14e6c
2024-05-28 22:12:27 +00:00
Kevin Liu
1df39c3d5f Merge "Add strict_mode: false" into main 2024-05-28 20:09:07 +00:00
Julia Reynolds
a5a7c14b0f Merge "Add button for activating modes manually" into main 2024-05-28 20:08:25 +00:00
SongFerng Wang
b462f9fa11 Merge "The pages of sim onboarding flow is wrong." into main 2024-05-28 19:58:55 +00:00
David Jacobo
7b986e7e45 Merge "Revert "settings: Make use of ACTION_NETWORK_PROVIDER_SETTINGS"" into main 2024-05-28 19:38:10 +00:00
Lucas Silva
593ab5ee2d Merge "Fix CommunalPreferenceControllerTest" into main 2024-05-28 19:13:36 +00:00
Lucas Silva
8b13cd4b6d Fix CommunalPreferenceControllerTest
Migrate test to robolectric, as this test doesn't require a device to
run. This also speeds up the test, and allows for use of roboelectric
shadows.

Fixes: 337417918
Test: atest CommunalPreferenceControllerTest
Flag: EXEMPT fix broken test
Change-Id: I32b2760c98bf527b33a8ccbe46314395a03da1e0
2024-05-28 13:21:58 -04:00
Julia Reynolds
97b462dbf0 Add button for activating modes manually
Fixes: 308819907
Flag: android.app.modes_ui
Test: ZenModeButtonPreferenceControllerTest
Test: atest com.android.settings.notification.modes
Change-Id: Id018d360c648dd948d2f950ca67cfbea71cc5c68
2024-05-28 13:17:43 -04:00
josephpv
7ef9c46afa Private space auto lock on device restart during setup
After creation of private space value of auto-lock setting is explicitly
set to lock on device restarts. Just before the end of the setup flow
the auto-lock setting is changed to auto-lock on device lock before the
last screen of private space setup.

Bug: 342398315
Test: atest PrivateSpaceMaintainerTest
Change-Id: I8eeb0058c7ecb31d6e30b4cc78ec5877ed316f75
2024-05-28 16:27:09 +00:00
Yining Liu
3e46f1f1c9 Merge changes I081a35c8,I8a84f688,I60b64a0c into main
* changes:
  Clean un-used code for notification cool down
  Add tests for updating Settings Page for Avalanche Suppression
  Update Settings Page for Avalanche Suppression
2024-05-28 15:55:14 +00:00
Treehugger Robot
0dca9f78c5 Merge "Fix Messages onClick." into main 2024-05-28 15:13:23 +00:00
Julia Reynolds
91c67cf728 Fix Messages onClick.
The state of the preference doesn't change until after we get the
callback.

Test: ZenModePrioritySendersPreferenceControllerTest
Flag: android.app.modes_ui
Fixes: 337079247
Change-Id: I1c98561de89e9398f26300bb14710f18991f78f4
2024-05-28 13:42:38 +00:00
Yiyi Shen
5ae060ac00 Merge "[Audiosharing] Update media devices section title in audio sharing" into main 2024-05-28 11:20:48 +00:00
Jason Chiu
d1b0ad25fa Suppress rawData settings from indexing when page is disabled for search
Test: robotest, manual
Fix: 324424783
Change-Id: Ie8423d16df387f13cf35c03005640cfd08a5b492
2024-05-28 17:26:18 +08:00
songferngwang
98efa51681 The pages of sim onboarding flow is wrong.
Switch from SS mode to DSDS mode, the esim status will use the last
status. It causes the condition of page selection is wrong.

Bug: 342972402
Test: atest SimOnboardingPageProviderTest
Change-Id: I8bb0b5f2802ec24f10467bac179ce54d13a9755e
2024-05-28 08:47:23 +00:00
Treehugger Robot
9efdfafb9e Merge "Refer the SoftApCapability cache if getUsableChannels is unsupported" into main 2024-05-28 06:37:06 +00:00