Commit Graph

1818 Commits

Author SHA1 Message Date
Sunny Shao
bee65b4109 Merge "Revert^2 "Nullability Annotations replacement"" into main 2024-01-10 08:35:06 +00:00
Sunny Shao
076ed573eb Revert^2 "Nullability Annotations replacement"
This reverts commit 19d1d3d15d.

Reason for revert: revert it because this is not the root cause.

bug: 316867690
Change-Id: I0f168dbb64044aa720202af7b1040afd4f028c9c
2024-01-10 07:34:01 +00:00
Julia Reynolds
881ce2ced0 Merge "Remove unneeded code" into main 2024-01-08 17:36:09 +00:00
Iavor-Valentin Iftime
86a377dc11 Merge "Move vibrate while unlocked behind a flag" into main 2024-01-08 16:45:16 +00:00
Julia Reynolds
e6c3d18648 Update content description
Test: manual: use TalkBack on conversations screen
Fixes: 317316662
Change-Id: I7c9b0746bf610168e8a3c2bc0d2932082da221a8
2024-01-03 15:00:20 +00:00
Julia Reynolds
c12e8be1b7 Remove unneeded code
Because the setting is marked as 'clone to profile'

Test: none/see other cl in topic
Bug: 314320478
Change-Id: I10fe30c4cbb186b9ef5a3a9f583a287b65cebe3e
2024-01-02 13:39:39 -05:00
Iván Budnik
b02f9f38e4 Inject mocks in RemoteVolumeControllerTest via constructor
This fix avoids the test wrongfully initializing real components before
the tests can modify mockable fields, which causes NPEs.

Bug: 318078730
Test: atest RemoteVolumeGroupControllerTest
Change-Id: I350e3e2e45eadb0f9737ba5d4b45c9f80e3355fb
2024-01-02 13:10:19 +00:00
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
Matías Hernández
907b47105b Tag Zen operations from Settings as coming from the user
Bug: 308670715
Test: atest ApprovalPreferenceControllerTest
Change-Id: Id118f867e84f3d742db6b12eab0f34df1357d178
2023-12-18 13:32:32 +01:00
Valentin Iftime
fe331f1f8f Move vibrate while unlocked behind a flag
Keep this feature disabled for the initial release.

Test: atest NotificationAttentionHelperTest

Bug: 270456865
Change-Id: Ia80cc0c147bbc94fa5faf8e2f12a339a9355d332
2023-12-12 15:32:14 +01: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
Alexander Roederer
d44bfaf86f Adds group to DND settings if channel names same
Adds the channel group name as a summary to the DND channel Preference if two
or more channels have identical names in the DND Menu. This allows users to
disambiguate between the channels.

Bug: 294333850
Test: Unit test updated, run with $make -j RunSettingsRoboTests ROBOTEST_FILTER=AppChannelsBypassingDndPreferenceControllerTest
Change-Id: I4eaf48e5b2ea6513098fde79c3f81d18c6f4bb3d
2023-11-02 13:51:04 +00:00
Chaohui Wang
64def2e3ce Migrate Enhanced notifications to SwitchPreferenceCompat
Settings use SwitchPreferenceCompat instead of SwitchPreference in the
future, for new Material 3 UI.

Also clean up unused fields in its controller.

Bug: 306658427
Test: manual - on Notifications page
Change-Id: I0c4dd3f088e68852a1f63ed46447c306f7c0f65a
2023-10-28 18:19:17 +08:00
Julia Reynolds
db679c9100 Merge "Remove duel switch from NAS switch" into main 2023-10-26 13:03:16 +00:00
Julia Reynolds
7679fec17e Remove duel switch from NAS switch
Test: NotificationAssistantPreferenceControllerTest
Fixes: 301340325
Change-Id: Id41fad70bdcda6de75b59befe3654b733dbf66e3
2023-10-25 13:01:57 -04:00
Chaohui Wang
15ca95a31b Migrate to TwoStatePreference
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference.

Using TwoStatePreference in Java will helps migration in the future.

Bug: 306771414
Test: manual - check Settings pages
Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
2023-10-23 09:28:57 +00:00
Julia Reynolds
88f146a3fe Merge "Allow background start from notif history" into main 2023-10-20 18:10:14 +00:00
Julia Reynolds
55f14ae70d Allow background start from notif history
Test: Tap on entries in 'Recently Dismissed'
Fixes: 304651874
Change-Id: Ifcdd881cbd17903b47f93303bf33a72f718dc181
2023-10-20 13:10:27 -04:00
Treehugger Robot
415ee62af8 Merge "Validate ringtone URIs before setting" into main 2023-10-18 02:04:10 +00:00
Iavor-Valentin Iftime
54bec848cc Merge "Settings for Polite Notifications" into main 2023-10-11 12:04:37 +00:00
Valentin Iftime
323fbda20e Validate ringtone URIs before setting
Add checks URIs for content from other users.
 Fail for users that are not profiles of the current user.

Test: atest DefaultRingtonePreferenceTest
Bug: 299614635
Change-Id: Ib266b285a3a1c6c5265ae2321159e61e08e349f6
2023-10-06 15:44:17 +02:00
Valentin Iftime
68916a9bbf Check for NameNotFoundException when querying for PackageInfo
PackageManager.getPackageInfo will throw NameNotFoundException if package was/is being removed.

Test: atest FullScreenIntentPermissionPreferenceControllerTest
Bug: 296163845
Change-Id: I3242ac7e68fa7ed99fe99c7de7cd97aaf87948ee
2023-09-29 11:17:00 +02:00
Valentin Iftime
9f82e7381a Settings for Polite Notifications
Adds settings page for polite notifications.

Test: atest PoliteNotificationsPreferenceControllerTest
Test: atest PoliteNotificationFilterControllerTest
Test: atest PoliteNotifVibrateUnlockedToggleControllerTest
Test: atest PoliteNotifWorkProfileToggleControllerTest

Bug: 270456865

Change-Id: I3ec497b068c15205df97bb26ee007beed8da9ee1
2023-09-28 09:42:50 +00:00
Valentin Iftime
37b3b9b1db Use profile badge without background for notification history
Use the no-brackground work profile badge for notification history list items.

Test: manual
Bug: 291974306
Change-Id: I4c75267be1090cda03de2bc3fdcfc19fc398a223
2023-09-27 14:43:24 +02:00
Chaohui Wang
cc2133ba8e Clean up unused fields from EntityHeaderController
Bug: 295260929
Test: manual - on pages with header
Test: robo test
Change-Id: Icebd63dbb5d3d44b4b46d3bececb8b65b30b4883
2023-08-21 13:58:07 +08:00
Jeff DeCew
c575812540 Merge "Change Notification expander to use 10% opaque foreground color" into udc-qpr-dev am: 745b7dca9f am: fa4994e1a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24405286

Change-Id: I8d1740726ce793bbdf3b3effcee5d1f0d523a0ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-17 16:20:09 +00:00
Jeff DeCew
fa4994e1a2 Merge "Change Notification expander to use 10% opaque foreground color" into udc-qpr-dev am: 745b7dca9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24405286

Change-Id: Ia9daf2b103e562891356bf638bfa097b283add83
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-17 15:50:31 +00:00
Colin Cross
84f8961e67 Fix kotlin nullable errors in Settings
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
Change-Id: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
Merged-In: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
2023-08-14 12:30:16 -07:00
Colin Cross
87b870a090 Fix kotlin nullable errors in Settings
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
Change-Id: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
2023-08-14 12:29:02 -07:00
Jeff DeCew
0761f46d09 Change Notification expander to use 10% opaque foreground color
Bug: 277285099
Test: post and cancel notifications; check history
Change-Id: I55f533eed8ad39a7ab3886d064f0ee0bd7c3b666
2023-08-11 12:10:20 -04: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
Michael Mikhail
1ff1626fd5 Merge "Override the state description of volume seekbar." into udc-qpr-dev am: 4b77d876b9 am: 31f420ce9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23985544

Change-Id: I74b6b1e03877780f28779b563ea8ad088aa1233d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 16:55:25 +00:00
Michael Mikhail
b222b96407 Override the state description of volume seekbar.
This overrides the state description of seekbar in order to adjust the
progress percentage. The percentage of seekbar is not matching with the
percentage said by talkback feature when the volume changes. This CL
rounds the percentage to match what is said by talkback.

Bug: 285458191
Test: Enabled talkback and checked percentages of sliders of all sounds
and vibrations volumes. Video attached in bug link.
Test: atest VolumeSeekBarPreferenceTest.

Change-Id: Iedcf3eccb13b7f8ee1a4ca521f0783c55d7a1902
2023-07-20 14:11:26 +00:00
Iván Budnik
f9fc86593c Remove duplicate routing logic from Settings app
Also, remove unused MediaRouter2Manager references.

This is a non-functional change.

Bug: 192657812
Test: Presubmit
Change-Id: I72f5f40e157cea922ad40a2602fba881572fb708
2023-07-19 15:58:39 +00:00
Iván Budnik
470b661c82 Inline shouldDisableMediaOutput into Settings app
This allows the removal of a MediaRouter2Manager reference in
SettingsLib. Eventually, the inlined methods should be replaced with an
appropriate long-term alternative through SettingsLib.

This is a non-functional change.

Bug: 192657812
Test: Presubmit
Change-Id: I9f5dd6720fd95389335fec9e0689a40d88d30d46
2023-07-17 10:16:42 +00:00
Treehugger Robot
3365eb3e7a Merge "Improve volume slider" into main 2023-07-10 10:27:21 +00:00
Mill Chen
c69899ccef Improve volume slider
In the Settings, the Preference#onBindViewHolder will be invoked
3 times when a preference is getting highlighted. This caused that a
disabled volume slider becomes enabled after getting highlighted.

This change is to optimize the init method of VolumeSeekbarPreference
to speed up the initial process and fix the unexpected behavior.

Bug: 275352565
Test: manual test and robotest pass
Change-Id: I77f28386f6d6e4a45297f1ca7bcbaf16ed6136a4
2023-07-07 20:52:13 +08:00
Mill Chen
45d9e390b2 Fix do not disturb bypass user restriction
Do not disturb search result can still switch on/off when users are
restricted by DISALLOW_ADJUST_VOLUME. The DND search result is presented
by slice and there was no user restriction check when creating DND
slice, which caused DND search result can access. To prevent DND from
being access if user restriction is enabled, adding user restriction
check during creating the DND slice.

Bug: 242846154
Test: robotest pass and manual test
Change-Id: I897a99e9dda2f9f84365d96841a4c4f4cf975331
2023-07-07 20:25:18 +08:00
Michael Mikhail
48faaab788 Merge changes from topic "cherrypick-volume-gar-chain-" into udc-qpr-dev am: c156b6c427 am: 0d1b67b73e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23830401

Change-Id: I5793b74a6737ad920bbdf1dd49667adf231b2e5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 14:34:07 +00:00
Michael Mikhail
c156b6c427 Merge changes from topic "cherrypick-volume-gar-chain-" into udc-qpr-dev
* changes:
  Trigger talkback for notification volume change
  Add content description to volume title in settings.
2023-06-30 12:56:45 +00:00
Matías Hernández
e20f52a05a Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev am: 4d34eb2c7a am: aaddfd88e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726247

Change-Id: I8fc3a7b239ce0545b34eafc860df72a42cfd2e05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 18:39:16 +00:00
Matías Hernández
412fc3e2c4 Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev am: 4d34eb2c7a am: 143d105dc9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726247

Change-Id: I71f428e90b132c4282827b698623ee1d43c0f7c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 18:35:53 +00:00
Matías Hernández
4d34eb2c7a Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev 2023-06-28 16:42:13 +00:00
Michael Mikhail
7c9958aafd Trigger talkback for notification volume change
Triggers talkback to say the content description of the title of
notification volume when notification volume is set to vibrate or silent
mode.

Fixes: 285453719
Fixes: 285455826
Test: manually checked when the ring volume is set to 0% and when the
notification volume is set to 0%. Check the video in the bug link.

Change-Id: I4bd65bdbfa41793fc8e32c295185363ca36cc0d7
2023-06-27 17:42:11 +00:00
Michael Mikhail
2f393303c9 Add content description to volume title in settings.
Adds content description that is announced by talkback when a11y focus
is on volume preference. This improves talkback announcement when view changes.

Fixes: 285529113
Bug: 285455826
Fixes: 285487766
Test: atest VolumeSeekBarPreferenceControllerTest
Test: atest VolumeSeekBarPreferenceTest
Change-Id: Ibe80b4b1d489dc058df1cc79c96b034d5ddc6e56
2023-06-27 17:32:01 +00:00
Evan Chen
7f12ecfc00 Merge "Make sure work profile app cant enable notification listener services" 2023-06-21 20:24:09 +00:00