> The drawable gets the path from MaskIconDrawable path, instead of
using a circle
> The progress changes are animated as well
Bug: 34831873
Change-Id: I4e7f0b610f4fd94de8e0cfcf8b179b775cf0b4d8
PackageUserKey is only meant to be used for items that support
notifications, so when trying to update it for an item that
doesn't, we don't use it to check if the item has notifications.
This fixes a crash that happens when trying to update notifications
for a legacy shortcut, as such a shortcut doesn't have a component
on its intent, which we were trying to use to populate PackageUserKey.
Bug: 34842278
Change-Id: I8c69ccebbf9d93505d5b29ecd25d76c65610ddc4
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
hence the overscroll will appear and you can wrongly enter into the -1 screen.
The problem was that the state value in the workspace was set after enabling
free scroll, but enabling free scroll checks the current state for validation.
This bug was introduced by Icc3005fd431569e2b9e3f52d2249de8ba8d13eab.
Bug: 34817798
Change-Id: I46802c93c49a2ae8ee5c40ef24e465d7fe63c4bb
This CL will bake the legacy icons inside a grey background
Note: There will be follow up CL to change the color and shadow of the
legacy icon. The idea of this CL is to first test if MaskableIconDrawable
methods and class work properly.
Bug: 32063838
Bug: 33553066
Change-Id: I3d02e619fcb0cd9879baa22a025b5d95c829f26c
the drag source image
> Using common code for pending item drag (WidgetContainerView and PinItemDragListener)
> Adding a shortcut-circuit in Workspace when a pendingItem can create a shortcut
directly. Previously the multi-window drop was routing through onActivityResult which
was causing some state information to be lost.
Bug: 33584624
Change-Id: I0259870032185713caa9bff27092dbae6ce91199
Previously we had a mapping from View to NotificationInfo,
but this way we don't have to maintain that separate mapping
and can follow the pattern used throughout the rest of launcher.
Change-Id: Ia988f822613b9978bab3d0127226de920a3e73c9
This uses the same color calculations as the system, except that
we use the extracted notification background instead of assuming
it is white.
Bug: 32410600
Change-Id: I7be8b9459ca38d01a6780758898541e69ec42576
> Preloading widget view while dragging for smoother
transition
> Skipping config activity and sending confirmation to
the caller when widget is dropped
Bug: 33584624
Change-Id: Ib23e5964298296d12d9c93f38aefdf924a07368e
This will preserve the order when iterating over the notifications to
populate the popup container.
Bug: 34735689
Change-Id: Ic390ffef140e454566ffc6ab1763950349df25ce
- 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
While the launcher is loading, the drag view is displayed with a gray tint.
The drag is started, as soon as the workspace is unlocked
Bug: 33584624
Change-Id: I4013ea8b987ec305e73742b194f9e96af761cc35
- 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
- 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
> Adding checks on legacy shortcuts
> Checking restore status based on package and not componentName
Bug: 34123342
Change-Id: I442699e4ebb34ae66aa25c512bfcdc1b4fd5ae2a
On long pressing, the confirmation activity starts a system
drag-n-drop and focuses the launcher activity. We then drive
the launcher drag controller using the system drag event
Caveats:
> We use a transparent preview for system drag and drop and use
a view inside launcher for actual preview. This gives us better
control over various animations.
> The parameters for drag operation are passed to the Launcher
activity using the intent. Since onNewIntent and onDragEvent
come at different times and are not associated, a random uuid
is used as mime-type to match the drag event with intent params
> If the workspace is locked (eg, loader is running) the drag
operation is simply dropped. Will be imporved in follow up cls
Bug: 33584624
Change-Id: I0bb5b25b690f86b6af31a14e11beb669fcb3a281
to swipe allapps from everywhere.
The fix is to determine if the widget is scrollable on layouting instead
of the callback when a widget has been updated.
Bug: 34641906
Change-Id: Idc9d8ade7e601279b87856333ae754f4785131ac
> Added two dummy widget providers: with config and without config
> Added tests for verify widget config flow
Change-Id: I4577f085abe8f8b82047b644c71cc9065358153a
This will allow us to override the implementation and provide custom
logic for widget addition.
Bug: 33584624
Change-Id: I310bf39e301c7e1c8de4f62456594535e2fe5bbc
- Take left inset into account.
- If there is no way to orient the shortcuts next to the icon,
instead center it in the drag layer and don't draw the arrow.
- If possible, place the shortcuts to the left or right of the
icon when centered vertically. If for whatever reason that
isn't possible, center the shortcuts horizontally as well.
Bug: 33421656
Change-Id: I838b30ea487e0f7c64637db1cb8991ca3ee16bf9
Instead drawing badge in the view directly.
This will allow us to reuse the same preview when we do not want to draw
badges. This also simplified badging of shortcut config activities.
Change-Id: I9c07c33bf9c2b8ef81a00026b1d42587868c906f