Commit Graph

1717 Commits

Author SHA1 Message Date
Julia Reynolds
f3b9bf55a9 Move zen rule deletion
To a non-exported component

Test: manually delete a rule in Settings
Fixes: 233607507
Change-Id: I6c4ac930eb62a2068582021d0ad16b93fbc9bdd3
2022-07-21 14:54:42 -04:00
Julia Reynolds
e90507373c Improve App notification loading
1) Use UiBlocker, for better animations for apps with a lot of channels
2) Only load data in onResume, because the data loading step in some
of the controllers is expensive

Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.notification"
Test: load small channel and large (6000ish) channel app pages
Test: load individual channel pages
Test: load in-app channel shelf UI
Fixes: 215072888
Change-Id: I9a1c96f75b02f94b3ffc529d17d9c0cad7752de1
2022-07-20 15:27:52 +00:00
Chaohui Wang
80a11a251e Remove the redundant constructor of SuggestionFeatureProviderImpl
Fix: 175167313
Test: robotest
Change-Id: I7ebbaf92398a8300971d592e2ee7a6e0d82c1d2f
2022-07-13 03:44:26 +00:00
Ronish Kalia
9e4f2478dc Merge "Add support for directly opening ringtone picker" 2022-06-07 16:15:18 +00:00
Zhe Song
0f1f999c3f Fix AVAILABLE constant to be search indexable for Enhanced Notification.
AVAILABLE = 0 means search indexable, rather than 1.
Deleting the line so that the correct definition in parent class BasePreferenceController will be used.

Test: make RunSettingsRoboTests

Change-Id: I315dcb51f46788dd167424aaeff09112b06590ff
Bug: b/232947022
2022-06-07 05:12:27 +00:00
ronish
bbb49f38c3 Add support for directly opening ringtone picker
This is required for tiffin usecase wherein a tap on ringtone
icon should redirect the user to this phone ringtone picker

Bug: 216835089
Test: Tested manually
Change-Id: I9a070ab0d082c680885575478a56c43761d15c70
2022-05-31 15:51:56 +00:00
Chaohui Wang
8a701766fb Merge "Fix Conversation page flickers" into tm-dev am: 7dc1aec524 am: 6c2ffc2220 am: 447f77c07d am: a64429b8e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18475672

Change-Id: I032de9c1b368c7a7c4743fd4695511f063bc0598
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 15:41:25 +00:00
Chaohui Wang
bd369cfee5 Fix Conversation page flickers
In this page, 3 conversation lists are implemented by the
ConversationListPreferenceController, these lists updates its contents
in updateState(), which is after the preference screen view created.
So when the first time this page is showed, animations of added contents
will be shown.

The improvement is when the first time, update the list in the
onCreate(), which is called before view creation, instead of the
updateState().

And also do the same thing for RecentConversationsPreferenceController.

Also, to reduce latency,
1. Because currently there are duplicated calls in
NoConversationsPreferenceController to check whether conversations are
exists or not, by removing the duplicated calls and reuse the result
from other controllers, the latency could be reduced.
2. Currently, there are seperated api calls, the
mBackend.getConversations(false) in AllConversationsPreferenceController
and the mBackend.getConversations(true) in
PriorityConversationsPreferenceController, use one
mBackend.getConversations(false) in ConversationListSettings to improve,
this does not change the behavior because the result is filtered in
matchesFilter() both before and after.
3. Currently, we sort conversations first then filter them, change to
filter first then sort to reduce latency.

Fix: 215073227
Test: visual check & robo tests
Change-Id: I028a7fabbbf64cf5627e6615372282a36eb784e5
2022-05-25 10:43:16 +08:00
Chaohui Wang
008b8fdb5d Merge "Fix Conversation page flickers when back" into tm-dev am: 0dc89bc85c am: 0d6569d199 am: 456a27bee3 am: 3fdd89556e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18490674

Change-Id: Iaee1a5e9407ff497682a3f0d79cb3851c24e04ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 03:05:19 +00:00
Chaohui Wang
d30d1a74e1 Fix Conversation page flickers when back
In this page, there are 3 items flickery when back from conversation
page,
 - The summary under priority conversations
 - The summary under non-priority conversations
 - The clear all button under recent conversations

This is because there is no key on these 3 preferences, when preference
screen updated in onResume(), preference screen thought these 3 are new
items, shows an animation for them. Add keys to them to fix.

Bug: 215073227
Fix: 232341970
Test: visual check
Change-Id: I24691cfa89a624c1741786499b47ede87d518d1a
2022-05-20 16:25:00 +08:00
TreeHugger Robot
7b7b35f264 Merge "Update Spatial audio settings page" into tm-dev am: 6993aa86eb am: 3d05ca096b am: 86720818ed am: 0d443604d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18456662

Change-Id: Ibd86f1fcd3ddf655e49f3dc97c78d213b00e9ca7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 01:52:15 +00:00
Alan Huang
bb3f56fc02 Update Spatial audio settings page
Bug: 229048602
Test: local build and verify page
Change-Id: I096eae1bd0ca3acd52e6025963a08b0d60cb8d74
2022-05-18 09:21:01 +00:00
TreeHugger Robot
00a7bdb6b5 Merge "Update the 'is valid contentIntent' check" into tm-dev am: ee56c24ad8 am: 73823ec232
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18376072

Change-Id: I1feb626a8f2a99d18e8754588e48b4b275c172a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 01:15:05 +00:00
Julia Reynolds
688c5c900d Update the 'is valid contentIntent' check
Existing check required that the original request code be 0,
but that's not actually required for the intent to work on this
page

Test: tap on email notification in history, be brought to email
page and not main email list page
Fixes: 232495202

Change-Id: I120022535ddbde19003f2db6f1b81a983d00789d
2022-05-13 17:37:52 +00:00
Julia Reynolds
a384ff7560 Merge "Use NMS calculation of fixed importance" into tm-dev am: 9372f3b4e3 am: 7a5c4459fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18288425

Change-Id: I91c3c1e7ffd221559a577a9b26314b874ac4ac08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 12:50:44 +00:00
Julia Reynolds
2011588b16 Use NMS calculation of fixed importance
Rather than recalculating it again. Also align logic on
listing and details pages.

Test: NotificationBackendTest, NotificationPreferenceControllerTest
Bug: 231662091
Fixes: 231815850
Change-Id: If9572766666620008afb839ecb0828ace8d6073d
2022-05-11 16:38:04 +00:00
Julia Reynolds
68aaf15888 Merge "Remove notification permission feature flag" into tm-dev am: 23a85a1f96 am: 73a0bada43
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18164272

Change-Id: I6fee068537f09ae083224daf6305bd5f72511f16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 22:14:13 +00:00
Raphael Kim
f6da68723e Merge "Extract app label from component name in notification access confirmation UI" into tm-dev am: c6f7599158 am: 5d3aa0eb85
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18151002

Change-Id: I229b884ac4be926205215660c530e5d72a971dc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 21:53:51 +00:00
Julia Reynolds
23a85a1f96 Merge "Remove notification permission feature flag" into tm-dev 2022-05-09 20:16:09 +00:00
Yuri Lin
7fa51a12fa Merge "Change zen mode schedules page rule handling" into tm-dev am: 9fb3262a1a am: 24c9dd2808
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18189363

Change-Id: I7e0648c0c1f93a0761c917573f40508a1eb49d92
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 19:37:27 +00:00
Raphael Kim
c6f7599158 Merge "Extract app label from component name in notification access confirmation UI" into tm-dev 2022-05-09 17:55:06 +00:00
Yuri Lin
9fb3262a1a Merge "Change zen mode schedules page rule handling" into tm-dev 2022-05-09 14:56:13 +00:00
Andy Hung
698878bee1 Merge "SpatialAudioSettings: Fix state check" into tm-dev am: 3198bd8cec am: 1c72b9cbf4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18194648

Change-Id: Ide394d7b28469e8e0b47c8584928bd88791d4e4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 04:12:59 +00:00
Andy Hung
3198bd8cec Merge "SpatialAudioSettings: Fix state check" into tm-dev 2022-05-09 04:06:49 +00:00
Andy Hung
482ad196cc SpatialAudioSettings: Fix state check
Test: enable/disable spatial audio settings, check status
Bug: 231499448
Change-Id: Idf05fde45b17b95d9fb611cacd8d11c471a12fe4
2022-05-05 20:25:12 -07:00
TreeHugger Robot
a5470e4c24 Merge "Fix Settings getProfileIdsWithDisabled usage" 2022-05-06 03:16:37 +00:00
Yuri Lin
7cbba753dc Change zen mode schedules page rule handling
The approach of reloading all rules (and recreating all ZenRulePreferences) every time the rule set changed causes the switches on the page to stop working.

This change keeps the ZenRulePreference around as long as the rule itself is around and keeps it updated, while re-adding the preferences to the PreferenceCategory if needed due to rules changing.

Fixes: 229879326
Test: manual, ZenModeAutomaticRulesPreferenceControllerTest
Change-Id: I4eba41e8252cedd87ac866e4b97513970ca2d94a
2022-05-05 14:24:42 -04:00
Jonathan Scott
b7f4f56cad Add missing settings strings.
Also re-enable and fix tests.

Test: manual
Fixes: 226183482
Fixes: 218799125
Fixes: 219375624

Change-Id: I9605f1f4e2e834baf63e015e96639567c5481b5f
2022-05-05 09:12:59 +00:00
Julia Reynolds
4138b6f68a Remove notification permission feature flag
Tes: Settings notification robotests
Bug: 231344755
Change-Id: I3e35eede94ea88bee4c2e7fc03ce998ed68b4f81
2022-05-04 16:24:23 -04:00
Raphael Kim
ff34195604 Extract app label from component name in notification access confirmation UI
Bug: 228178437
Test: Manually tested on POC
Change-Id: I8613d9b87a53d4641c0689bca9c961c66a2e9415
2022-05-04 19:41:13 +00:00
Chaohui Wang
b3db0000a6 Merge "Add the jank detection to Settings sliders" into tm-dev 2022-05-04 02:23:14 +00:00
Chaohui Wang
f311566b85 Add the jank detection to Settings sliders
- Currently most the sliders are implemented by
   com.android.settings.widget.SeekBarPreference.
 - Volume ones are implemented by VolumeSeekBarPreference, which resets
   the OnSeekBarChangeListener, so need special handling.
 - PointerSpeedPreference is standalone, added separately.

Bug: 230285829
Test: Verify trace via jank developer guideline.
Change-Id: Ia2978df196676ad6675d2834f6af6cb2aa9094cf
2022-05-03 11:06:34 +00:00
changbetty
f31b5769d7 [LE] Launch the dialog for the user to broadcast or find broadcast
- Launch the broadcast dialog from entry point in Media Volume Slice

    - Fix the broadcast dialog to follow the dialog style

    - Start broadcast and launch the MediaOutputBroadcastDialog from
      broadcast dialog

Bug: 229577518
Test: manual test
Change-Id: I1329b3f35b03afc441142494df883ae17f373656
2022-05-03 03:16:08 +00:00
Adam Bookatz
8311f68065 Fix Settings getProfileIdsWithDisabled usage
In two places, Settings uses getProfileIdsWithDisabled intending to
restrict itself to *managed* profiles, but actually allows for any type
of profile.

Since the declared intent is to only deal with managed profiles, we
update the code to only consider managed profiles.

On devices that only have managed profiles (currently almost all
devices), this cl is a no-op.

Bug: 230495929
Bug: 230534572
Bug: 170249807
Test: com.android.settings.UtilsTest
Test: make RunSettingsRoboTests -j
Change-Id: Id04d45839ef61080b00ca2f91525718cb3a85120
2022-04-27 18:34:07 -07:00
changbetty
2818dedc28 [LE] Launch the MediaOutputBroadcastDialog when the current device is
broadcasting

Bug: 229577323
Test: Manual test
Change-Id: I0bfc9ecac2a0b6d68d41c4d17d4642f927581ccb
2022-04-26 07:47:23 +00:00
changbetty
d1d9798a5d [LE Audio] Add entry point in Media Volume slice for broadcast sink
Bug: 228274114
Test: make RunSettingsRoboTests
Test: Manual test
Change-Id: I331232c30291348faf7166d4de8060a1cfe12bff
2022-04-25 02:42:46 +00:00
Chaohui Wang
fbafdbdd8f Merge "Fix title clipped for "Custom settings for schedule"" into tm-dev 2022-04-14 23:22:19 +00:00
Julia Reynolds
87bb1b34c5 Add missing extra when launching apps
As promised in the api docs

Test: AbstractZenModeAutomaticRulePreferenceControllerTest, view
schedule DND page
Fixes: 221423986

Change-Id: I7ddc1b112950da225afa2ba13ebf5df481922177
2022-04-12 16:20:01 -04:00
Julia Reynolds
4d46dddbe7 Fix some history issues
- Work profile notifs not showing
- Work profile icon is too big

Fixes: 228397748
atest: manually view work profile notifs in history
Change-Id: I76f7ad37bcfcf4ee7c909516f456920b7e19c541
2022-04-12 11:14:30 -04:00
Chaohui Wang
3b3e66c780 Fix the flow for ZenCustomRuleSettingsBase
updateRule() should be called before super.onResume() because rule will
be used in updatePreferenceStates() in super.onResume().

This is follow up of Change: Ief9963091847d58654f26851616563ae910716a5

Bug: 226523115
Test: manual
Change-Id: I2fe0cfb2b4a76273283bb2d3aca629b5d647db91
2022-04-06 17:22:12 +08:00
Chaohui Wang
5d0057615a Fix title clipped for "Custom settings for schedule"
Set rule to header, switch and action buttons controllers before their
isAvailable() is called in onCreate().

Fix: 228262001
Test: manual
Change-Id: Idc0ea779ab768497a8426ac847c4bbb2c6c4faea
2022-04-06 13:57:48 +08:00
Chaohui Wang
bab799899d Fix Flicker for ZenCustomRuleSettingsBase
Fix the following flicker on pages under:
Notifications -> Do Not Disturb -> Schedules -> [One Schedule]

1. Do Not Disturb behavior
2. (1) -> Create custom settings for this schedule
3. (2) -> Calls
4. (2) -> Messages
5. (2) -> Display options for hidden notifications
6. (4) -> custom

Fix: 226523115
Test: On Pixel Phone
Change-Id: Ief9963091847d58654f26851616563ae910716a5
2022-04-04 22:22:10 +08:00
Alan Huang
2f2b648693 Fix group cast volume slider not disabled after switching to group
devices.

Test: manual build and verify

Bug: 222443976
Change-Id: Ie9f126bb2f4cbc3c6148f41092ada4bfdfa29f99
2022-03-24 08:12:40 +00:00
Jenhou (Alan) Huang
e8ca43b239 Merge "DO NOT MERGE Add setting page for the Spatial audio" into tm-dev 2022-03-21 01:59:31 +00:00
Alan Huang
616b0925ac DO NOT MERGE Add setting page for the Spatial audio
The Spatial audio settings page control the state for the phone speaker
and the wired headphones

Test: make RunSettingsRoboTests

Bug: 220811398
Change-Id: I49e3fab48186d09357a8481652bdccb4aa5d044a
2022-03-20 15:55:53 +00:00
kholoud mohamed
de78149c16 RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I4775d7741c7819fd811c3fc4eda1636b1e04b398
2022-03-17 17:37:45 +00:00
Yuri Lin
42e400e1cd Merge "Make icons show up on DND bypassing apps page" into tm-dev 2022-03-08 22:35:43 +00:00
Yuri Lin
e8e40609df Make icons show up on DND bypassing apps page
This change uses the app icon cache to either get the icon from cache or retrieve it on a background thread. The methods previously used to get app icons no longer work in T.

Bug: 222323742
Test: manual
Change-Id: I4960a9297d546cac088e5969a8903391ed994bd4
2022-03-08 14:57:54 -05:00
Julia Reynolds
856cc0da65 Fix app notification toggle
Test: CTS Verifier 'Notification Listener Test'
Bug: 222372861
Change-Id: I060b8b9bf7b749736596676a3d98cd609dc65846
2022-03-08 09:18:56 -05:00
Julia Reynolds
40caac3c9e Merge "Disable app toggle for some T+ apps" into tm-dev 2022-03-01 13:42:26 +00:00