1026 Commits

Author SHA1 Message Date
Sunny Goyal
aad3359e8e Removing unused touch handling in PagedView so that it is similar to various platform class
Bug: 109828536
Change-Id: Ibaba3fb4298f2dc055d125acea5f4c47403bbef0
2018-08-08 12:12:46 -07:00
Sunny Goyal
7fee2a82e4 Merge "Launching last task when back button is pressed in overview" into ub-launcher3-master 2018-08-08 17:34:46 +00:00
Vadim Tryshev
7acde48955 Enabling more checks in TAPL tests.
Hiding workspace from tests when in AllApps or Overview.

Also, we don’t need workspace_page_container.

Bug: 110103162
Test: Running TaplTests suite
Change-Id: I10875a1ce5d41a015c63034160676578f52d2e98
2018-08-03 10:29:36 -07:00
TreeHugger Robot
ce15b325e8 Merge "Retiring some feature flags" into ub-launcher3-master 2018-08-02 21:48:54 +00:00
Sunny Goyal
e39690b218 Launching last task when back button is pressed in overview
Bug: 111158326
Change-Id: Ib38f12f177780d15dbee69e4a27c21aaa9a3e087
2018-08-02 13:35:38 -07:00
TreeHugger Robot
1314fee74d Merge "Revert "Create new ShortcutInfo when dropping predicted deep shortcuts."" into ub-launcher3-master 2018-08-02 16:21:07 +00:00
TreeHugger Robot
899c08aee8 Merge changes from topic "am-402aa8b3-7a45-468a-931d-83007cd71180" into ub-launcher3-master
* changes:
  [automerger] Increase max distance for folder creation for tablets. am: 5aab8703ee
  Increase max distance for folder creation for tablets.
2018-07-27 23:08:37 +00:00
Vadim Tryshev
2ce6a13f60 Tapl library
The public API of the library has finalized; flakiness has been removed;
code polished.

Bug: 110103162
Test: TaplTests suite
Change-Id: Ic156bbfeedb1cb9c4a48ef907f97e396e8e81936
2018-07-20 14:43:05 -07:00
Android Build Merger (Role)
5e0634fed7 [automerger] Increase max distance for folder creation for tablets. am: 5aab8703ee
Change-Id: I37270e7cc65e66c16518b0921e06d26fa30b3bf4
2018-07-17 20:54:24 +00:00
Jon Miranda
5aab8703ee Increase max distance for folder creation for tablets.
Tablets generally have larger cell sizes (relative to phones, and relative to
the icon sizes with the cells). By increasing the distance from 55% to 75% of
icon size, it is easier for users to meet the folder creation threshold before
the icon reorder timeout is triggered.

Bug: 110796219
Change-Id: I8264390b8510340f4062e05ec12d0755e93a80d8
2018-07-17 13:52:24 -07:00
Sunny Goyal
c487b36519 Revert "Create new ShortcutInfo when dropping predicted deep shortcuts."
This reverts commit 4685965355.

Reason for revert:
Bug: 111435256

Change-Id: I4baf35dcc944915acad9b62d6e36a6858f89af85
2018-07-13 17:03:34 +00:00
Sunny Goyal
36b54228fc Retiring some feature flags
Change-Id: I80a00ecaec0785ce2ba6a5f14a54c8a76f555d43
2018-07-10 13:52:17 -07:00
Sunny Goyal
83fd25e3af Moving some abstract classes to interfaces, to better use java-8 features
Change-Id: I862af4931c95cbde052130d8b7d4ac3375db782f
2018-07-09 17:01:28 -07:00
Jonathan Miranda
3871e72686 Merge "Fix bug where add to folder fails even when folder creation animation runs." into ub-launcher3-edmonton-polish 2018-06-14 23:14:15 +00:00
Jonathan Miranda
c73a972ce9 Merge changes from topic "am-a3d615af-02aa-451c-b89c-c1f59300b566" into ub-launcher3-master
* changes:
  [automerger] Fix bug where add to folder fails even when folder creation animation runs. am: 36f6359c21
  Fix bug where add to folder fails even when folder creation animation runs.
2018-06-14 23:14:15 +00:00
Jon Miranda
36f6359c21 Fix bug where add to folder fails even when folder creation animation runs.
If the distance > max distance for folder creation, we clear the drag mode
if it was previously set.

Bug: 78919972
Change-Id: Ibd456c0981ebb20958c54d21ba3996172d2dd554
2018-06-12 15:26:52 -07:00
Vadim Tryshev
74c261c89f Prerequisites for TAPL
Adding things that will be used by TAPL.

1. Adding Ctrl+W to open widgets
2. Marking a UI element with shortcuts_and_widgets
id. Example of usage: we want to be sure we are in all apps.
A somewhat paranoid way to check this is to check that
apps_view is on, and workspace and overview_panel are off.
However, workspace is always in the hierarchy. We use
shortcuts_and_widgets instead.

Bug: 110103162
Test: Manual
Change-Id: I2a851e16c477f7ee895b459530bc5a1ff19e32f8
2018-06-12 14:54:23 -07:00
Android Build Merger (Role)
cd622e1e7c [automerger] Reporting range of visible tasks am: 528b9e0615
Change-Id: If07b140aa110e7fb8f8ef17637454126248720c1
2018-05-25 19:25:49 +00:00
Vadim Tryshev
528b9e0615 Reporting range of visible tasks
Also fixes task position being incorrectly reported specifically for
swipe events due to using stale getCurrentPage().

Bug: 72222505
Test: Manual
Change-Id: Ic79b67f8a6ffbfabc397b411b14afc309405197e
2018-05-25 12:24:40 -07:00
Jon Miranda
31942e788b Fix bug where icon 'jumps' on long press.
Bug: 76155869
Change-Id: I739b00564b0ebe00b3aff326b3c1d62deea9d1d3
2018-05-25 01:49:37 +00:00
Sunny Goyal
e598699dc5 Remove custom focus logic
Using the system logic for focus handling so that partially visible contents are
properly handled, eg in overview only hotseat is visible
This does changes the focus logic on workspace when both icons and widgets or different sizes
are present, we may consider reviving (parts of) this logic in the future

Bug: 80189843
Change-Id: I874e284e0a62b579c24d36db9b74da3de7a7e367
2018-05-23 10:54:18 -07:00
Vadim Tryshev
98913d0c95 Remove code duplication
Bug: 72222505
Test: Manual
Change-Id: I6ae6ac7474b44c16bd765635e32d2e843bc02cac
2018-05-18 18:41:34 -07:00
Jon Miranda
8d994cd6d5 Fix bug where Workspace page alpha stays 0 in SpringLoaded mode.
The page alpha gets set to 0 by updatePageAlphaValues sometime between
Workspace calling goToState(SPRING_LOADED) and onStartStateTransition.

By the time the transition is over, Workspace is no longer in a modal state
and so alpha never gets restored via updatePageAlphaValues.

Bug: 76449277
Change-Id: I95241395594dd9084763cc3bc51bc55319cadb73
2018-05-16 15:32:54 -07:00
Sunny Goyal
6001ea2e2f Separating the draglayer alpha into multiple dimensions so that different animaitons
can run without affecting the other.

Bug: 79323355
Bug: 78880824
Change-Id: I11cb464ebdaad0a7f0a56d4bc4c3dff1d56da16b
2018-05-11 12:18:39 -07:00
Sunny Goyal
5d1873a812 Removing scrim overdraw
> Moving all the scrims to draglayer to avoid creating multiple layers during
  various animations
> Removing sys-ui scrim in various states which alread have a background scrim

Bug: 74556464
Bug: 78585335
Change-Id: I8a3fd34ed440f3c7d2e19b3cdb4b72723c535602
2018-05-10 10:52:31 -07:00
Tony Wickham
56b247da1d Merge "Add atomic recents animation while swiping up" into ub-launcher3-edmonton 2018-05-09 20:13:23 +00:00
Tony Wickham
6becf7c07d Add atomic recents animation while swiping up
State handlers can now specify atomic and non-atomic components of
their animations to states, which can be specified when creating a
new animation. There is now one atomic animation, when going from
NORMAL to OVERVIEW (and in reverse):
- RecentsViewStateController's animation (scale/alpha) is all atomic
- WorkspaceStateTransitionAnimation has atomic and non-atomic:
  - Hotseat and workspace alpha is atomic, as is workspace scale
  - Everything else (scrim, translation, qsb and drag handle alpha) is
    non-atomic
- All apps progress is non-atomic

Also simplified dragging through overview; no longer pulls against you,
so we use an OvershootInterpolator when flinging instead of our custom
interpolator for the spring effect.

Bug: 76449024
Bug: 78089840
Change-Id: Iafac84d0c2b99ee9cf9dd5b30e2218286713b449
2018-05-09 12:33:46 -07:00
Jon Miranda
217f0ca2d9 Increase REORDER_TIMEOUT to make it easier for users to create/add to folder.
This is more common for tall devices where cell height is relatively larger
than the icon size.

Bug: 78598193
Change-Id: I2835794e4dbe799d0fadefaa723360145d134550
2018-05-08 10:50:40 -07:00
Sunny Goyal
39306af7d5 Fixing memory leak on rebind
Folder listeners were only cleared on activity destroy

Bug: 79322746
Change-Id: I5da98b864855303d21b86511de2e2982cd56f305
2018-05-07 09:50:10 -07:00
Vadim Tryshev
1c56935c30 Revert "a11y: disabling accessibility scrolling of the home screen"
This reverts commit 52b2b43c56.

Reason for revert: Per an email thread, this CL is considered a hack.

Change-Id: Id97fc9a398184ba18c2188d858218bc2d9ddc16e
(cherry picked from commit 310093d050)
2018-04-30 18:07:13 +00:00
Jon Miranda
d2d39cbfc7 Fix bug where workspace taps were not being sent to WallpaperManager.
Bug: 77218814
Change-Id: Ied464f08dce6f96fd3c56aa790f60a2561edcc84
2018-04-24 15:24:21 -07:00
Vadim Tryshev
52b2b43c56 a11y: disabling accessibility scrolling of the home screen
Bug: 77914605
Test: Manual
Change-Id: I5dcfe7479d7239b1f66bd2e805a1aa8978f5ca5b
2018-04-11 13:43:36 -07:00
TreeHugger Robot
f54a8f345b Merge "Avoid duplicate accessibility announcement upon switching to -1st page" into ub-launcher3-master 2018-04-05 18:02:25 +00:00
Vadim Tryshev
2c430b34cb Avoid duplicate accessibility announcement upon switching to -1st page
Since -1st window already has accessible description, no need to
announce "Page X of Y" for it.

Bug: 74210311
Test: Manual
Change-Id: I5cbfd763778b5f7049be732a750df4501b5419e0
2018-04-05 10:53:08 -07:00
Sunny Goyal
2fd7a8bc59 Updating the UI of the options popup to make it look similar to icon popup
Bug: 77327164
Change-Id: I3580df8bf8a43cb44123f203ffed9a85fa33aea7
2018-04-02 12:28:47 -07:00
Sunny Goyal
81b4c7bb3c Adding a custom view for DragHandle
> Separating page indicator and drag handle
> Page indicator always draws irrespactive of oriantation
> Drag handle is responsible for accessibility interactions
> Adding assissibility actions for DragHandle

Bug: 72500733
Change-Id: I9030337456964af1bdf77f1c01956452321f9229
2018-03-26 15:52:03 -07:00
Sunny Goyal
0b0847b272 Fixing taskMenu and taskView clicks in fallback activity
> Extracting common methods from Launcher & DragLauncher to base classes
> Remoting some dependencies on Launcher and using the base class instead

Change-Id: I121cacf8a14190b4703cda60bdeb4f79eee69ded
2018-03-15 17:29:43 -07:00
Sunny Goyal
7c7be8c20a Simplifying options popup and overview handling
> Removing support for page drag-n-drop from pagedView
> Removing Overview UI from Launcher3 without quickstep and using options popup instead
> Removing touch handlers from CellLayouts and showing options popup based on workspace long press
> Excluding touch outside inset when showing the popup

Bug: 74136505
Change-Id: I34c2a7ff58452db26f5d1a85d554be40fc75f2b8
2018-03-13 12:57:32 -07:00
Sunny Goyal
8a2a63b3f0 Moving click and long click handling for items from launcher to separate class
Change-Id: I1d12862205f7fa7f3671ff351e66dba58bb430e2
2018-03-08 15:21:42 -08:00
Tony
4d9103215d Show icon when drop on deferred drop target is canceled
Before:
Drag to uninstall -> cancel -> icon stays hidden

Now the icon reappears.

Bug: 74356377
Change-Id: I7a69e583098bced31cf38af04dc9861dfa4118e2
2018-03-08 13:54:52 +00:00
Sunny Goyal
6639a5dfe0 Updating the scrim and landscpae ui
> Instead of views, using a custom class to draw the color scrims
> All-apps has full screen UI
> Quickstep does not have search box in landscape

Bug: 73085356
Change-Id: I360a78a2ade0134daad29fe712796cd39a381fbb
2018-03-01 11:23:46 -08:00
Hyunyoung Song
b3fbc0ba8f Quick step/scrub/switch logging
- state transition happening due to Home and back is handled by
  specifying src target as 'from' container and dst target as the 'to'
  container
- Source and Destination container shows FROM and TO state for SWIPE/FLING
- event.isStateChange = true indicates that an action resulted in
  state transition
- Elapsed container millis is the screen time on the source container

Bug: 70181187

- logcat printout with setprop log.tag.UserEvent VERBOSE
1) State: WORKSPACE -> ALLAPPS
  action:FLING direction=UP
  Source child:HOTSEAT id=0	parent:WORKSPACE id=0
  Destination child:ALLAPPS
  Elapsed container 1225 ms, session 1225 ms, action 0 ms

2) ALLAPPS -> HOMESCREEN
  action:FLING direction=DOWN
  Source child:ALLAPPS	parent:ALLAPPS
  Destination child:WORKSPACE id=0
  Elapsed container 971 ms, session 2197 ms, action 0 ms

3) HOMESCREEN -> OVERVIEW
  action:FLING direction=UP
  Source child:NAVBAR	parent:WORKSPACE id=0
  Destination child:TASKSWITCHER
  Elapsed container 4834 ms, session 4834 ms, action 0 ms

4) OVERVIEW-> ALLAPPS
  action:FLING direction=UP
  Source child:TASK	parent:TASKSWITCHER
  Destination child:ALLAPPS
  Elapsed container 2176 ms, session 7010 ms, action 0 ms

5) ALLAPPS->OVERVIEW
  action:FLING direction=DOWN
  Source child:ALLAPPS	parent:ALLAPPS
  Destination child:TASKSWITCHER
  Elapsed container 3683 ms, session 10693 ms, action 0 ms

6) OVERVIEW-> HOMESCREEN
  action:FLING direction=DOWN
  Source child:TASK	parent:TASKSWITCHER
  Destination child:WORKSPACE id=0
  Elapsed container 2108 ms, session 12801 ms, action 0 ms

7) APPS-> OVERVIEW
  action:FLING direction=UP
  Source child:NAVBAR	parent:APP
  Destination child:TASKSWITCHER
  Elapsed container 104 ms, session 104 ms, action 0 ms

8) Quickscrub: action:DRAGANDDROP Source child: QUICK

9) Quickswitch: action:FLING Source child: QUICK

Change-Id: I5898230859ff600f48a2a873a40b670fe4d39a0d
2018-02-20 22:40:19 -08:00
Jon Miranda
4685965355 Create new ShortcutInfo when dropping predicted deep shortcuts.
We were modifying the ShortcutInfo for the predicted app in All Apps,
so we would display "Remove" instead of "Cancel" because the item
was given an id.

Bug: 73377438
Change-Id: I1b9788bbf089d304a2868de866c78932fececed9
2018-02-20 08:45:13 -08:00
Sunny Goyal
bf6dfc5fa7 Fixing ANR when using quickscrub from homescreen
Change-Id: Id355726f7ec72dc2fd28a3e757355d1143464001
2018-02-13 17:17:48 -08:00
TreeHugger Robot
ba7d129aac Merge "Using paged view for all-apps tabs" into ub-launcher3-master 2018-02-13 18:06:24 +00:00
Sunny Goyal
0bd7f4f2dc Using paged view for all-apps tabs
Bug: 72811152
Change-Id: I0cca426d935f079c923b93fe3d4399f87778fe95
2018-02-13 09:55:29 -08:00
Tony Wickham
618a5044cf Allow quick scrub/switch from minus one
Launcher's window doesn't have focus when on minus one. In this case, we
tell the minus one overlay to hide and add a window focused callback to
start quick scrub/switch after launcher regains focus. Since the
transition from minus one takes longer than for launcher to get window
focus, we also defer until the overlay is completely hidden before
starting the quick scrub transition.

Bug: 70180755
Change-Id: Ifcf85aaf1942b51394e68e209b89807fa4007afe
2018-02-13 08:18:57 -08:00
Jon Miranda
23585182cd Fix bug where two items could occupy same grid cell in hotseat.
When long pressing on an app to start, a drag would start on the
Workspace but mDragInfo would not be cleared since onDropCompleted
is not called in this case.

Solution is to set mDragInfo to null in onDragEnd.

Bug: 72206125
Change-Id: I2b9a1563c80e591d946a44f4e949b71f7b423a00
2018-02-09 15:33:37 -08:00
Sunny Goyal
85a7fe086b Some fixes for quickstep when configuration changes
> Creating the launcher animation after first draw, so that the UI is in correct state
> Using correct workspace size, when layout is not valid
> Snapping pagedView to correct page when page size changes
> Resoting to correct workspace page on rebind

Change-Id: I74e61a05aae3a3c4912d4c5c8eb4d5d036d9005a
2018-02-02 11:02:51 -08:00
Sunny Goyal
19d32b76dd Removing multi-state apha control for hotseat
Change-Id: I68ccbe96caa70921aefd18fc8ec9ad0638c3fab1
2018-01-19 14:26:44 -08:00