* Toggleable new bouncy consolidated popup (MATERIAL_U_POPUP)
* Fix typo in calling PreferenceManager2
* Import FeatureFlags
* Get ctx in SDL
* Get ctx instead of this
* Correct type for context
* Import Context
* insert commit message here!
* I forgot I can just apply this neatly trick after looking at the code for 5 secounds
* Move to appropriate category
Co-authored-by: MrSluffy <werdna.jac@gmail.com>
Fix crashing:
```
Process: ch.deletescape.lawnchair.plah, PID: 26755
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.launcher3.dragndrop.DragView.animateShift(int, int)' on a null object reference
at com.android.launcher3.popup.PopupContainerWithArrow$LauncherPopupItemDragHandler.onLongClick(PopupContainerWithArrow.java:827)
at android.view.View.performLongClickInternal(View.java:7586)
at android.view.View.performLongClick(View.java:7544)
at android.widget.TextView.performLongClick(TextView.java:12974)
at android.view.View.performLongClick(View.java:7562)
at android.view.View$CheckForLongPress.run(View.java:29292)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
```
Bug: 247880037
Test: manually tested app popup. Also ran Launcher tests locally with U flag on/off.
Change-Id: I93c04f9715d583376c36d823c23353619afd26b6
- Fix system shortcut alignment and ordering.
- Replace horizontal split icon with correct size drawable.
- Remove popup shortcut reversing logic, and instead show same order of shortcuts regardless of orientation.
Test: tested manually on tablet and phone
Bug:269343928
Change-Id: I1700ad1ee04abf0820c87d89e1dc07d6880fd519
The feature has been disabled for a while and is not working correctly.
Also there is no UX plan to revisit this currently
Bug: 206508141
Bug: 259733681
Test: Presubmit
Change-Id: If1279c22b9d074592ba181c7caa0cf38f9cb842e
When there is only 1 system shortcut the Popup Container looks weird
because it shows the icon without text and it has a lot of space.
We already have a view to show the sorcuts with text and icons so I
reused that view and show it only if there is 1 system shortcut.
I also did a small refactor separating the sortcuts into
widgetShortcuts and nonWidgetShortcuts. The way I did it is not the
most efficient because it uses two passes, but I think it is easier to
read this way and we'll never have too many shortcuts.
Fix: 229356716
Test: Long press on the app icons in the workspace and in the
app drawer. Try different app some with one shortcut like the phone
app and some with multiple like.
Change-Id: Ie054af546758d0686914fc934772a76a3c690fe5
Split from home animation needs to originate from the app icon instead of the menu item icon. This can be useful for other animations in the future.
Bug: 226395821
Test: N/A
Change-Id: If45d80e347ba275bd550b6acd6ad81b319e753a3
The width of the PopupContainer grows if there are multiple
SystemShortcuts and we where not updating the width of all the
options.
Fix: 227538975
Test: Long press an app like Google Maps on the HomeScreen to see
the menu. All the options should have the same width.
Change-Id: I25310d74aa1af17be37b53c27d2334f86bef325a
When an item is clicked, we start an app launch animation
from the icon in the container to the full app. The issue is that
we close the container too early, which causes a janky experience.
Tested that we already handle closing the container in all click
instances (ie. when launcher is in background).
Bug: 185510490
Test: click on all the different view types within PopupContainer
ensure that the container does get closed via logs
Change-Id: I4fef24b911137d0abd24746fa49f466f5183176c
Bug: 217162588
Test: Verified removal once drag is finished. Verified working on secondary display launcher.
Change-Id: I16515518c6d488b74450456306abbfff646ac11b
Merged-In: I16515518c6d488b74450456306abbfff646ac11b
The drag listener is never removed causing a memory leak over time.
Bug: 217162588
Test: Verified removal once drag is finished and close complete is
called.
Change-Id: Iff7bac8724e76e5dec98edaffe2d8853516f6c87
- Fixed icons disappearing when initiating dragging
- Fixed incorrect icon location when initiating dragging after rotating the screen to an orientation other than what launcher started in
Fixes: 215418478
Fixes: 214025075
Fixes: 210460544
Test: dragged icons from the workspace and taskbar
Change-Id: I848138af28802f7d806708c77c25b8de307c70d8
(cherry picked from commit 312b68fde4)
Merged-In: I848138af28802f7d806708c77c25b8de307c70d8
- Fixed icons disappearing when initiating dragging
- Fixed incorrect icon location when initiating dragging after rotating the screen to an orientation other than what launcher started in
Fixes: 215418478
Fixes: 214025075
Test: dragged icons from the workspace and taskbar
Change-Id: I848138af28802f7d806708c77c25b8de307c70d8
- Added support for shortcut drag/drop
- Added support for popup menu shortcut drag/drop
Test: long pressed taskbar and launcher icons. long pressed taskbar and launcher shortcuts and popup menu shortcuts.
Fixes: 204453506
Bug: 198438631
Change-Id: I09cab335dcbb3a2bfa3020b21f4bcffff9c53e61
- Added support for notification dots
- Added support for notifications in popup menu
- Added support for dismissing notifications from the popup menu
Bug: 198438631
Test: long pressed launcher and taskbar icons, clicked notifications, clicked shortcuts
Change-Id: I7c981e60a82b4d6ce28332d804bbbfb5eb89c6a8
The Share App system shortcut is disabled for apps that are deemed unshareable. This updates the UX to gray out the shortcut instead of hiding it. When the user clicks on the grayed out shortcut, a Toast message is displayed. This update also enables the shareability check.
In order to properly gray out the shortcut, this also fixes a bug with BubbleTextView in which ColorStateLists weren't applied correctly.
Bug: 202556634
Bug: 204495363
Test: Manual (observed UX on Wembley device in regular and dark themes)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: Ieb04baf8c9cb9d325119cb97fceb96f2fc5a62ff
Generalized popup menu types and logic to allow wider uses outside of launcher.
Bug: 198438631
Test: long pressed launcher icons and pressed menu options
Change-Id: Iadcbb1796496c0061dcee362784e426ff55dc94a
assignMarginsAndBackgrounds updates determines the new arrow color, but
it doesn't actually update it. That is normally done in
updateArrowColor.
Test: Icon menu arrow color changes to content above it after notification
dots dismissed.
Fix: 201458705
Change-Id: I5ee40b420b03c29c197983af5968d4f2902bc59b
This update allows Launcher to check with an external API to determine whether apps
are shareable before displaying the Share App button. To prevent
extraneous calls to the API, the retrieved shareability data
are cached. A job is scheduled to update this cache once a week.
This feature can be toggled with the ENABLE_SHAREABILITY_CHECK flag in
AppSharing.java. It is currently disabled, as the Play API has only been
partially rolled out.
More details on the design are available at go/app-shareability-cache-design
Bug: 168831749
Test: manual (local Wembley device)
Test: m -j RunLauncherGoGoogleRoboTests ROBOTEST_FILTER="AppShareabilityManagerTest|AppSharingTest"
Change-Id: I971a3776e09b6842dedf315ec592317050dd6790
When handleClose is called with no animation, overridden closeComplete gets fired before mOpen is set to false inside the super class. This results in getOpenView(launcher, TYPE_ACTION_POPUP) returning self and breaking text visibility restore.
Bug: 183713889
Test: Long press on allapps/workspace item to show PopUp under it; on popup open, capture screenshot, start a sharing activity, return to launcher and verify popup dismissed and text restored.
Change-Id: Iae8d2c73e4b7f57708468bf47bb0983a30ebbddc
- Update UI to match specs.
- Only shows one notification (removed footer, animation code)
Bug: 175329686
Bug: 190402054
Test: open popup, dismiss notification from shade,
open popup, click on notification
checked RTL
Change-Id: I92672f94233d986ae5b5c54979980967308cb156
- Widget is its own item.
- Change order of icon order.
- Update grab handle colors
Bug: 188095695
Test: long press on apps with/without widgets, long press apps on workspace/
all apps/search
Change-Id: Iabb9b4b3f3a928103b9d62601f22e74ef2325d7c