OSDN Git Service

Remove badges when launcher loses notification access
authorTony <twickham@google.com>
Mon, 13 Feb 2017 18:17:37 +0000 (10:17 -0800)
committerTony Wickham <twickham@google.com>
Tue, 21 Feb 2017 16:44:28 +0000 (08:44 -0800)
commitbe3c7d0c56fe35e8822c4bb5ee22ad44ed504850
tree8e6cbabcfc00bcf33e6c51a431881ea9c82171e8
parentdd88dd16c5419e2620e4e9a7200fc8aa4ca21f0e
Remove badges when launcher loses notification access

- NotificationListener.getInstance() has been changed to
  getInstanceIfConnected() (same behavior as before).
- When starting launcher, we send a full refresh of badges
  regardless of whether the NotificationListner is connected.
  If it is not connected, we pass an empty list for the
  active notifications, so that all pre-existing badges are
  removed.

Bug: 35221052
Change-Id: If920317f10814c010e02b5a30ce86a58ac7bc61c
src/com/android/launcher3/notification/NotificationListener.java
src/com/android/launcher3/popup/PopupDataProvider.java