Commit Graph

737 Commits

Author SHA1 Message Date
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
Sunny Goyal
ce8809a588 Reapplying state UI when the insets change
Change-Id: Ief9588400f332b2c5b084a8a11c3102b2c20c4ea
2018-01-18 14:03:19 -08:00
Sunny Goyal
12069e6cbf Removing some device profile dependencies in view contructors
Bug: 71709920
Change-Id: I13e33dceaeff71e3fb7bbb93f24be69c17d6da96
2018-01-16 14:17:47 -08:00
Sunny Goyal
07b6929cd9 Removing layout handling in DeviceProfile and moving it to
individual views

Bug: 71709920
Change-Id: I8300fa7a84b31898bdb135d774cca576d2928525
2018-01-10 15:13:25 -08:00
Sunny Goyal
228153d92a Updating landscape layout for launcher/quickstep
> Hotseat is tied to navbar (on left in seascape)
> Search box shows up in Overview (clicking it would crash for now)
> All-apps is no longer fullscreen in landscape
> Recents cards are appropriately scaled down
> Hotseat is visible in Overview

Bug: 70179916
Change-Id: I53149eaeac9557e8a01021b7e2d139f3d6ceef37
2018-01-08 13:53:44 -08:00
Sunny Goyal
29947f0b53 No more waiting around for resume
Apply model updates as son as they arrive instead of waiting for onResume.
Various workspace items do not use any configuration dependent resources.
For Widgets, we wait until the host starts lietening before inflating the actual view.

Change-Id: Icb2f5e5940c1ce6c27062ccd34eff87e80af5ab1
2017-12-19 12:50:17 -08:00
Sunny Goyal
d0030b05f5 Adding placeholder method for compat implementations for Accessibility manager
> Moving some utility methods to the compat class

Bug: 69611105
Change-Id: Ide0cab0b926d7bc03617fc568d2a2b429ee00cd9
2017-12-08 16:09:45 -08:00
Sunny Goyal
3c585ddbf7 Removing view layer support during state animation.
View layer was only being used when fading in/out hotseat in overview.
From API 21+, android automatically create layers when animating alpha

The current support for view layers does not work properly when cancelling
animations and controlling partial animations

Change-Id: I2d5785471af9819575beefe65f1f2bdd28c76bd5
2017-12-07 14:18:16 -08:00
TreeHugger Robot
47f5914069 Merge "Adding support for tagging animations per controller, so that they can be controlled independently" into ub-launcher3-master 2017-12-07 22:11:40 +00:00
TreeHugger Robot
9a774e4489 Merge "Do not modify the children order while iterating the viewgroup" into ub-launcher3-master 2017-12-07 21:39:48 +00:00
Sunny Goyal
e3c6d58b71 Adding support for tagging animations per controller, so that they can be controlled independently
Change-Id: I6f360362aa16f7e02fe5fe84976b23663f228030
2017-12-07 12:46:26 -08:00
Sunny Goyal
bc683e9d06 Separating various UI properties into state variables
> Using workspace scale and translation for all-apps
> Without quickstep, workspace has the parallex effect as before
> With quickstep, workspace scales down to match the recents card width
> Using a single animator for recents views in case of state transtion and
  controlled transition to prevent going into inconsistant state.

Change-Id: I1864de6892052ca771f4d0062e3d60c28840a72d
2017-12-06 14:29:33 -08:00
Tony Wickham
53370678ce Allow hotseat items to be clicked in overview
Bug: 70179573
Change-Id: Ib2cbd7b12e5e1287d652d703e95c15ca6ea12a4e
2017-12-05 11:40:21 -08:00
Sunny Goyal
c7d808a424 Do not modify the children order while iterating the viewgroup
Bug: 69799241
Change-Id: I06a0a88aadc41cd93081a7de90e641283e79ec70
2017-12-04 14:52:13 -08:00
Sunny Goyal
ac00cba35c Simplifying workspace layout
Instead of creating workspace view larger than the screen size (so that it can be
zoomed out), restricting the size to the parent size and bypassing the drag events
directly to Workspace (since the workspace is smaller when zoomed out, it might not
qualify for all events otherwise).

Change-Id: I45e213dd6d16bec5feb6e7cf90bc6f7de4c6d305
2017-11-13 16:00:06 -08:00
Sunny Goyal
3a052d413d Merge "Adding some task views." into ub-launcher3-master 2017-11-10 21:13:14 +00:00
Winson Chung
8ae4198a44 Adding some task views.
Bug: 69166452
Test: Build quickstep
Change-Id: Iee4cb0b9ac32716f588082a197a90ec1b2655047
2017-11-10 12:03:43 -08:00
Sunny Goyal
c4fa8c312b Changing the state UI logic for normal build and quickStep build
> Creating ShareHandlers for managing UI
> In normal build, hotseat is hidden in overview, while in QuickStepBuild, it is visible

Change-Id: I5f8d35c75b861d912d93fce186b5dd74106184c3
2017-11-07 12:24:47 -08:00
Sunny Goyal
16764588c9 Separing the overview states for normal and quickstep builds
In QuickStep, adding a placeholder ScrollView and changing the state logic
appropriately to handle that

Change-Id: I10223c0692788d6e5dbf8c408c01cafb4e39bd2c
2017-11-07 09:46:20 -08:00
Sunny Goyal
85525173ce Rearranging the code structure to allow replacing state logic.
Change-Id: I6f83d0f77045ba189f02dd465bf70ffc2a239aa1
2017-11-06 14:57:50 -08:00
Sunny Goyal
031022029b Using state animation to control all-apps transition
> Separating all-apps transtions control and vertical shift touch handling
> Creating separate spring handler for search box (to avoid adding and removing spring)
> Driving all-apps vertical shift using state AnimatorSet

Bug: 67678570
Change-Id: I3b6a4d1f43275a5f485b399444742b6b9a8c4bb9
2017-10-31 15:29:02 -07:00
TreeHugger Robot
4fc994c988 Merge "Consolidating various interpolators" into ub-launcher3-master 2017-10-27 02:35:30 +00:00
Sunny Goyal
5bc6b6f14c Consolidating various interpolators
Change-Id: I9588eee3552001b162a1e8d5ccefcfb44d221880
2017-10-26 16:38:55 -07:00
Sunny Goyal
ea60926c3f Moving mState from Workspace to StateManager
Bug: 67678570
Change-Id: I8cdab044d0760fcc4c188830cde4f963d072b907
2017-10-25 15:48:01 -07:00
Sunny Goyal
3e3f44c3ad Exposing the state manager directly instead of providing various helper methods for state change
Bug: 67678570
Change-Id: If3d05c804c034ffa5e403da8eaa23e85e373c863
2017-10-25 13:41:13 -07:00
Sunny Goyal
4d519f2568 Enable overview state restore
> Reapplying CellLayout state when new pages are added (page bind comes after restore)
> Removing support for different scroll range for freescroll (the calculations were not
  consistant with maxScroll)

Bug: 67678570
Change-Id: Ic1911de1b707f2f6940e7040f07ca7e733e2ef2a
2017-10-24 10:39:24 -07:00
Sunny Goyal
c99cb174c3 Moving some state specific logic to subclass of LauncherState
Bug: 67678570
Change-Id: I1316f91c9f19bd572e4a0da67a22fa8921e1dcf9
2017-10-20 13:56:47 -07:00
Sunny Goyal
f9403d92fa Removing state definition from Launcher
State is only maintained is workspace and is used for all the UI

Bug: 67678570
Change-Id: Ie3cce5a1f4ada3913d0480f7918c27460dacbd34
2017-10-18 15:04:22 -07:00
Sunny Goyal
4c7f215651 Moving Workspace states into a separate file
Bug: 67678570
Change-Id: I5c63b4df29ca0f58a0223fb1919abc132576a1b6
2017-10-18 09:17:43 -07:00
Sunny Goyal
aeb1643ec6 Launcher state management cleanup
> Removing Widgets and related states
> Fixing different durations being used when opening/closing all-apps
> Removing some unnecessary object allocations when changing state without animation
> Differentiating widget bootm sheel and full sheet in logs

Bug: 67678570
Change-Id: Ic169528736d04ee0b38564b4f96595ba066eabda
2017-10-17 12:42:08 -07:00
Sunny Goyal
1797af41d1 Cleaning up drag state management.
When the drag is started, the UI automatically goes into spring loaded mode. On a successful
drop, it is the responsibility of the {@link DropTarget} to exit out of the spring loaded
mode. If the drop was cancelled for some reason, the UI will automatically exit out of this mode.

Bug: 34692289
Change-Id: Ic611739a43bb8d9279b587aaee3039326c143e8b
2017-10-16 13:06:52 -07:00
Sunny Goyal
00c95b8447 Removing some obsolete callbacks
Change-Id: I3cf19a13ff145923f2973e23c24033f196324aa3
2017-10-06 11:56:01 -07:00
TreeHugger Robot
6750836bd0 Merge "Merging duplicate logic for deferred drop handling in Worksace and Folder" into ub-launcher3-master 2017-10-06 17:00:40 +00:00
Sunny Goyal
3dce5f3f50 Merging duplicate logic for deferred drop handling in Worksace and Folder
> All the logic is contained in UninstallDropTarget
> Also fixing a bug were mWaitingForResume was not cleared

Bug: 34692289
Change-Id: I617475ce53062902d6817954fb608198e6e03d3c
2017-10-06 09:07:36 -07:00
TreeHugger Robot
878b5efaa3 Merge "Polish animation when icon returns to Folder." into ub-launcher3-master 2017-10-05 22:12:03 +00:00
TreeHugger Robot
a9e345f886 Merge "Removing some methods from the DragSource" into ub-launcher3-master 2017-10-05 17:20:58 +00:00
Sunny Goyal
213b916ff0 Merge "Moving widget reinflation to push model" into ub-launcher3-master 2017-10-05 17:16:49 +00:00
Sunny Goyal
ba47faae6a Moving widget reinflation to push model
Instead of checking every widget, a widget which needs reinflation
would post a callback on launcher avoiding unnecessary loops in onResume

Bug: 67305604
Change-Id: I53e08d6f4795f7b716a9debca5c0c68dd25a7afe
2017-10-05 09:58:13 -07:00
TreeHugger Robot
8e35dbb2ed Merge "Moving the wallpaper offset interpolator to background thread" into ub-launcher3-master 2017-10-05 15:47:51 +00:00
Sunny Goyal
d0c3d3a53c Moving the wallpaper offset interpolator to background thread
Bug: 67305604
Bug: 25321240
Change-Id: I2d667a4d1a4b91ec2a11e5e171f8a1d1c4222b33
2017-10-05 08:35:05 -07:00