History log of /packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3f7df53dda43d05c7a40ed8c4114b63189936ffe 14-Mar-2018 Jon <jonmiranda@google.com> Merge branch 'ub-launcher3-master' into pi-dev

Bug: 74794600
Test: manual test
Change-Id: Id34a70abfa5de9dd741848efa3b82fae608c0df0
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
6bb51f425bc90c4b7b434a758377c65462fd817c 04-Jan-2018 Sunny Goyal <sunnygoyal@google.com> Removing some unused code path

Change-Id: I16a651d77c6557b33f8389407a222f058a8168d4
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
00ac9202417cb5023b9990b2f6f33d321378ff26 10-Nov-2017 Sunny Goyal <sunnygoyal@google.com> Simplifying app icon popup

> Using a single linearLayout instead of multiple nested views
> Using clipToOutline for rounded corners instead of using canvas.saveLayer
> Removing nested view elevations and overdraw
> Using LayoutTransition for animating layout changes, instead of manually creating animators

Change-Id: I8e57092f52ca5a032a2756594fdd39788acc5a0d
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
f1fbc3fbe78997f141e2770221fe5ab1b1e68014 11-Oct-2017 Sunny Goyal <sunnygoyal@google.com> Converting widget panel into a floating view

> The widget panel is only inflated when needed
> Using the swipe up/down interaction for widgets tray
> Removing additional view wrappers from all-apps
> Widget tray is preserved across activity recreation
> Launcher no longer has WIDGET state, the actual code around
the states will be removed in a follow-up cl

Bug: 67678570
Bug: 67585158
Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
10a1bd0e652ec7ea3e3ee861fc0d72261a33a3fd 09-Oct-2017 Sunny Goyal <sunnygoyal@google.com> Converting PopupContainerWithArrow into a base class so that it is easier
to create other types of popup

Bug: 67585158
Change-Id: I966ae7bb90f941951b26feaf71b3ea30c3f3c0cc
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
f41edbe8751bdd92ec42cfa3b69ab9e33aac5b26 31-Aug-2017 Mario Bertschler <bmario@google.com> Install long-click action for apps that are not installed.

Bug: 65059282
Change-Id: Ifec3ac15c9cf52c456e695846eb91024b07fe333
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
0530e8c60809afa92b1aa907376f0553ad94d58f 27-Apr-2017 Tony Wickham <twickham@google.com> Support notifications with 0 count (show as dots)

- Show number if number > 0
- Show icon if number == 0 and a notification specified an icon to show
- Show a dot otherwise
- In cases of multiple notifications, stack a second badge behind the
first (visuals will be updated in future CL, as well as support
stacked dots)
- Folders always show dot if any app within has a badge.

Change-Id: I0a89059b0e0a0d174fe739c9da4f75fa18c0edfa
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
a7e1c1c08854930ddb4366698d5bf079ae0536f3 14-Apr-2017 Tony Wickham <twickham@google.com> Only add widgets system shortcut if widgets exist

Before we were adding it in a disabled state, and then enabling it once
widgets were bound (if widgets existed for that app). Now we load all
widgets when launcher starts so that we can use the values for the
purpose of animating the popup container. Then, as the container opens,
we reload widgets/shortcuts for that particular app and add/remove the
widgets shortcut if necessary.

Bug: 34940468
Change-Id: I64bd009442d10d3d1f9a977bdedfdb639a7dd193
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
2f54a1625ae031ffbb2a99a00c7b25de3c677828 03-Apr-2017 Tony Wickham <twickham@google.com> Small UI fix for widgets/app info shortcuts

- Switch order of widgets & more and app info.
- Start binding widgets after starting to update these shortcuts on the
UI thread, so that they will show up without waiting for the bind
logic, which can take a while. We already have a callback mechanism
for enabling widgets & more after widgets are bound, so this was how
it was supposed to work already.

Change-Id: I5f702f9c0814d30acf6298be309c6dc30727316e
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
26b1746593851e239bfff65ae7a69b809ad87b99 21-Mar-2017 Tony Wickham <twickham@google.com> Add support for system shortcuts in popup container

- Currently the system shortcuts are just widgets and app info
- As shortcuts, they live in ShortcutsItemView
- They are populated either as icons only (if there are deep
shortcuts) or as icons + text
- Widgets are disabled until binding them is complete (we request for
them to be bound on long-press now). We should revisit this.

Bug: 34940468
Change-Id: Ia51d002c3b3ede87658bdab57abfc3eeca1ed242
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
362106233919ff64cf462efe395f53c33a8ec4bf 25-Feb-2017 Tony Wickham <twickham@google.com> Use notification counts (instead of assuming all 1)

We still ignore group summary headers, which means, for example,
we won't get Gmail unread count. But single notifications that
have numbers associated, such as messages from a single contact
will be included in the badge count. So if you have 2 hangounts
threads, one with 10 messages and one with 8, the badge would
say 18.

Bug: 34939841
Change-Id: I20b9a857d91715e10c0da400a1cee209d7b837b8
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
2f5bb169154d25bc8c164f057117fb056ad2de96 24-Mar-2017 Tony Wickham <twickham@google.com> De-dupe shortcuts with the same id as the main notification.

- Pass NotificationKeyData, which includes the shortcut id, instead of
just the notification key from NotificationListener
- Remove the shortcut with the same shortcut id as the first
notification, if it has one, in PopupPopulator#sortAndFilterShorcuts()
- Add some unit tests

Bug: 36571718
Change-Id: I308941b34c525b34686583476e3f82ccb8b7e2d8
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
ff7364a8837cf228b936555745dea7ba1648a214 13-Mar-2017 Tony <twickham@google.com> Remove badge info from map when count is 0.

Bug: 35803112
Change-Id: I680b92aac24bf5d083d64e9a4cd35471637a3809
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
be3c7d0c56fe35e8822c4bb5ee22ad44ed504850 13-Feb-2017 Tony <twickham@google.com> 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
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
988f34b7f2bb7e57d99ec19fbe9b7024da1fe52f 10-Feb-2017 Tony Wickham <twickham@google.com> Ensure that filtered notifications are removed from BadgeInfo.

There are cases where a BadgeInfo can contain a key that is later
used for a notification that should be filtered out. So instead
of simply not sending filtered notifications to PopupDataProvider,
now we explicitly send them and remove the corresponding key from
the BadgeInfo if it exists.

Bug: 35239510
Change-Id: I9532f47b1f07b44234f8707657b15b0de519b347
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
580edcf529b0755f2bba442e97dd02d8cdad3b82 09-Feb-2017 Tony Wickham <twickham@google.com> Create a singleton HashMap instead of using Collections.singleton()

The Set returned by Collections.singleton() doesn't support all
operations, causing crashes in certain situations (namely, whenever
a notification is updated rather than added or removed).

Change-Id: Ie104b7f99c4a32db5f1f7e43ec3775d34dc26ce1
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
a799bed8038ae97ee8985bc4475756391f7f4f0c 31-Jan-2017 Tony Wickham <twickham@google.com> Show notification icon in place of "1" in badge.

- When notifications update, add the NotificationInfo to the
BadgeInfo if there is only one for an app. BadgeRenderer
will use the NotificationInfo to get the icon to draw.
- When retrieving the icon from the NotificationInfo, we draw
it into a shader (similar to MaskableIconDrawable), which is
rendered by BadgeRenderer.
- For now, we only use the notification icon if it is large.

Bug: 34839959
Bug: 32410600
Bug: 33553066
Change-Id: I31851804008dd15bab75d2759441187830c3265e
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
4d096298ce44d9b979ca0897032421e26392ae59 01-Feb-2017 Tony Wickham <twickham@google.com> Ensure getNotificationKeysForItem() returns empty on unsupported items.

We were bypassing the check in getBadgeInfoForItem(), which meant
we would return notifications based on package/user regardless of
the item type. In particular, deep shortcuts would show notifications
when long-pressed.

Bug: 34866646
Change-Id: I6575a28539313c0c5d0eea1cbf7b7726f747bcd5
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
2efcdd0c783e6ef9a52a25bec1a2508040760bb6 26-Jan-2017 Tony Wickham <twickham@google.com> Store notification keys in a List instead of a Set.

This will preserve the order when iterating over the notifications to
populate the popup container.

Bug: 34735689
Change-Id: Ic390ffef140e454566ffc6ab1763950349df25ce
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
9438ed414fdabadb4cd09da184867b1c44b91095 20-Jan-2017 Tony Wickham <twickham@google.com> Add swipe-to-dismiss notifications in popup menu.

- Next secondary icon animates up to replace dismissed main notification
- Add padding around main notification so it always aligns with the
straight edges of the view (not the rounded corners); looks more
dismissable
- Notification view collapses as notifications are dismissed
- To mimic system notification behavior, we copy SwipeHelper,
FlingAnimationUtils, and Interpolators. We also apply elevation
to notifications and reveal a darker color beneath when dismissing.

Bug: 32410600
Change-Id: I9fbf10e73bb4996f17ef061c856efb013967d972
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
540913eadf39f1e8632d2b6f0bc33aa635214198 23-Jan-2017 Tony Wickham <twickham@google.com> Refactor DeepShortcutsContainer to PopupContainerWithArrow

- Also added PopupItemView, which takes animation logic from
DeepShortcutView, and which DeepShortcutView now extends.
- Renamed ShortcutFilter to PopupPopulator, which has support
for new item types (not yet used). Also moved populating
logic (e.g. UpdateShortcutChild Runnable) to PopupPopulator.

Bug: 32410600
Change-Id: Ib6e444ac7ca99c80ba438801c26e62d9542e0ad9
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java
010d2550184179785e4467ff1ffb4f4f4e850ec2 20-Jan-2017 Tony Wickham <twickham@google.com> Add NotificationListener to launcher.

- NotificationListener extends NotificationListenerService, and is
added to the manifest.
- Added PopupDataProvider, which contains logic for storing and
interacting with data that goes into the long-press popup menu
(shortcuts and notifications). A follow-up CL will rename
DeepShortcutsContainer to a generic PopupContainerWithArrow.
- If Launcher has notification access, NotificationListener will
get callbacks when notifications are posted and removed; upon
receiving these callbacks, NotificationListener passes them to
PopupDataProvider via a NotificationsChangedListener interface.
- Upon receiving the changed notifications, PopupDataProvider maps
them to the corresponding package/user and tells launcher to
update relevant icons on the workspace and all apps.

This is guarded by FeatureFlags.BADGE_ICONS.

Bug: 32410600
Change-Id: I59aeb31a7f92399c9c4b831ab551e51e13f44f5c
/packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java