1026 Commits

Author SHA1 Message Date
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
Sunny Goyal
1ce9c476f7 Removing some methods from the DragSource
This makes is easier to create new DragSource and sets up
proper default values in DragOptions

Change-Id: I6cb0b1df41b9730cf29f785fe85fe7f0b573ee3a
2017-10-03 16:18:46 -07:00
TreeHugger Robot
0474222c25 Merge "Removing buildLayer call on workspace pages." into ub-launcher3-master 2017-10-03 22:39:49 +00:00
Sunny Goyal
3792096688 Allowing the widgetBottomSheet to be dragged
even when the touch is started from outside the panel

Removing various instanceOf checks in onNewIntent and onBackPress
and moving all the corresponding logging in the FloatingView
This simplifies handling of panel specific log and avoids
missing a particular panel type in the if-else statement.

Bug: 64751884
Bug: 64751923
Change-Id: I98f5aae18560a64be73c9efcf495479740d49a00
2017-10-02 16:18:52 -07:00
Sunny Goyal
a502aa313b Removing buildLayer call on workspace pages.
> buildLayer was followed by setLayerType(NONE) which was causing the
layer to get destroyed immediately and hece was never useful.
> Also removing mAnimatingViewIntoPlace as after setting this to true
updateChildLayer was never being called.

Change-Id: I08a6da25de002247c956308973f1675c0e61e15c
2017-10-02 16:10:35 -07:00
Sunny Goyal
aa3a2baab6 Simplifying drag preview generation
> Fixing wrong icon normalization when dragging a folder icon
> Reusing the preview bitmap for creating dragOutline
> Generating drag outline on the background thread

Bug: 35428783
Change-Id: I01e724ba63404302090ee1e562f6c2fc7147ba2f
2017-09-27 09:10:05 -07:00
Jonathan Miranda
ef4697fdad [automerger] Fix bug where widgets are inflated in the wrong orientation. am: 6bed350b75
Change-Id: I9d4bdaba96fe6afc90a48a141cd3af640b592a7a
2017-09-19 21:43:36 +00:00
Jon Miranda
6bed350b75 Fix bug where widgets are inflated in the wrong orientation.
The bug is that in onResume, the context may tell us the wrong
orientation.

As a workaround, we store the orientation that the Launcher
is created with, and we use that orientation to check whether
we actually need to reinflate the widgets.

Bug: 64916689
Change-Id: I5194debbd217a573d1f177c31d8c0abdf9da51b5
2017-09-19 14:43:17 -07:00
Sunny Goyal
952e63d006 Fixing custom widgets support:
> Moving the definitions to xml so that it is easier to override in derivative projects
> Fixing verious bind and save logic for custom widgets
> Adding feature flag to easily disable custom widgets

Change-Id: I0e278bc7dd415713029364060ef10842da990be9
2017-09-13 14:04:35 -07:00
Jon Miranda
6d3586c761 Polish animation when icon returns to Folder.
ie. The animation when the user drags an icon from a Folder to a
full workspace/hotseat.

Bug: 31443188
Change-Id: If51b23cd8fc822543ac3f550f9fd2e48dd58e0e9
2017-09-11 11:01:31 -07:00
Sunny Goyal
7ce471bdf6 Removing support for CustomContent screen
The supported way to customize Launcher and add a "-1 page" is by
using LauncherOverlays. Custom content screen is no longer supported.

Change-Id: I3f8a2734c287d1a69ae0c038ec1de1d45fa1b464
2017-09-08 14:06:30 -07:00
Jonathan Miranda
a42947a6fa [automerger] Fix bug where workspace is not aligned with hotseat in landscape. am: 9593f9ed0c
Change-Id: I780f4e8daaa9db4f9740c345d462d129b1e83ee0
2017-08-09 22:00:21 +00:00