Commit Graph

132 Commits

Author SHA1 Message Date
Julia Reynolds
c400ce3c80 Move channel listing into a pref controller
And a hidden preference category. This makes
hiding/showing the list a lot cleaner and also allows more
of the code to be tested.

Also delete some unused code that no longer complied after
this refactor.

Fixes: 133443871
Test: atest
Change-Id: I4a5fe0e075019bae2df44a0a9dcec26a40ee6d12
(cherry picked from commit a295d71c94)
2019-07-26 19:24:43 +00:00
Julia Reynolds
5c097c6d3c Redesign channel listing and channel page
Test: atest
Bug: 127796543
Fixes: 129452112
Fixes: 129453207
Change-Id: I1d520c9e35860303235b7ffbb18a76cbc4f4b8bc
2019-04-18 18:51:23 +00:00
Julia Reynolds
1507891548 Use correct key value
Test: manual with pre O and O+ apps
Fixes: 130179408
Change-Id: I6a3f815dc441f99509eb334f028f42948e8f9c9e
2019-04-10 17:53:29 +00:00
Julia Reynolds
4e48da99a9 Move bubble settings to their own page
To make room for graphics/longer descriptive text

Test: robotests
Bug: 129068779
Change-Id: Iac6ea43bd3a0cddc487ff3d1bbd8f35142294d01
2019-03-28 21:25:05 +00:00
Fan Zhang
9d98344122 Disable draw overlay for most of Settings.
Fixes: 120484087
Test: robotests
Change-Id: I1f7c8e83bd5054525bde5ca35fac55b7c9586c7c
2019-03-18 14:54:39 -07:00
Julia Reynolds
4253be9191 Update design of channel pages.
Test: atest
Bug: 127796543
Change-Id: I4fabeafe2602c341554959303e67bc69c8817a8f
2019-03-15 10:21:24 -04:00
Raff Tsai
fe86a2a51f Do not allow draw on top for App notification settings
Fixes: 119115683
Test: manual
Change-Id: Ib7b878a23b4a99171c58b5de992fb87feca8a28a
2019-03-08 16:19:30 +08:00
TreeHugger Robot
6dca5ef8e9 Merge "Fix doubling of channel listing" 2019-02-15 22:46:15 +00:00
Julia Reynolds
0b6d652d20 Fix doubling of channel listing
Test: toggle a notification group on/off
Change-Id: Ia93cf8084aee0c886a591301cba764975e5e0147
Fixes: 124384280
2019-02-15 20:42:24 +00:00
Julia Reynolds
7d914f509a Fix legacy app notification pages
Test: view legacy app notification page
Change-Id: Id0d7ac53bc0d9e4d7084bea7ff44d4d8a082cb74
Fixes: 124453411
2019-02-15 13:15:50 -05:00
Julia Reynolds
0c45775a5d Add settings for notification bubbling
Globally, as well as at the app and channel level

Test: atest
Bug: 123543052
Change-Id: I1668b592c5d175d77d6a38f35e7576d641175d44
2019-02-04 18:08:41 -05:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Julia Reynolds
241a192a10 Fix notifications crash
Change-Id: I75a34beb124de92c0d7d9033e3fe21dbdeb67ed3
Fixes: 112656503
Test: manual
2018-08-21 10:41:47 -04:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Julia Reynolds
5766d6e443 Collapse notification advanced settings
Leave footers visible outside of advanced

Test: visual inspection
Fixes: 77324998
Fixes: 38011858
Change-Id: I2d6fcb832b134bc97081f03a3ab38d593e943f76
2018-04-20 13:24:45 -04:00
Julia Reynolds
e2897aedf5 Fix crash on rotation
Load app/channel data early so that any open dialogs can be properly
reconstructed. Never call done on an entityheadercontroller with
an activity that's not yet started.

Test: robotests
Change-Id: Ib2b9f8f1985ef038959062204aaceff686f4ebcf
Fixes: 74114917
2018-04-19 10:17:23 -04:00
Julia Reynolds
f3290eafce Expand channel settings if coming from app
Test: manual inspection
Change-Id: I2ed7f5cc2355f27e0edf36a0d8ee23e418eafd99
Fixes: 77648459
2018-04-18 12:17:33 -04:00
Julia Reynolds
d7815fe18f Notification settings updates
- smaller icons
- text update
- fx header
- fix category header

Test: make -j RunSettingsRoboTests

Change-Id: If822d6db31a8dccf20ee88182cda1aee34aa7675
Fixes: 77325154
Fixes: 77323406
Fixes: 77324677
Fixes: 74408368
2018-04-09 17:24:09 -04:00
Fan Zhang
f7843adabd More renaming in DashboardFragment
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936

Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
2018-02-23 16:56:30 -08:00
Julia Reynolds
18f14f10cf Notification settings updates
- Hide channels when a group is blocked
- Update importance strings
- Allow app blocking from 'recently seen'

Test: RoboSettingsTests
Fixes: 72879584
Fixes: 72882969
Fixes: 72831483
Change-Id: I99e001d3eb9eef52251cd50da191d33923335fcf
2018-02-06 09:15:20 -05:00
Julia Reynolds
4f3b556388 Notification settings updates
- Footer preferences were too dim
- Fix text and target on recently sent apps
- Make 'behavior' a dialog
- reorder settings on apps page

Change-Id: Idf8056bc77ead89fe2025bbde3346861e23a3c8d
Fixes: 72652526
Fixes: 72651810
Fixes: 72652024
Bug: 72651953
Test: make RunSettingsRoboTests
2018-01-30 16:59:12 -05:00
Julia Reynolds
1c542bbeb0 Remove unused intent.
Test: cts-verifier
Bug: 63927402
Change-Id: I0ae2f33f7e8f1cce9dbe8166b522eb9cbde4c8b5
2018-01-23 09:05:37 -05:00
Julia Reynolds
3527ef7c29 Notification settings updates
- Text changes
- Show channels on the app settings screen (again)
- Hide most of the channel settings under 'advanced' (note: this hides
  the footer preference(s) also, at the moment. the functionality
  to exclude those is coming in a later cl)
  - Add a 'show notifications' toggle for each app created group

Bug: 63927402
Test: make RunSettingsRoboTests

Change-Id: I9906ef943d05e1915061b59294a25d81c4e6cbb5
2018-01-02 15:34:58 -05:00
Julia Reynolds
ac3f7e80dc PreferenceControllers are the way of the future.
Migrates Notification settings (app level, group level, and channel
level) into PreferenceControllers (and most importantly:
PreferenceControllerTest)

Note: this removes the 'Advanced' preference group, but does
not yet use the standard system 'Advanced' grouping as it does
not currently support our use case (where we don't know how many
fields to show outside of 'Advanced' until onResume() and also
where we need fields to show below the 'Advanced' group).

Test: make RunSettingsRoboTests
Change-Id: Iddd1b4771922db322e5f73562e9d63ed077c5396
2017-11-06 13:50:26 -05:00
Alison Cichowlas
bff0e971ca Notification importance/selected sound conflict fixes.
- When you've selected "Silent" as your sound, update notification
importance messaging to match.
- When you explicitly move from a silent type of notifications to a
loud type, but have "Silent" selected as the sound, change the
sound to the default notification sound also.

Change-Id: I462785d593e1d6c7d1e87388aeee1bdcbcf6aa3d
Fixes: 63109928
Test: RunSettingsRoboTests, manual
2017-09-21 17:36:32 -04:00
Julia Reynolds
0c3f4bce57 Add settings page for notification channel groups
Bug: 63927402
Test: tests/unit/src/com/android/settings/notification/.*
Change-Id: Iebf7d8ba54f0cf5801a42f3161354d3cc5e5c848
2017-08-31 11:02:36 -04:00
Fan Zhang
75bee9bf98 App header cleanup
- Refactor the entity header layout to use LinearLayout and add id to
  content area
- Remove now unused AppHeader class
- Make entire icon+text area clickable and link to app info page
  Refactor the binding logic from bindButton to its own method.
- Remove unused MultiLinePreference

Fix: 62705377
Test: make RunSettingsRoboTests

Change-Id: I6db554695410e71b669f6fdba29d98fedc3364b9
2017-07-06 13:23:38 -07:00
Alison Cichowlas
7b0a8b6815 Notification settings update.
- Use "what happens" descriptors instead of priority level names in summary
- Group some settings under Advanced header.

Bug: 62705435
Test: make RunSettingsRoboTests; manual verification
Change-Id: Iac31575d894d7f3532c8e631ee9d77ee21830b29
2017-06-19 08:53:45 -04:00
Fan Zhang
fdcb8b1dc8 Hide app info button from app notification settings header
Change-Id: I10803e78fe4f30c2d84ec795c343ed660aab7762
Bug: 62708686
Test: visual and runtest --path AppNotificationSettingsTest.java
(cherry picked from commit 5d811c40d3)
2017-06-16 22:30:31 +00:00
Alison Cichowlas
665384a8eb Limit unconfigurability to specified channels.
am: 80fa6b5833

Change-Id: I63c40ae241f6891fa1e6b85a78dc78d2b918ca6d
2017-06-13 01:45:10 +00:00
Alison Cichowlas
80fa6b5833 Limit unconfigurability to specified channels.
Bug: 62426259
Test: Unit test in NotificationBackendTest.java
Change-Id: I79d069cee0b641d520b02f8a25751ec3e0d4632d
2017-06-12 23:17:11 +00:00
Alison Cichowlas
a90a144ef3 Merge "If two groups are posted to settings, remove old group and log." into oc-dev am: 9fa5e66a66
am: 59b4e5b6c4

Change-Id: I0661ae34df7dcca80b394e9751ce91dd2f5f25e1
2017-06-07 00:11:08 +00:00
Alison Cichowlas
130a028f33 If two groups are posted to settings, remove old group and log.
Bug: 62136650
Test: manual: set debugger in asynctask at line 110 to force
race condition, triggered task twice then released both.
also ran existing tests with no new failures.
Change-Id: I8508fe9f191ca6cd0bb6dfbc62d884420d3fd747
2017-06-06 17:02:23 -04:00
Julia Reynolds
d85ff59ce7 String changes
- channel summaries
- Notification listener name
- notifications app page title

Change-Id: I0745c06aad44bfa7636ee2b10be9387313093fe3
Fixes: 36529184
Fixes: 38178073
Test: manual
2017-06-05 11:05:43 -04:00
Alison Cichowlas
0f7e904dbe Merge "Delay adding app settings link until data fetch returns, to avoid reordering/visible misplaced "additional settings in the app" during transition." into oc-dev am: e811873b4e
am: f62c6372e8

Change-Id: Ic1434ccc7a4ec01957a7d1219fa5cf6cc1f84948
2017-06-02 18:52:33 +00:00
Alison Cichowlas
afe44799f7 Delay adding app settings link until data fetch returns,
to avoid reordering/visible misplaced "additional settings
in the app" during transition.

Bug: 62051521
Test: manual with transition scale turned to 10x sloooow.
Change-Id: I50666fbcb2a14344bbdbb2f4347c8470edb96619
2017-06-01 16:07:32 -04:00
Julia Reynolds
f1239e1b84 Merge "Allow some system channels to be blocked" into oc-dev am: 540e8f50e3
am: 166a994a4c

Change-Id: Ide3aeac0c328f08becc693795ef5553fa0c9a281
2017-05-26 15:02:40 +00:00
Julia Reynolds
3a77e1d4a0 Allow some system channels to be blocked
Test: manual
Bug: 38428796
Change-Id: If6853f1d847ade968d2bd3a7454ddce0fdda62f0
2017-05-25 14:26:58 -04:00
Fan Zhang
841d1d5aab Show shadow when entity header starts scrolling.
- Add a controller to manage add/remove onScrollChangedListener to
  recyclerviews.
- When recyclerview on each screen is scrolled to top, set actionbar
  elevation to 0, otherwise set it to non-zero.
- When screen is moved to background, detach the listener.
- Use the controller in entity header.

Change-Id: Iecf194d885098c98c392810f62893ae9189f3936
Fix: 37670670
Test: make RunSettingsRoboTests
2017-05-22 17:16:24 -07:00
Fan Zhang
d7414259d0 Move entity header controller out of application package.
Bug: 37669238
Test: rerun robotests
Change-Id: I54eb30f28fa0a88a6f0b97b53f9f1408320b5ce0
2017-05-18 16:36:32 -07:00
Fan Zhang
f5bd885a1d Clean up settings_entity_header layout.
update layout view IDs, and controller variable names to be more
generic.

Fix: 36734470
Bug: 37669238
Test: make RunSettingsRoboTests
Change-Id: Ib80827ae3eae6d01a600068b4a8a44b239c32511
2017-05-18 16:35:27 -07:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.

Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
     && make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
2017-05-12 11:10:46 -07:00
Julia Reynolds
2f0547c783 Notification settings, importance and pre-O apps
- Show pre-O settings for the misc channel, should the app still have it
(versus the full channel settings)
- Fix the importance summmary text in various places
- Update the color of the blocked description text
- Fix what fields appear/disappear based on blocked status and importance

Fixes: 38177887
Bug: 38120923
Fixes: 38012300
Fixes: 37923612
Test: manual, with an O app, a pre O app that has channels, and a pre-O
app with no channels
Change-Id: I42965b81b795e8fb427f857c7766fe5480a99f2e
2017-05-11 14:48:17 -04:00
Julia Reynolds
fc730aa947 Only show one copy of each preference
Fixes: 37912144
Fixes: 37909560
Test: manual, load app settings for legacy and upgrade apps from
inline settings, click (i), and click back.

Change-Id: Ieb96cca03f2596fd44cd33facafa3d4af1fbc24d
2017-05-04 10:10:22 -04:00
Julia Reynolds
38c16a9417 App & channel notification settings updates
- change 'block all' to an on/off switch bar
- update channel list summary text when notifications are
toggled on/off on app settings page
- Add 'off state' text
- change style of foot items
- change 'importance' from a dropdown to its own page

Bug: 37538972
Bug: 37479730
Fixes: 37541624
Fixes: 37549732
Test: manual

Change-Id: I0e5cc66ba539ce2b76b4ad6541bf6bfb5b58c373
2017-04-25 13:30:48 -04:00
Julia Reynolds
8da8951b4b 'Allow sound' = let the app decide
Bug: 37479730
Test: manual
Change-Id: Ia5073dd0ef79664229c5aff0b89e7ef36edb68ee
2017-04-25 08:53:26 -04:00
Alison Cichowlas
7f431e3cd1 In apps with no channels, provide settings for misc channel in top level.
Test: robolectric tests pass, plus manual verification
Bug: 36561295

Change-Id: I58872a41fab562787d85bade0552c7735d716e5b
2017-04-18 18:49:24 +00:00
TreeHugger Robot
526185c89b Merge "Channel settings updates" into oc-dev 2017-04-18 15:03:55 +00:00