Commit Graph

6043 Commits

Author SHA1 Message Date
Mario Bertschler
a167a6e04b Merge "Enables direct scrolling on the fastscroll bar." into ub-launcher3-master 2017-01-05 19:29:40 +00:00
Sunny Goyal
a39a98dac9 Merge "Fixing onPageBeginTransition not being called when scrolling overlay" into ub-launcher3-master 2017-01-04 21:57:39 +00:00
Sunny Goyal
76dbf6fafd Fixing onPageBeginTransition not being called when scrolling overlay
Bug: 33693546
Change-Id: If212a196648fbb2c725ca4800a157ec24f278ca8
2017-01-04 09:29:16 -08:00
Sunny Goyal
619880f436 Merge "Simplifying IconCache access code" into ub-launcher3-master 2017-01-04 00:33:45 +00:00
Sunny Goyal
3fe4a146cf Simplifying IconCache access code
Providing a way to access icon cache without LauncherAcitivtiyInfo.
This allows fetching LauncherActivityInfo only when required, thus
avoiding system RPC when the icon is already in cache.

Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
2017-01-03 15:58:53 -08:00
Mario Bertschler
ee4ee424b4 Enables direct scrolling on the fastscroll bar.
This enables to touch anywhere in the scrollbar to directly scroll to that particular point
without the need of exactly touching the thumb to start fastscrolling.

This feature is currently behind a feature flag LAUNCHER3_DIRECT_SCROLL and enabled by default.

Change-Id: I5b86c6acb71ff0c88476343657da221c7bdc59c3
2017-01-03 14:22:26 -08:00
Jon Miranda
9f33cb2ce2 Bind the out IntRange using its start and end values.
In applyDeltaAndBound, we add the current IntRange values
+ delta param to the outbound IntRange -- but then we only
bind based on the current IntRange values, so the out IntRange
values can end be out of bounds.

Change-Id: Ibbaae8c2c2734107d1fd7ce8a59a4c66d83068ad
2017-01-03 09:38:11 -08:00
Jonathan Miranda
bf8a265deb Merge "Fix widget reorder animations in multi-window mode." into ub-launcher3-master 2016-12-30 00:42:11 +00:00
Mario Bertschler
83d40e0608 Merge "Fixes a bug where the user ends in freescroll state even for regular workspace mode." into ub-launcher3-master 2016-12-29 23:33:01 +00:00
Sunny Goyal
8ad02b8f3f Removing static access to Context through LauncherAppState
Bug: 33032833
Change-Id: I09baaa6d79187b3096a2ab3a89d7dcaeaf9eee68
2016-12-29 15:12:14 -08:00
Sunny Goyal
c6b833dcbb Merge "Removing all compatibility code below Lollipop" into ub-launcher3-master 2016-12-29 21:29:31 +00:00
Mario Bertschler
dcc26fc693 Fixes a bug where the user ends in freescroll state even for regular workspace mode.
The bug happened while reordering pages in overview mode and clicking the back button.
The fix is to check the precodition in enableFreeScroll if we are in a valid state for enabling freescroll (currently only overview mode).

Bug: 33347786
Change-Id: Icc3005fd431569e2b9e3f52d2249de8ba8d13eab
2016-12-29 12:03:35 -08:00
Jon Miranda
c9c57631a9 Fix clipping of drag outline by increasing padding.
Low resolution will be addressed in future CL.

Bug: 31915722
Change-Id: I6bdd32b7a30819fde1f15473a63ac280029b6715
2016-12-20 10:08:42 -08:00
Jon Miranda
2126691ce2 Fix widget reorder animations in multi-window mode.
The original animation assumed that the views are not
translated and not scaled. In multi-window mode this
assumption is no longer valid, because app widgets are
scaled and translated to fit center within their cells.

Bug: 32176631
Change-Id: Id60c793730d982277c9d91860e9fb0e6a0df7d38
2016-12-20 09:31:47 -08:00
Hyunyoung Song
3285da35cb Nav bar should change to light theme in sync with the status bar
b/33708486

Nav bar should be in sync with status bar in all apps screen.
Nave bar should not change with status bar when in workspace mode.

Change-Id: Ib5a0d33d3e38f1b3ffa9693657ba7de3b6e01fed
2016-12-19 14:46:21 -08:00
Sunny Goyal
a52ecb0390 Removing all compatibility code below Lollipop
Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
2016-12-16 15:05:09 -08:00
Sunny Goyal
90a40570bc Merge "Using support lib for isAtleastO check" into ub-launcher3-master 2016-12-16 22:00:16 +00:00
Sunny Goyal
aecb7cf97c Updating edge scrolling logic during drag and drop
Activating scroll to left when the either the visualCenter or the touchX
enters the left screen first or right screen.
Previously only the touch point was being considered to activating the scroll
zone. But visual center is used everywhere else for actual drop location. So
depending on the touch point relative to the picked icon, the touch zone could
seem smaller or larger.
Using both points (touch and visualCenter) will increase the scroll zone area
with minimal effect on the drop location calculation.

Bug: 31946075
Change-Id: I4eb5146c0f0a05e8d024313d67f8e040e0b29dec
2016-12-16 11:29:06 -08:00
Sunny Goyal
88e5aa1d61 Using support lib for isAtleastO check
Bug: 32610406
Change-Id: I89b3c4f0c99ac605883677cf0becaab0fbf48a86
2016-12-16 11:10:49 -08:00
Sunny Goyal
7c74e4ae64 No more UserHandleCompat
Bug: 32745285
Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
2016-12-15 22:06:10 -08:00
Sunny Goyal
338dee9dd7 Merge "Ensuring that ShortcutInfo always has an icon" into ub-launcher3-master 2016-12-16 00:21:29 +00:00
Jonathan Miranda
99d814e54b Merge "Restore original scaleRectAboutCenter method." into ub-launcher3-master 2016-12-15 19:36:40 +00:00
Jon Miranda
6f6a06ac47 Restore original scaleRectAboutCenter method.
Change-Id: Ibb49c56aab29d1223a0ab36476a32d565566eb25
2016-12-15 11:26:43 -08:00
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
Sunny Goyal
1cd01b023a Ensuring that ShortcutInfo always has an icon
> Making iconBitmap public instead of a getter (similar to AppInfo)
> Removing getIcon() which can lead to IO on UI thread
> Removing updateIcon and handling the update at the caller

Bug: 21325319
Change-Id: I6a49b9043f974e9629ea25e77012d97cc04c0594
2016-12-13 10:31:12 -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
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