Commit Graph

50 Commits

Author SHA1 Message Date
Julia Reynolds
a0482aa58a Merge "Sometimes there's no advanced settings" into oc-mr1-dev am: a639e32289
am: b0f3f6ce05

Change-Id: I188274147f7a4a5963e385a98adcef47e45d7069
2017-09-21 11:39:22 +00:00
Julia Reynolds
a25e54fdf6 Sometimes there's no advanced settings
Test: manual
Change-Id: Iea69ee04f36be51d073bbbd2c0d643c986eb8e89
Fixes: 65964886
2017-09-20 10:00:03 -04:00
Julia Reynolds
97942ca832 Merge "Properly show/hide advanced settings" into oc-mr1-dev am: 12c9d6d65a
am: fa3fa3483e

Change-Id: I9cab11035c64975b45e1c3d99bd707a07b6c693e
2017-09-06 18:42:36 +00:00
Julia Reynolds
bd42fe5880 Properly show/hide advanced settings
Change-Id: I31f6f877f1945187a6f19e1b383bd3755656fb9b
Fixes: 65375390
Test: manual
2017-09-06 10:36:22 -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
qqzhou
467aad4219 Merge "Settings: Fix NPE in ChannelNotificationSettings" into oc-dr1-dev
am: 2c2b6b48de

Change-Id: Id7c3417b82cd6f814f5ffbdd993a8c22be1c7a81
2017-08-09 22:41:12 +00:00
qqzhou
c18c517467 Settings: Fix NPE in ChannelNotificationSettings
java.lang.NullPointerException: Attempt to invoke virtual method 'int
android.app.NotificationChannel.getImportance()' on a null object
reference at com.android.settings.notification.ChannelNotificationSettings.
onActivityResult.

Change-Id: I3ec7b51e2533dc108b1a14c151e3ad70d22113e5
CRs-Fixed: 2068192
Fixes: 64116799
Fixes: 64134707
Test: monkey
2017-08-09 11:38:58 -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
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
bbd4fc124a Limit unconfigurability to specified channels.
Bug: 62426259
Test: Unit test in NotificationBackendTest.java
Change-Id: I79d069cee0b641d520b02f8a25751ec3e0d4632d
2017-06-12 13:44:38 -04:00
Alison Cichowlas
5cdcb40cd3 Merge "Disallow buzz/beep/disturb changes for notifications with locked importance." into oc-dev am: 3efc502840
am: 5698552021

Change-Id: Ib0a9db86ea0191c4cd487842eb9ce49b9e6db2e0
2017-06-02 17:02:30 +00:00
TreeHugger Robot
3efc502840 Merge "Disallow buzz/beep/disturb changes for notifications with locked importance." into oc-dev 2017-06-02 16:46:52 +00:00
Alison Cichowlas
8ad2fa6865 Add group name into channel summary, if applicable.
Bug: 36642898
Test: ran integration & robo tests (no new failures); verified manually with apps with channels & without.

Change-Id: I16a255b0e5d929f4485d3725bd18179e6f411c03
2017-06-01 17:04:36 -04:00
Alison Cichowlas
9f36db1f4c Disallow buzz/beep/disturb changes for notifications with locked importance.
If mAppRow.lockedImportance (which comes from the whitelist config_nonBlockableNotificationPackages), don't allow sound, vibration, or override dnd to be changed.

Bug: 38480212
Test: manually verified for now
Change-Id: I04aa7f15f2480472ec6ee487472098e81ab3d99f
2017-06-01 10:52:15 -04:00
Alison Cichowlas
2280afc54e Add group name into channel summary, if applicable.
Bug: 36642898
Test: ran integration & robo tests (no new failures); verified manually with apps with channels & without.

Change-Id: I16a255b0e5d929f4485d3725bd18179e6f411c03
2017-05-31 15:12:25 -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
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
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
Julia Reynolds
c68ae0b9fd Channel settings updates
- Update master switch preference to store enabled state in case
it's set before the view holder is bound
- Update master switch preference to prevent disabled switches
from being toggled
- Show an importance summary for max importance
- properly handle null notification sounds

Change-Id: I395b95b76d2a3c1c94b41d1c2720bb0cf1cae917
Fixes: 36920159
Fixes: 37421928
Fixes: 36939825
Test: RunSettingsRoboTests & manual
2017-04-17 14:42:09 -04:00
Fan Zhang
be6fab0135 Update action bar style in app header UI.
- Update background color of actionbar
- Remove elevation of actionbar so it appears to be the same entity as
  app header.
- Add a shadow below app header view. We can't set elevation on app
  header unfortunately because that will add shadow all round the view,
  but we only want shadow below it.
- Updated app icon size/text size per to match UI spec.

Change-Id: I63d7fa42b859a008fa662aaf19848cd40529c2ff
Fix: 37207527
Fix: 37079248
Test: visual && make RunSettingsRoboTests
2017-04-17 09:30:40 -07:00
Julia Reynolds
18fcc05224 Notification sound field updates
- Show default and silent options
- Don't also update the default notification sound
- Display a better summary in case the sound isn't in media store

Change-Id: I42d537657a7bbddb8a1ce41fd03b8e5847899a82
Fixes: 36734113
Fixes: 36849670
Test: manual (silent sound, default sound, normal sound, private sound)
2017-04-11 16:57:57 -04:00
Julia Reynolds
521c8751b3 Show channel description.
Test: manual
Change-Id: I0965b0ad2c64571a01a5f221f8d344c60d54b53d
2017-03-17 15:10:29 -04:00
Julia Reynolds
8973e2786d Notification channel settings updates
- Show a deleted count instead of individual deleted channels
- Make the link to app settings more prominent
- Reload settings onresume

Change-Id: I4f493181194943310ba536eb2bca270cec7cafce
Fixes: 36119790
Fixes: 36191444
Test: manual
2017-03-16 14:31:00 +00:00
Julia Reynolds
2194f3db37 Display channel/group names only.
Test: manual
Change-Id: I7da68f71ddb78f3150ebc64af40310de65cd010c
2017-03-16 14:21:56 +00:00
Julia Reynolds
dcee38d02e Prevent whitelisted apps from blocking and silencing
Change-Id: I34cb5c2c59d56b68ed1500c8c79cd65676c0af25
Fixes: 35841524
Test: manual
2017-03-13 18:46:03 +00:00
Doris Ling
f2cf2aea37 Remove code that check for dashboard feature.
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
2017-03-07 11:15:03 -08:00
Julia Reynolds
3327eac198 Show localized channel names
Test: manual
Change-Id: I85d60e564aeff8074cdb8138fe7ac1c078be986a
2017-03-02 10:35:33 -05:00
Julia Reynolds
e971015fd9 Link back to app settings from channel page
Test: manual
Change-Id: Ieb1118bd662a662bd34027f2ef44b420d4c94183
2017-02-09 10:08:52 -05:00
Julia Reynolds
6f57f2c2af Notification app screen updates
- Load channels asynchronously
- Add importance summary & block/unblock toggle for channel list
- Change channel list headers and sorting.

Test: manual
Change-Id: If024c741df4d85227055563d5bbc8210705c420b
2017-02-08 14:49:01 -05:00
Julia Reynolds
978ec53d21 Api change.
Test: make -j32
Change-Id: If5f191b3832d46fd9f50eab51d1a80ea2a76fcad
2017-02-06 15:29:17 -05:00
Julia Reynolds
893b7d075f Audio attributes
Test: manual
Change-Id: I4f298019a42520370a3867e332274abe299cff2d
2017-01-27 15:19:11 -05:00
Julia Reynolds
694928883d Let extra apps launch channel settings.
Test: manual
Change-Id: I689c0b35224dffc306ecbfa6f25ad3f072cd4dba
2017-01-25 12:43:29 -05:00
Julia Reynolds
1f178a9ed1 Notification settings updates
- Add 'show badge' for apps
- disable deleted channel rows
- Add an importance reset for pre-O apps

Test: manual
Change-Id: Ic32415497fe48a17f6cdb9aace37e35f9388195a
2017-01-20 09:38:33 -05:00
Julia Reynolds
d43440a555 Cannot have badge only channels.
Test: manual
Change-Id: I564f6b7e076a10847bd7f48c59a0de095180ea92
2017-01-06 15:53:52 -05:00
Julia Reynolds
d6835a20fc Support showing notifications as badges.
And remove unneeded app level settings.

Change-Id: I88f506b0704195181d1748a3135f8ee0f39b774f
Test: manual for now. will add tests when have real mocks for the pages
2016-12-20 13:07:04 -05:00
Julia Reynolds
7270be09d5 Method rename
Test: make
Change-Id: Iec3a811004183c2691dc6776c7f3b620e60e4872
2016-11-23 11:33:29 -05:00
Julia Reynolds
35476d12d1 Ringtone -> Sound
Test: make -j32
Change-Id: I53864e877e94ff1560f8e9637a87daf7b5118398
2016-11-16 09:45:23 -05:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Julia Reynolds
ec767cc440 Channel updates from users lock fields from interference.
Also some apis have changed.

Test: manual, modify settings and check policy xml.

Change-Id: I967cb1fb30d8d400bdc0f3aa92fa07b4c87ddcf5
2016-10-31 15:16:28 -04:00
Fan Zhang
fdb833873a Use new app header in more screens.
- This covers app data usage settings, power usage details
- Addded helper method on AppHeaderController to build the header as
  Preference because every fragment needs to do this anyway.

Bug: 32442716
Test: RunSettingsRoboTests

Change-Id: I6d38321b867154f8fb5194b993d118bcdbbfedc9
2016-10-28 17:16:39 -07:00
Fan Zhang
1ff25ba7e6 Modify AppHeaderController to provide UI for notif settings
- The AppHeaderController is no longer a singleton. Each time appheader
  should be updated we will create a new controller. It acts as a
  builder/mutator, user provides customizable inputs, and the controller
  will bind everything to UI when calling done().

Bug: 32442716
Test: RunSettingsRoboTests
Change-Id: Icfc5bcd8bc170a02b57432d864eaddf71db0d5b4
2016-10-27 17:23:33 -07:00
Julia Reynolds
b5ec2d71a2 Add notification channel settings.
If a user has set a preference at an app wide level, it cannot be
undone at a channel level, but channels can be more restrictive.

Tests: changing settings for apps and channels.

Change-Id: I7907b8179ffc24d68197c917f182e63d8e1ff7a7
2016-09-15 21:46:17 -04:00