Commit Graph

5858 Commits

Author SHA1 Message Date
Hyunyoung Song df7ef68bbf Refactors in UserEventDispatcher
- LaunchSource -> LogContainer

Change-Id: I71bfee992fb1ba7ae80e824d419f7bf8d3020999
2016-10-06 17:52:22 -07:00
Hyunyoung Song 0de011705b Code sanitization
- Removed bad method/class name typos

Change-Id: Ie6900e9e3d9ce9b550d2a2442a5dac3f7050a573
2016-10-06 10:57:29 -07:00
Jon Miranda 4b513f392f Fix page indicator bug where it gets stuck as a blue line.
Bug: 31909035
Change-Id: I4cdda057807476c1c5ec454fd17dbfa9f0ed5111
2016-10-05 17:05:37 -07:00
Jon Miranda f3e35d9331 Add logging for long presses. Reset elapsed timer when changing containers.
This is the first CL in a series of logging-related CLs. Upcoming CLs will
include using Commands (HOME_INTENT, BACK) and "tapping outside" of a container
logic.

Change-Id: I62f0a08c7a9d9fce0baa5c12c67e21f63ab16a7c
2016-10-05 15:22:23 -07:00
Hyunyoung Song cc3f3349f4 Add user event logging for tap on search b/31772967
am: d8fcffb8fe

Change-Id: I67e36fb3167a40c24957b4ec3bb7ed08d9966e62
2016-10-05 18:27:37 +00:00
Sunny Goyal ce9b69833e Merge "Fixing creash when binding QSB" into ub-launcher3-master 2016-10-04 20:58:44 +00:00
Sunny Goyal c39ff736c0 Fixing creash when binding QSB
Change-Id: I0db112e3dc60cb59db10fde3d9088c11a09fae8c
2016-10-04 13:51:16 -07:00
Tony Wickham 10236d6ac7 Update pre-drag lifecycle for apps with shortcuts.
- First of all, deferred drag has been renamed to pre-drag
  to avoid confusion with the existing deferred end drag.
- For normal drags, the cycle is still startDrag -->
  onDragStart --> onDrop --> onDropComplete --> onDragEnd.
- Pre-drags have two additional callbacks: onPreDragStart
  and onPreDragEnd. onPreDragStart is called between
  startDrag and onDragStart, and onPreDragEnd is called
  at the same time as onDragStart or onDragEnd.
- If the pre-drag has not transitioned to a full drag before
  onDragEnd, onDragStart and onDropComplete are skipped
  (onDrop is still called to allow the DragView to animate).

Change-Id: Icd7a8f75d5fcc159f9a52758c22ab6eae3edb9e2
2016-10-04 12:26:35 -07:00
Sunny Goyal 59769e3331 Merge "Moving the widget auto-advance logic to AppWidgetHostView instead of handling it in launcher" into ub-launcher3-master 2016-10-03 21:35:39 +00:00
Sunny Goyal 7a372033ac Merge "Exposing custom actions using keyboard shortcut" into ub-launcher3-master 2016-10-03 21:12:20 +00:00
Hyunyoung Song d8fcffb8fe Add user event logging for tap on search
b/31772967

Change-Id: I71ececb8195d46405623a8ae2a99d001088d9181
2016-10-03 14:01:25 -07:00
Hyunyoung Song 1784d579f4 Consume ACTION_UP when fling is detected on top of icon
am: 035a516e18

Change-Id: I0eb8f0c83e1a1611d8bb3b9309d69b8df7c7a19d
2016-09-30 23:29:32 +00:00
Hyunyoung Song 70a421e224 Merge "Consume ACTION_UP when fling is detected on top of icon" into ub-launcher3-calgary-polish 2016-09-30 23:21:05 +00:00
Hyunyoung Song 035a516e18 Consume ACTION_UP when fling is detected on top of icon
Bug: Adam found out that when you swipe down fast on an icon, you can
launch search AND launch an app. Only one should trigger and not both.

Change-Id: I66b9df26d8bb355f011d057dafd45f90f59b82ae
2016-09-30 16:13:55 -07:00
Hyunyoung Song 029e8b2e3e Agressively change the color of the the all apps background during pull up b/30502942
am: 81a56f9acc

Change-Id: I0f3bd04b2bb69dbeb2f4578c74fdbfa5b34c0e8b
2016-09-30 20:57:20 +00:00
Hyunyoung Song 37ecabc88e Merge "Agressively change the color of the the all apps background during pull up b/30502942" into ub-launcher3-calgary-polish 2016-09-30 20:53:21 +00:00
Hyunyoung Song 81a56f9acc Agressively change the color of the the all apps background during pull up
b/30502942

Change-Id: Iea072d95ed4f62907b164b2c4ee75ad737eccb7a
2016-09-30 12:57:16 -07:00
Sunny Goyal b57c893db8 Removing some TODOs with proper system API
Change-Id: I0d0e667cd6af8a7b9dbf3d0fd417f009ae402519
2016-09-30 12:19:13 -07:00
Sunny Goyal 1acc56a4eb Moving the widget auto-advance logic to AppWidgetHostView instead of
handling it in launcher

This fixes the bug where launcher ignores auto-advance property changes
during app update or widget remote views update as well as simplifies
widget management

On potential downside of this refactoring is that the auto advance will
keep running even when all-apps or widgets tray is open. We could
eventually use onVisibilityAggregated to handle visibility changes,
but currenly the workspace visibility is not being updated properly
in these cases

Change-Id: Ie7331fec1877f43ad23e634d37571d8f3ef51e59
2016-09-30 11:18:38 -07:00
Tony Wickham 9b80528d44 Some minor fixes for extracted status bar.
am: 345bff3ce6

Change-Id: I3a9e57fb93124b1d462b0fb8173419b887e85a84
2016-09-29 01:36:18 +00:00
Tony Wickham f0fc3c4674 Merge "Some minor fixes for extracted status bar." into ub-launcher3-calgary-polish 2016-09-29 01:27:07 +00:00
Tony Wickham 345bff3ce6 Some minor fixes for extracted status bar.
- setLightStatusBar() is now updateStatusBar(), with a forceLight
  parameter. We set the status bar to be light if forceLight or
  shouldBeLightStatusBar() (based on wallpaper).
- Force status bar to be light if all apps is open.
- Default to dark status bar, not light (light == dark icons)

Bug: 29452834
Change-Id: I7b102ceff2f1ef2ab8defd4a46c698df4feaf2a5
2016-09-28 16:53:17 -07:00
Sunny Goyal 60bf18876f Fixing the newIntent logic to check the state before it has been reset.
am: 85313735fa

Change-Id: I3a43a49c467a750adb031df4c3b880d453116739
2016-09-28 23:01:38 +00:00
Sunny Goyal 7bb7ead9f7 Merge "Fixing the newIntent logic to check the state before it has been reset." into ub-launcher3-calgary-polish 2016-09-28 22:57:56 +00:00
Tony Wickham 0bc9e98d78 resolve merge conflicts of 9311387 to ub-launcher3-master
Change-Id: I449cd2c91c2906f04ebf844eab2d02befaeb2f4d
2016-09-28 14:40:28 -07:00
Tony Wickham 9311387a22 Enable light status bar when top of wallpaper is light.
(Light status bar = dark icons)

Bug: 29452834
Change-Id: I9f61a05d80158827761c8b62ab40fc50971e27a6
2016-09-28 14:16:11 -07:00
Sunny Goyal 85313735fa Fixing the newIntent logic to check the state before it has been reset.
When home button is pressed, we reset all active state (close all-apps,
folder, shortcuts menu). But we do not go to the default screen if the
active state was non-zero (any of the containers were open).

Change-Id: Ia9a06729d65767124471c5b793323a55d822210a
2016-09-28 12:42:55 -07:00
Sunny Goyal 02aa0e4792 Merge "Cleaning up restore instance state logic" into ub-launcher3-master 2016-09-28 19:10:26 +00:00
Sunny Goyal fe770c9feb Cleaning up restore instance state logic
Restore instance state is only used for first binding. But in case of restore,
the binding happens synchronously, so there is not need to store the bundle
in a global variable

Change-Id: Ibc496bcd7c0d171056b8afc69f2c4d9a1270d40c
2016-09-28 11:35:13 -07:00
Hyunyoung Song 8866ccf510 Add user event logging for action on search box b/31772967
am: ffad962092

Change-Id: Ifb7364bc68bd4021e85241c793b223514e214f42
2016-09-28 02:54:19 +00:00
Hyunyoung Song ffad962092 Add user event logging for action on search box
b/31772967

Change-Id: Ide652ddfad931e392b21f5a2bbdf9f07729d0383
2016-09-27 18:07:00 -07:00
Sunny Goyal a6f69d0ffa Removing reflection from AlphabeticIndexCompat
am: 70fea7877d

Change-Id: I9e07b178e6911079e8575397167cc0e30aaa4aeb
2016-09-27 17:11:10 +00:00
Sunny Goyal 1b7e9bc063 Merge "Removing reflection from AlphabeticIndexCompat" into ub-launcher3-calgary-polish 2016-09-27 17:03:34 +00:00
Sunny Goyal 70fea7877d Removing reflection from AlphabeticIndexCompat
Bug: 31596662
Change-Id: I23da4a9747daa3cee6cec961fc590d18bf05791a
2016-09-27 09:50:22 -07:00
Jonathan Miranda aff85503f0 Merge "Ignore long clicks triggered from the edge of screen." into ub-launcher3-master 2016-09-27 02:43:53 +00:00
Jon Miranda aca2145f2a Restore AllAppsContainerView UI to match spec.
Did some refactoring with Sunny's help.

Change-Id: Ie4c90c316f1e381829836e11c83eaaedfed4d621
2016-09-26 16:45:10 -07:00
Jon Miranda 379198ef5b Ignore long clicks triggered from the edge of screen.
Bug: 31572404
Change-Id: Ie531941669549ce84b92302b95be94555ee0bb73
2016-09-26 16:37:59 -07:00
Tony 8c855cb8c0 Don't attempt to add item back to folder when deferring drag.
am: 1cf412ca91

Change-Id: Ic8bf5568b9811558bf20fac721b17dfa80803e8a
2016-09-26 20:59:51 +00:00
Tony 5eea1e89dd resolve merge conflicts of 6e74e89 to ub-launcher3-master
Change-Id: I34e449ca3a91ee06e1983ac3a83cb7ca53567a91
2016-09-23 19:43:35 -07:00
Tony 1cf412ca91 Don't attempt to add item back to folder when deferring drag.
Since the item hasn't yet been removed until the deferred drag
starts, adding it again will throw an exception (the view
already has a parent).

Bug: 30769920
Change-Id: Icb95aaa64e6e3c5dc105bbf3e54460b529d02033
2016-09-23 18:58:37 -07:00
Tony Wickham 6e74e899d3 Refactor shortcuts drag and drop.
- Instead of creating our own drag view within the container, and
  handling logic to determine when to start a real drag, we start
  the drag immediately and just defer onDragStart().
- To determine when the deferred drag should start, we add a
  DeferDragCondition to DragOptions. The default DeferDragCondition
  never defers a drag, but is overridden for apps with shortcuts
  to defer until the icon is dragged a given distance.
- Because the drag is handled in DragController, including checking
  when to start the deferred drag, DeepShortcutsContainer no longer
  needs to handle touch events and ShortcutsContainerListener has
  been removed.

This change has several immediate benefits:
- The code is much cleaner, because it allows touch handling to be
  done by the DragController through the normal drag flow, without
  recreating logic in ShortcutsContainerListener/DeepShortcutContainer.
- The janky second haptic feedback has been removed (now it vibrates
  when you long press, like everywhere else, but not again when the
  shortcuts close after dragging a distance).
- Drops are animated, instead of just popping the icon back into place.

Bug: 30769920
Bug: 30465972
Bug: 31533078
Change-Id: I679b412b72fbf6c3895d76963311eb5010c8e8db
2016-09-23 18:44:47 -07:00
Jonathan Miranda 20eedeb5ae Merge "Move handling touch logic from AllAppsContainerView to BaseContainerView." into ub-launcher3-master 2016-09-23 23:44:31 +00:00
Sunny Goyal c2f72b0bb8 Merge "Resize only one widget at a time" into ub-launcher3-master 2016-09-23 23:23:03 +00:00
Sunny Goyal 6ad72f02fd Resize only one widget at a time
> Removing logic to have multiple widgets in resize mode
> Making ResizeFrame a touch controller, so that it fits well with
other touch interaction in drag layer
> Chaning the method names in touch controller, so that it do not
overlaps with the default View methods

Change-Id: I85d4dbdfc82d078781adbce137dfaaea59c9c83d
2016-09-23 16:02:49 -07:00
Sunny Goyal 66b24572e4 Exposing custom actions using keyboard shortcut
Keyboard shortcuts:
  ctrl+A => Open all apps
  ctrl+S => shows deep shortcuts
  ctrl+O => shows custom actions popup

This also removes the direct delete/uninstall key shortcuts, making
actidental icon removal less likely

Bug: 24065447
Change-Id: Iae63370c0f33620628567cffd4df024064d4d02e
2016-09-23 15:57:08 -07:00
Jon Miranda 3298d0ff9b Move handling touch logic from AllAppsContainerView to BaseContainerView.
Now both AllAppsContainerView and WidgetsContainerView will be
dismissed when the background is clicked.

Bug: 27130340
Change-Id: Ie8446e4b8908742ddc8a227fe71ea56ec11c2457
2016-09-22 18:39:29 -07:00
Tony Wickham a07b9335e4 Stop jumping to workspace from hotseat on quick drop.
am: dbf08b4aee

Change-Id: Id1a4c65f14810dcf3e6534796d797603070c5d68
2016-09-23 00:37:12 +00:00
Tony Wickham 8177ac7f88 Remove shortcuts that no longer exist or are no longer pinned.
am: 7695e603bf

Change-Id: I525c3342a7559f1cd831cbd4f56c2acd8b6875b9
2016-09-23 00:35:13 +00:00
Tony Wickham c980735560 Merge "Stop jumping to workspace from hotseat on quick drop." into ub-launcher3-calgary-polish 2016-09-23 00:34:53 +00:00
Tony Wickham 39ce3d119b Merge "Remove shortcuts that no longer exist or are no longer pinned." into ub-launcher3-calgary-polish 2016-09-23 00:32:22 +00:00