Commit Graph

12953 Commits

Author SHA1 Message Date
Sunny Goyal
6c46a6d324 Using java_style enum generation for proto
This makes it easier to track various method parameters and simplifies
debug logging

Change-Id: Ib7c3d52590d0c36b2c8460c889ee3bead3454569
2016-12-15 09:30:35 -08:00
Sunny Goyal
fa94c79ca6 Consolidating a few log util methods
LoggerUtils had a lot of methods with same name and similar arguments
but completely different behavior.
Instead only defining macros in LoggerUtils and movoing the action
logic in the UserEventDispatcher.

Change-Id: Ibce8ea1a0890499b47c950930accb9b28473f44c
2016-12-15 08:19:18 -08:00
Sunny Goyal
f5440cbd6c Removing FeatureFlag.LAUNCHER3_LEGACY_WORKSPACE_DND and corresponding logic
Change-Id: Ie10c087b4f72ee27be5bf12e2c81be5b7a3a6176
2016-12-15 08:05:09 -08:00
Jon Miranda
e96798e885 Smooth animation when dropping a widget in multi-window mode.
Factored in app widget scaling in methods related to estimating
widget size and positions.
ie. Dropping a widget that needs to be resized to fit in the
workspace.

Bug: 32176631
Change-Id: I106fe12041565a090047f146a07d4bc80a074b4a
2016-12-14 16:30:20 -08:00
Sunny Goyal
8f03c86b3a Merge "Refactoring FlingToDelete" into ub-launcher3-master 2016-12-14 22:10:31 +00:00
Sunny Goyal
0f76b56865 Refactoring FlingToDelete
> Moving all fling related logic to FlingToDeleteHelper from DragController
> Removing fling related methods from DragSource and DropTarget
> Moving fling animation logic from DeleteDropTarget to FlingAnimation
> Simplifying DropTargetBar to directly look for all valid drop targets.
  This makes it easier to add new DropTarget in xml.

Change-Id: I7214d2d30c907ab93c80d92d9f9be6dda2d63354
2016-12-13 23:39:16 -08:00
Tony Wickham
d3e02eba13 Merge "Don't let AllAppsTransitionController intercept when a floating view is open." into ub-launcher3-master 2016-12-14 05:06:09 +00:00
Jonathan Miranda
466c4131d8 Merge "Scale folders to fit within the available height and width." into ub-launcher3-master 2016-12-13 19:19:03 +00:00
Jon Miranda
c1b2399540 Scale folders to fit within the available height and width.
* In the previous implementation, the folder icon size would
not get updated if the cell height/width was set to the minimum
value not including the folderChildIconSizePx AND the usedLength
was less than the maxLength.
* The bug is only really noticeable in an unlikely multi-window
landscape mode, which is why it was not noticed before.

Change-Id: I776c6f710e081645cff891487022cf787869ee3f
2016-12-13 11:09:13 -08:00
Jon Miranda
26e4d17a73 Resize widget frame now wraps the scaled widget view.
Previous implementation had space between the frame and
the widget ie. letterboxing.

Bug: 32176631
Change-Id: Ie50279f4edb94812120dea492aefa4f18218162f
2016-12-13 08:53:57 -08:00
Tony
139a25a7a8 Don't let AllAppsTransitionController intercept when a floating view is open.
Previously we checked for deep shortcuts when closing all apps by swiping
down. Now we check any AbstractFloatingView, and when swiping up.

Bug: 33542711
Change-Id: I860eb55c69567a92cd626e966bf881b7d1bffc6e
2016-12-12 22:23:28 -08:00
Hyunyoung Song
824c540f19 Merge "nav bar on all apps container should use light theme. b/33553066 Change-Id: Ic9eb796a01eaa8d00fbeedeb5456876b668e6db2" into ub-launcher3-master 2016-12-12 22:51:06 +00:00
Hyunyoung Song
df9f14746c nav bar on all apps container should use light theme.
b/33553066
Change-Id: Ic9eb796a01eaa8d00fbeedeb5456876b668e6db2
2016-12-12 14:34:10 -08:00
Sunny Goyal
1d896b011d Merge "Adding a generic method to initiate overridable objects" into ub-launcher3-master 2016-12-12 22:20:36 +00:00
Tony Wickham
72537e44f6 Merge "Move icon back to original cell if a quick drag would cause reorder." into ub-launcher3-master 2016-12-12 22:17:02 +00:00
TreeHugger Robot
2a2b1ad8fd Merge "Lower the transition threshold for dropping on Workspace." into ub-launcher3-master 2016-12-12 22:02:55 +00:00
Tony Wickham
251ab6e847 Lower the transition threshold for dropping on Workspace.
Old threshold: 0.5f
New threshold: 0.25f

The threshold is used when dragging to Workspace from any
drag source other than Workspace, including Hotseat. This
lowered threshold is more forgiving for faster drags.

Bug: 33210055
Change-Id: Ic121fb4b7caa3ea66abb48a8a3f3bd36f3365749
2016-12-12 13:56:36 -08:00
Tony Wickham
cf160d392a Merge "Allow long-press on workspace immediately after dropping." into ub-launcher3-master 2016-12-12 21:03:24 +00:00
Tony Wickham
0c7852f822 Allow long-press on workspace immediately after dropping.
Previously the touch was consumed until the transition from
spring-loaded to normal workspace finished, leading long
presses to trigger on the background rather than on apps.
This made it difficult to move multiple icons consecutively.

Bug: 29631912
Change-Id: I259e618c81f56bc40d08a5d63ddbbf3c82a76baf
2016-12-12 12:51:27 -08:00
Sunny Goyal
776ca257ce Merge "Defining various modes for CellLayout: Workspace, Hotseat & Folder" into ub-launcher3-master 2016-12-12 20:45:17 +00:00
Sunny Goyal
177bb5a9ba Merge "Adding support for app widgets in the InstallQueue" into ub-launcher3-master 2016-12-12 17:16:46 +00:00
Sunny Goyal
ab121c1715 Adding a generic method to initiate overridable objects
Change-Id: Ia433427c65ad38804f2eed9c6bc209df232758c0
2016-12-12 17:01:11 +00:00
Sunny Goyal
3be633b82f Adding support for app widgets in the InstallQueue
Bug: 32904959
Change-Id: I0d07a0c59d266493ae30a42579c1fa69b805009e
2016-12-12 08:37:33 -08:00
Hyunyoung Song
59dfebcaee Merge "Build empty test apk until junit dependency issue is sorted out." into ub-launcher3-master 2016-12-08 23:05:33 +00:00
Hyunyoung Song
4c82c33a64 Build empty test apk until junit dependency issue is sorted out.
Change-Id: Ib63a654139e43c433011d0f7b761905426aff24d
2016-12-08 14:58:44 -08:00
Tony Wickham
0c87e735e1 Merge "Set PreloadIconDrawable disabled = false when restore is complete" into ub-launcher3-master 2016-12-08 22:27:41 +00:00
Tony Wickham
e391bd5a9a Set PreloadIconDrawable disabled = false when restore is complete
This ensures that it regains its color rather than remaining gray.

Bug: 33429398
Change-Id: Ic073570613aa01f061f0f3093cf05ee74332ae8a
2016-12-08 14:13:27 -08:00
Jonathan Miranda
72169102db Merge "Scale widgets when dragging and dropping in multi-window mode." into ub-launcher3-master 2016-12-08 18:43:17 +00:00
Jon Miranda
f7ff3fe58a Scale widgets when dragging and dropping in multi-window mode.
This change mimics the non-MW mode behavior when dragging and
dropping widgets by taking the app widget scale into consideration.
This ensures a consistant drag and drop experience between
MW mode and non-MW mode.

* Uses cell data (cell height/width, spanX/Y) to get the expected
widget sizes.
* Scales sizes when necessary.

Bug: 32176631
Change-Id: Icdaf73ecd89a30e57fe7f405292d793f2d6a3ee8
2016-12-08 10:28:51 -08:00
Sunny Goyal
621e200647 Merge "Simplifyling widget inflation and addition flow." into ub-launcher3-master 2016-12-08 00:46:10 +00:00
Sunny Goyal
b4a192b5da Merge "Adding support for deep shortcuts in Install queue" into ub-launcher3-master 2016-12-08 00:36:24 +00:00
Sunny Goyal
55cb70bf70 Adding an overridable DrawableFactory to allow creating custom icon drawables
> Adding ItemInfo as a parameter for creating drawable

Change-Id: I793acb0381d2b8df4db0a08317dddf1464788ebc
2016-12-07 15:55:47 -08:00
Sunny Goyal
d5462aa31b Simplifyling widget inflation and addition flow.
> Removing insert parameter used to select the index of the view.
  ShortcutAndWidgetContainer no longet relies on the index and instead
  uses x and y to refer a particulat view.
> Creating helper methods to easily insert the icon by passing ItemInfo
  directly. LauncherModel.addItemToDatabase synchronously updates the
  ItemInfo with proper postion information. So we can directly use the
  info instead of passing each parameter separately.

 Bug: 32904959

Change-Id: I021c1b818f2f42604b95a6970e06aacc7211292a
2016-12-07 13:16:08 -08:00
Tony Wickham
5dc7435b33 Move icon back to original cell if a quick drag would cause reorder.
Most likely the user accidentally dragged the icon, so let's not
rearrange their home screen.

Bug: 30378199
Change-Id: I815a0817bca3b0d212324a58842b1f59dfdf0b91
2016-12-07 10:33:16 -08:00
Tony Wickham
4633be64e8 Fix for mTransitionProgress not being updated throughout animation.
Change-Id: I8f792794b7bc6edff081383b5a0a74af04a744ad
2016-12-06 17:11:35 -08:00
Sunny Goyal
f75baa9f40 Adding support for deep shortcuts in Install queue
Bug: 32904959
Change-Id: Ida43bcf78da716defdf95eb704c31973bc390ea1
2016-12-03 15:55:13 +05:30
Sunny Goyal
36f71f873b Merge "Bug fix: QSB sometimes gets stuck to transparent." into ub-launcher3-master 2016-11-30 17:50:01 +00:00
Sunny Goyal
b7f5431232 Merge "Moving ShortcutInfo creation in InstallShortcutReceiver to background thread" into ub-launcher3-master 2016-11-30 16:42:31 +00:00
Sunny Goyal
2bcbe13c64 Moving ShortcutInfo creation in InstallShortcutReceiver to background thread
> Creating shortcut info requires iconCache access

Bug: 21325319
Change-Id: I3317d8b6824aa05b836f3ed3626f169d4d34f783
2016-11-30 05:47:57 +05:30
Sunny Goyal
70fc828256 Merge "Fixing wrong message sent on app widget host reset" into ub-launcher3-master 2016-11-30 00:10:06 +00:00
Sunny Goyal
72db9afef4 Fixing wrong message sent on app widget host reset
Change-Id: If5842d4ebbf3fa0ef8596f22788f909748f01ac5
2016-11-29 07:26:20 +05:30
Sunny Goyal
1c581c6d61 Bug fix: QSB sometimes gets stuck to transparent.
At some places, we were calling removeAllListeners before calling cancel
 on an animation. AnimationListeners are also used to track states, and
 removing listeners before canceling will prevent onAnimationEnd to be
 called, thus preventing state cleanup.
 PinchAnimationManager was causing ZeroAlphaAnimatorListener to be removing
 from Qsb alpha animation, making the MultiStateAlphaController think there
 is a zeroAlpha animation running.

> Removing all instances of removeAllListeners
> Updating various affected listeners to handle onAnimatinoCancel
> Fixing WorkspaceStateTransitionAnimation, which was animation QSB alpha
  on page scroll index

Bug: 31910152
Change-Id: Ie7f31b67d4c502badcdd41f7b04867d1f35f5d27
2016-11-24 15:32:45 +05:30
Jon Miranda
7ae64ffbe1 Scale widgets in multi-window mode.
To keep this CL small and focused, I'm going to create
a separate CL that handles the scaling for the widget in
drag and drop mode.

Bug: 32176631
Change-Id: Id6557d070edb664aa1f4851de7abf494cf8a0677
2016-11-23 10:32:42 -08:00
Jon Miranda
feba90fe80 Added logging for HOME_INTENT and BACK commands.
Document: go/false-longpress-overview

Change-Id: If6ba4996c861a44f4950b41acb4246e3a483d8f2
2016-11-21 17:01:24 -08:00
Hyunyoung Song
0860e41d50 Add logging for workspace rearrangement in overview mode
am: 0d4899026c

Change-Id: Ie6569ecafdd63981e167a910f852a8133697ae81
2016-11-21 19:48:08 +00:00
Sunny Goyal
d423a8b868 Merge "Changing DeepShortcutManager to have a singleton contructor instead of getting it from LauncherAppState" into ub-launcher3-master 2016-11-21 17:07:05 +00:00
Sunny Goyal
0993a37838 Merge "Adding a utility class to enforce that icons are always flattened on the background thread." into ub-launcher3-master 2016-11-21 17:02:10 +00:00
Sunny Goyal
dde4fd971e Changing DeepShortcutManager to have a singleton contructor instead
of getting it from LauncherAppState

This follows the design of other managers and makes it easier to access it
from other processes and non-ui thread.

Bug: 33032833
Change-Id: I8ad82ae5b6cc47bae885f9896985675c7dd0d5b8
2016-11-21 22:28:23 +05:30
Sunny Goyal
c13403c612 Defining various modes for CellLayout: Workspace, Hotseat & Folder
> Moving the definition of modes to xml
> Defining attributes in xml

Change-Id: I7a569fdbeb833d569eeeef2f2cbc8214e608ad11
2016-11-21 15:20:16 +05:30
Sunny Goyal
aa8a871e33 Removing widgetGap and heightGap from cellLayout
This values are always set to 0

Change-Id: Ic317efdc65baa22e915f4766c60c67c116bb94a8
2016-11-20 15:26:26 +05:30