AbsSwipeUphandler has many potential and common NPEs. Added more null checks to AbsSwipeUpHandler
Flag: N/A
Fixes: 295905702
Fixes: 309535060
Test: StartLauncherViaGestureTests, quick switched and launched app from recents
Change-Id: I11f62eac423ae3c5792ce97ca49963f1e005b289
Also simplifying the bitmap fetching path to return all relevant data in one-call
Bug: 299336510
Test: Verified that the icons are themed during drag and app launch
Flag: ENABLE_FORCED_MONO_ICON
Change-Id: Ib4c457e911e7b5616e8370d111cc68c5d6401fe6
- Includes initial support for obtaining PendingIntent for ITEM_TYPE_SEARCH_ACTION.
- Custom pre-drag conditions for search results can be provided through TaskbarSearchSessionController.
- Added detection for telling when DragView shift animation ends for
pre-drag condition usage.
Test: Manual
Bug: 289261756
Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR
Change-Id: I52510a6f3ee49968134ecb591ef7c4df711b9d3d
Bug: 288491653
Test: Verify that dragging icons with work badge have the right badge theming and that when the icons are animatng (e.g swipe to go back home from app) have the right themed/non-themed work badge
Change-Id: I3d75e83ebab0d99866f1fe3688dc06bb7e933a6e
For 1, when animateShift() is called shiftAnimation() is the only thing needed.
2, by having point saved in preDragCondition, we can use that to update the drag layers and not have to
modify registrationX/Y later
Removed dragVisualizedOffset since it does not do anything.
There is an issue that also needs to be fixed if user decides to long click
on a search result and let go, the icon flashes at the touch point when you let go.. so we check when mContent can be shown in DragView
depending on if there is dragOffset.
If there is dragOffset, set mContent to invisible.
If there is no dragOffset, set mContent to visible because it doesn't matter as the original content is at the same spot.
bug: 245659929
test: manual: video: https://drive.google.com/file/d/1JQ0pud31HU0WlrqecX0v1cdPKQ37jQCf/view?usp=sharing
Change-Id: I4d2276b9c43e1e92c45d8538b8dde70baa84a5e8
- Use getSourceVisualDragBounds() if the target view is BubbleTextView;
this accounts for padding as well as extra ring inset for
PredictedAppIcon
- Also ensure we always use the final drag view scale when switching to
the system drag and drop, instead of using the current scale which
might be in the process of animating
Test: drag regular and predicted icons in taskbar, but drop it in a
region that doesn't accept it (e.g. the taskbar itself), check that the
return animation scales and offsets more correctly than before
Bug: 269814838
Change-Id: Ie8398b2617340e1d2568773563aa0263a3366940
> Allowing support for overring shortcut badge
> Updating pendingShortcutInfo so that the
handler can be easily overridden
Bug: 268253894
Test: Verified on device
Change-Id: I3184cb6494bc98c7eed33798b35b4e6e6a1e7ddc
The error was caused by delta being larger than the range, which leads to an UnsupportedOperationException: "Final position of the spring cannot be greater than the max value". With this change, delta will never be greater than range.
Fix: 261674632
Test: 1. Settings > Display > Display size and text >>> Set display size to the biggest
2. Make folder
3. Go to landscape mode
4. Open folder
5. Quickly drag icon in folder
6. Verify that Launcher doesn't stop and drag is successful
Change-Id: I6c81755750acf0de8693b98caad8e7dab3e9f58a
The cross fade function of DragView tries to match the shapes of the fade-in and fade-out views. However, ImageView (the fade-in view) by default only tries to match at least one axis between the content (the final view) and the bound (the ImageView bounding box). We need to make sure that the content fully fills the bound to exactly match the shapes.
Test: Manual
Fix: 221496442
Change-Id: I7c142d52b7bfbd0e266a917c27cbd40691fbf3c2
- Multiple users reports view getting stuck on screen. This CL
clears all DragView when user leaves launcher.
- Moved to onResume to not interfere with start up time,
and also aligned with when we remove AbstractFloatingView.
- Root cause still undetermined, but happens enough that it warrants
a temp fix.
Bug: 162636845
Test: drag and drop configurable widget
(widget that gets dropped then opens up a
configuration activity)
Change-Id: I532b5274a1308c53f67c23c5c8ca07f2b7f9802c
- Added TAPL objects to support TAPL tests for taskbar features
- Added tests for major taskbar features: hiding/showing the taskbar, opening all apps, lauching apps and app deep shortcuts from the taskbar/all apps page, launching apps and app deep shortcuts in splitscreen
- These tests should only run for large devices
Design: go/taskbar-tapl-tests
Test: ran tests locally with invalid configurations and remotely
Bug: 215218813
Change-Id: I3c28c339707467414aa47fa633f87fa0c1fdee57
Fixes bug where animations uses themed icons in All Apps, where the
icons are not themed.
We want the DragView themed since all valid drop locations will have it
appear themed.
Bug: 215650713
Test: open/close an app from All Apps
Change-Id: I9969ce4921831dd12858ed9b0fe64379e9e3b188
Multiple users reports view getting stuck on screen. This CL
clears all DragView when user leaves launcher.
Root cause still undetermined, but happens enough that it warrants
a temp fix.
Bug: 162636845
Test: manual
Change-Id: I532b5274a1308c53f67c23c5c8ca07f2b7f9802c
> Calulating correct location irrespective of transient
state (scale/translation)
> Removing extraction pause/resume logic
> Simplifying location calculation and registration (only use one location instead of a list)
Bug: 194732483
Test: Manual
Change-Id: I255d83761bff5e09c9fb0a5e398d0be0c1d0956f
This CL covers drag requests initiated from Launcher.java but not from
other activities.
Test: Manual
Bug: 193144010
Change-Id: Ieb862d689afe81a5b35aedeb9a277de08c775230
Set the widget outline to DragView rather than the content view
hosting a Picture record of AppWidgetHostView at drop.
Bug: 191646816
Test: Manual
Change-Id: I901743f8ba392de37f3ef69ca386c4b36bfebd7f
Merged-In: I901743f8ba392de37f3ef69ca386c4b36bfebd7f
Disable color extraction on drop until the workspace is back to its
normal size, then re-enable it and force re-coloring. This needs to
happen if the drop is on the workspace, but also if the drop is on the
secondary target.
Fix: 192354264
Test: Manual, see bug for details.
Change-Id: I79203f68843d59384503aa76f4813d886e98afa3
Merged-In: If573641e4bb5a98ed6b5008e00f70f4bbe492c24
- Make DragView abstract and extended by LauncherDragView for the explicitly Launcher-specific parts.
- Some other methods like Utilities.getFullDrawable() now accept (Activity)Context rather than Launcher.
Test: Compiles and runs, manual drag and drop
Bug: 182981908
Change-Id: I77b7a2e48ce864dd711c3232217fdba4d60c546f
When removing content from the dragView, replace it with a snapshot
so that the preview remains the same
Test: Drag a widget and observe the drop animation is shown.
Bug: 187423667
Change-Id: I1e726f50a2b3d0a5f1562297cccf47a435affd02
Test: Drag a test widget around and observe local extract color
is applied.
Bug: b/182282587, b/182816217
Change-Id: If63a9d91ceb2102d5d913bca85997b8be07b1adf
This is a preliminary work for local color extraction. In order to
apply local colors extracted from wallpaper to AppWidgetHostView
during drag, we need to hold a reference of the dragging
AppWidgetHostView.
In this CL, the following changes are made:
1. Instead of using bitmap image directly for icons, folders, shortcuts,
legacy widget drawable preview, a BitmapDrawable wrapper is
introduced.
2. Introduce a WidgetHostViewDraggableDrawable which draws
LauncherAppWidgetHostView directly to canvas. No more bitmap
generation overhead.
3. Remove drag outline from the drag logic because this will be replaced
by a new grid color hint UI: https://screenshot.googleplex.com/7jBEVeuxFecFKKT.png
Test: Add: add widgets, shortcuts from widgets tray.
add icons from all apps.
create folder.
Drag: drag existing widgets, shortcuts, folders and icons around
Bug: 182282587
Change-Id: Ia45ff756ea5bb80cf0761f0727a9453d50c204c0
> Removing some special checks around accessibility drag
> Unifying folder alarm code path for accessible and normal DnD
> Maintaining mDragStartTime inside the dragDriver instead of the callers
> Simplifying some accessibility callbacks
Future cl will create a Accessibility DragDriver and unify it with
other DnD flow
Change-Id: I1919ef218de0174678110f271b450bcb9aaf4a5c
With adaptive icons, we can have FloatingIconView match the shape
and size of the closing window, regardless of the icon shape.
FloatingIconView starts off as a rounded rect (same corners as task view)
and then morphs into the icon shape using FolderShape#createRevealAnimator
in reverse.
Decided to add FeatureFlag.ADAPTIVE_ICON_WINDOW_ANIM since there are still
some issues with folders, badges, and a visible jump when swapping the
FloatingIconView with the original icon.
Bug: 123900446
Change-Id: I94969eea6d5f4b932a84a11eb403611276042b46