14 Commits

Author SHA1 Message Date
Jon Miranda
6fa63473e1 Fix bug where dragview gets stuck on screen.
* Since the BubbleTextViews views do not have a listener, the long press
  was still getting triggered even though it was in a pressed state.
* We only trigger long press if the view is not pressed or if there is no listener.
* A listener is only added for widgets, and for long press wiidgets are not
  pressed state.

Bug: 162636845
Test: manual test, repo steps in bug
Change-Id: Ia9df12cf31a0844403d69ddacebf2bdbc5c59d3b
2021-01-25 15:33:50 -05:00
Jon Miranda
a1567d50d0 Prevent two overlapping long press actions.
We add a check in CheckLongPressHelper to not trigger long press if the
view is already in the pressed state.

This fixes the bug where a stranded DragView is left in the DragLayer.

Repo's every 50 tries:
- Open folder
- Long click and slightly drag the same item over and over in slightly
  different directions.

Logs show that long click on folder item initiates the first long click,
and then later on CheckLongPressHelper triggers another long press before the
initial one is finished.

Bug: 151053858
Change-Id: Ifbb6919e4f0153aaef2904f704baa284e78f1e83
2020-04-16 14:00:50 -07:00
Sunny Goyal
17feee8995 Merging stylus click logic in longpress helper for better state-management
Bug: 150825081
Change-Id: I7c507c41e67c09bff5a4ad3abc7a7a62fecf910e
2020-03-27 19:53:20 +00:00
vadimt
8649cf29e4 Remove tracing for fixed bugs
Bug: 129434166
Bug: 131170582
Change-Id: Ia9b356594001d96c69ffbb7f8b767b2f54ed5feb
2019-05-01 16:10:56 -07:00
vadimt
9c3b6bbe04 Add more test diags
Bug: 129434166
Change-Id: I1e2646e2e878eb3f7c93840937b33b2837aa31ac
2019-04-19 11:51:55 -07:00
vadimt
423bf62ea0 More diags for b/129434166
Bug: 129434166
Change-Id: Iab8a18ea0f1ef7f6d149dc46f1c8fefc5f463219
2019-04-05 12:41:34 -07:00
Tony
2ca999cf1b Change long press timeout to use a factor of ViewConfiguration.getLongPressTimeout()
This way, if the default ViewConfiguration timeout changes, we will adjust accordingly.

Bug: 113639506
Change-Id: Ic3b93311c8e8d8196db2850fa641ffc675a16fb2
2018-09-24 17:24:51 -04:00
Tony Wickham
1bce7fd342 Long-press on an app to reveal its shortcuts.
- Add ShortcutsContainerListener to icons on workspace, folders, and
  all apps. This handles long-press and forwards following touches to
  the DeepShortcutsContainer that is created.
- Drag over shortcut before lifting finger to launch it.
- Shortcuts are rendered in pill-shaped DeepShortcutViews,
  which are inside DeepShortcutContainer on DragLayer.
- The shortcut container orients above or below the icon, and left or
  right-aligns with it. Biases for above + left-align.
- Long press a DeepShortcutPill to drag and pin it to the workspace.

Bug: 28980830
Change-Id: I08658d13ae51fe53064644e8d8f7b42f150fdd7d
2016-06-29 17:48:46 -07:00
Winson Chung
7501adf4b7 Ensure that we use the system long press duration when dragging from AllApps.
- Removing some old code out of LauncherAppState

Bug: 21559400
Change-Id: I3c586094efb7ad8a17d2169bc8aaccf6b0df40a2
2015-06-05 10:52:57 -07:00
Winson Chung
6b27614c54 Fixing issue with touch scrolling the prediction bar.
Change-Id: Ie15ca96e5ea33a54508285aa76fb6aea81b2376d
2015-05-13 16:04:35 -07:00
Adam Cohen
091440a9cb Reducing method count by eliminating synthetic accessors
Elimates 304 methods based on dex analysis

The java compiler generates sythetic accessor methods for all private
fields, methods and contructors accessed from inner classes. By marking them
package-private and @Thunk instead, sythentic accessor methods are no
longer needeed. These annotated elements should be treated as private.

Change-Id: Id0dc2c92733474250d8ff12fa793d3a8adeb1f26
2015-03-20 11:15:54 -07:00
Daniel Sandler
e4f9891f01 Lazily instantiate LauncherAppState.
The application context for LauncherAppState is supplied by
the application whenever it starts; don't ask for an
instance before that.

Change-Id: I1ca8ea04238a357a682f79250f08813ead7ae532
2013-06-27 15:17:11 -04:00
Daniel Sandler
cc8befac35 Move LauncherApplication's state and code to LauncherAppState.
This removes Launcher's static data and other state out of
the Application object. Now LauncherApplication (extends
Application) exists only to instantiate LauncherAppState.

Change-Id: I4e323bd78b77536b92054105536a55c0c2c19ba8
2013-06-11 22:01:47 -04:00
Daniel Sandler
325dc23624 Launcher2 is now Launcher3.
Changes include
  - moving from com.android.launcher{,2} to
    com.android.launcher3
  - removing wallpapers
  - new temporary icon

Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b
2013-06-05 23:30:20 -04:00