Commit Graph

5945 Commits

Author SHA1 Message Date
Jonathan Miranda 5e44e2b1ad Merge "Use display metrics from resources." into ub-launcher3-master 2016-11-08 17:19:43 +00:00
Jon Miranda f92af1d440 Use insets and hotseatCellHeightPx to set search container height.
In a previous refactor, I mistakenly used hotseatBarHeightPx instead of
hotseatCellHeightPx.

Bug: 32176631
Change-Id: I53ef8fa29a6980dcb33bb979d1bed98317c8ade2
2016-11-07 17:05:14 -08:00
Jon Miranda 3ca089905b Use display metrics from resources.
Change-Id: If23071528f76b2c7825337b1bc7ac7570b8844ed
2016-11-07 16:45:15 -08:00
Sunny Goyal 99014e5c43 Merge "Using BitmapRegionDecoder to only parse partial bitmap during color extraction" into ub-launcher3-master 2016-11-08 00:17:03 +00:00
Jon Miranda 2b073be654 Fix bug where AllApps shadows weren't being completely clipped.
Worked fine in normal launcher conditions, but surfaced when
using AllApps in multi-window mode.

Bug: 32176631
Change-Id: Ic973f707a69dd5d8c5eafa0dc2d154aa6ab0e001
2016-11-07 16:01:20 -08:00
Sunny Goyal c48a89e59c Merge "Calling buildLayer only on views which are actually visible" into ub-launcher3-master 2016-11-07 18:09:43 +00:00
Sunny Goyal 47564ca3a1 Merge "Simplifying mapCoordInSelfToDescendant" into ub-launcher3-master 2016-11-07 18:09:39 +00:00
Sunny Goyal 1b997d3383 Using BitmapRegionDecoder to only parse partial bitmap during color extraction
Change-Id: I3474c5e2f880144379b1810ccaef247f4a8d1330
2016-11-07 10:08:21 -08:00
Jon Miranda bf7d8121ea Scale down folder cells to fit within bounds if necessary.
The number of folder cols/rows are set in InvariantDeviceProfile.
Because of this, we may need to scale down the folder cells in
multi-window mode.

Bug: 32176631
Change-Id: I925d5ac9d29439c5d61cf089e7784065a8cb5ebd
2016-11-04 14:15:33 -07:00
TreeHugger Robot 724943dcbd Merge "Remove unused Utilities methods related to motion event translation" into ub-launcher3-master 2016-11-03 23:38:18 +00:00
Tony Wickham aa7d8776c8 Remove unused Utilities methods related to motion event translation
These were necessary when we had the ShortcutsContainerListener with
touch forwarding, but they are no longer used since we removed that
listener when we moved to the pre-drag model.

Change-Id: I845d4a1a73fa1a675cef1c52fe304357674a2f68
2016-11-03 15:51:55 -07:00
Sunny Goyal ff646727fd Merge "Fixing screen center not getting calculated properly" into ub-launcher3-master 2016-11-03 01:02:37 +00:00
Jon Miranda c3e4e228b1 Remove unused code in DeviceProfile.
Change-Id: I463302e6711ad39241257b8dff058d9f3e99d883
2016-11-02 16:56:52 -07:00
Jon Miranda df3bc52ca9 Center overview panel buttons.
Bug: 32313927
Change-Id: Ib6e82b12ef45d2fe59e46b5b2dd8945047eeb981
2016-11-02 13:39:46 -07:00
Sunny Goyal e4f09a5f0a Merge "Updating version check method names" into ub-launcher3-master 2016-11-02 17:51:27 +00:00
Sunny Goyal f5e3744637 Updating version check method names
Change-Id: If98851677545a9bbb9de308c23ff5c155a61a8bf
2016-11-02 10:31:41 -07:00
Sunny Goyal 8b16b96b38 Fixing same drawable instance being used with 2 views
Drawable contain a reference to the view which is used to invalidate the view.
If the same drawable is used with two views, only once view will get invalidated.

Bug: 32575647
Change-Id: Ia22310a6bda55ce0a591712761ec8ab1cdbaccdf
2016-11-01 14:49:38 -07:00
Sunny Goyal cce078099c Fixing screen center not getting calculated properly
Bug: 32578597
Change-Id: Icdf5dc2d82eab3d90b380736d7256ca2d9b2df2e
2016-11-01 14:01:10 -07:00
Jon Miranda cc42c5bd10 Create new DeviceProfile when in multi window mode.
This is just a first pass to help make the codebase ready for MW mode.
ie. won't see the effects of this unless resizeableActivity is set to true
in the Android Manifest.

Also allows long clicks from edge when in MW mode.

Bug: 32176631
Change-Id: I48e5cb3bd15e70627d9bf007d93bc731612fba2e
2016-11-01 09:00:20 -07:00
Sunny Goyal 2962d52dee Merge "Showing a toast when the default wallpaper app is disabled. If there is no default defined, showing an intent picker with all options" into ub-launcher3-master 2016-10-31 21:32:35 +00:00
Tony Wickham d80ebdfd9f Intercept touches in DeepShortcutContainer after moving beyond touch slop
Otherwise it's possible for a long press to trigger when swiping
on a shortcut, which causes it to drag far away from the finger.

Bug: 32309824
Change-Id: I40bd5c1daac49d6edb59744083a1e23dcf4f0ce6
2016-10-31 13:32:26 -07:00
Sunny Goyal 5e0e94f0b2 Simplifying mapCoordInSelfToDescendant
> Removing new object creation (during draw and touch handling)
> Simplifying matrix operation to call invert only once at the end

Change-Id: Iffadd6e9d84997baa36719ed688a7c3c1027e839
2016-10-28 10:24:40 -07:00
Jonathan Miranda 37e4df17cb Merge "Don't add focusables when getDescendantFocusability is FOCUS_BLOCK_DESCENDANTS." into ub-launcher3-master 2016-10-28 00:25:11 +00:00
Tony Wickham ed38a3c515 Merge "Consume touch events in DeepShortcutsContainer" into ub-launcher3-master 2016-10-28 00:17:45 +00:00
Tony Wickham 04a8ec4fc6 Consume touch events in DeepShortcutsContainer
Previously, touches along the horizontal area next to the
deep shortcuts arrow went through to the background, allowing
things like going to overview with the shortcuts still open.

Bug: 32477287
Change-Id: I82d21d3051a13b23dfaac19e93facee120968aaa
2016-10-27 17:01:32 -07:00
Sunny Goyal ec5a42e1ac Merge "Catching OOM during widget preview generation" into ub-launcher3-master 2016-10-27 22:04:51 +00:00
Jon Miranda 6a85817dfc Don't add focusables when getDescendantFocusability is FOCUS_BLOCK_DESCENDANTS.
Bug: 32315286
Change-Id: I6fc6600fc9cbf83f720d9e6e878735076cd52cf1
2016-10-27 14:14:31 -07:00
Tony Wickham 968c283f22 Merge "Restore mDragInfo when deferring onDropComplete() for uninstall." into ub-launcher3-master 2016-10-27 21:05:52 +00:00
Sunny Goyal 3ef8691f82 Fixing wrong cache lookup call
Cache entry was saved using flattenToShortString, but the
lookup was using flattenToString

Change-Id: I4c012d5a90a89121989db059d31d3dd288fa5b8c
2016-10-27 11:40:59 -07:00
Sunny Goyal 2570d107f5 Catching OOM during widget preview generation
Bug: 32365481
Change-Id: Ifc49b033c3ad83213d50793301d94bb6337a412d
2016-10-27 11:39:14 -07:00
Sunny Goyal b5e65c8bd3 Calling buildLayer only on views which are actually visible
> Creating a common listener for handling buildLayer logic

Bug: 30138067
Change-Id: I803ef78b48e07e5ae5922e0392d390f274a87d75
2016-10-26 18:34:21 -07:00
Sunny Goyal 9ccafbff26 Removing custom dispatchDraw logic and letting the system handle
selecting appropriate children for drawing.

> System already skips children which are outside the bounds. Originally
this logic was added because workspace layout is larger than the screen, and
we need to selectivly skip more children. But over time we have added many
special conditions and at present workspace actually draws more children than
needed at any given time.
> Fixing bug, where onBeginPageMoving was getting called during folder open

Bug: 12116740
Change-Id: Idee18ee9cd9d348ebc4dfd82f4ff6df14e0d22d2
2016-10-26 17:14:12 -07:00
Sunny Goyal 35fe7be54e Removing some deprecated code around page layers
1) setChildrenDrawnWithCacheEnabled: deprecated
2) Removing custom logic based on isHardwareAccelerated. This check was not being
used consistantly everywhere

Bug: 29761236
Change-Id: Ic4a9c764f154497e376e37de2351fe04d1b48500
2016-10-26 13:14:03 -07:00
Tony Wickham 4feb27e6b1 Restore mDragInfo when deferring onDropComplete() for uninstall.
We moved mDragInfo = null to onDragEnd() since onDropComplete()
isn't called for pre-drags, but this led to NPE when returning
from unistall or app info since onDropComplete() is called after
onDragEnd() in this case. So now we restore a copy of mDragInfo.

Bug: 32415014
Change-Id: I7ef4fb7145c3c78039af1131e77538969db58141
2016-10-26 12:51:14 -07:00
Sunny Goyal c677b6b0ac Showing a toast when the default wallpaper app is disabled.
If there is no default defined, showing an intent picker with all options

Bug: 32197478
Change-Id: Ia2337701a76a9bb00973ab64e2fa435607ce2820
2016-10-25 09:49:09 -07:00
Tony Wickham d1f034708b Don't move to adjacent page if it is full when dropping on it.
Bug: 32003721
Change-Id: Ia81b75a73f510ad2a58764dec9eb7e57b9bf2dcd
2016-10-24 10:27:56 -07:00
Tony Wickham 5fd72d865e Merge "Don't allow multiple shortcuts to be dragged simultaneously." into ub-launcher3-master 2016-10-21 18:51:50 +00:00
Tony Wickham c92fe89327 Don't allow multiple shortcuts to be dragged simultaneously.
When starting a drag when another is already in progress, the
original drag view is left dangling until launcher is killed.

Bug: 32231238
Change-Id: I5ff94b82971c539231f8f588059dc84845cc88f0
2016-10-21 11:37:25 -07:00
Sunny Goyal fcb0928256 Fixing text search where a word starting with lower case was not being matched
am: 28a64381b6

Change-Id: Ib5158d42219478c97d6bec5049e3354ee1087094
2016-10-20 09:29:57 +00:00
Tony Wickham 1da143940c Merge "Mark cells as unoccupied in onDragStart instead of startDrag." into ub-launcher3-master 2016-10-19 16:48:43 +00:00
Sunny Goyal 28a64381b6 Fixing text search where a word starting with lower case was
not being matched

Bug: 32249413
Change-Id: I0f5e24052759a734fe0df3bd3d0bf2e7ef7f2713
2016-10-19 07:54:22 +01:00
Sunny Goyal d164b7f4ab Fixing static instance of Indexer being created in the model
Indexer depends on the locale and should be created when ever the config
changes. Moving the widget indexing to the adapter (similar to allApps)
which gets created whenever the activity is recreated.
This fixes the bug where widgets indexing breaks if locale changes while launcher
process is alive
Also fixing the bug in widget model cloning where the HashMap was not cloning
the underlying ArrayList

Change-Id: I7dbe6290e73299c4c07aa7fa564077a2649e1a4c
2016-10-19 07:42:34 +01:00
Jonathan Miranda 67115b1a84 Merge "Show error toast messages when there is no room for the item when icon is not to be added to folder." into ub-launcher3-master 2016-10-18 21:49:09 +00:00
Jon Miranda 9485e5f293 Show error toast messages when there is no room for the item when icon is not to be added to folder.
* when user tries to add item to full hot seat from workspace.
* when user tries to add item to full home screen from workspace.
* refactored so that Workspace handles displaying error messages.

Bug: 15574422
Change-Id: Ibc98c7f45bc0c646dc4636660fba62be9db22ac0
2016-10-18 14:47:31 -07:00
Tony Wickham 4e47b5b0d6 Mark cells as unoccupied in onDragStart instead of startDrag.
Also move cleanup (resetting variables to null) to onDragEnd
instead of onDropCompleted. These changes are necessary because
pre-drags (for apps with shortcuts) don't call onDragStart
or onDropCompleted.

Bug: 32246571
Change-Id: Ib18fac64555e9158b776f9c12afc2cb807b3c355
2016-10-18 14:46:02 -07:00
Sunny Goyal 645760793d Merge "Alienating QSB" into ub-launcher3-master 2016-10-18 20:57:46 +00:00
Sunny Goyal d25e2f5e42 Merge "Removing unused background padding from base recycler view" into ub-launcher3-master 2016-10-18 20:44:54 +00:00
Sunny Goyal 00e106880d Removing unused background padding from base recycler view
Change-Id: I36f68a143df8f3668074b3539aa9af170a91e511
2016-10-18 21:36:29 +01:00
Sunny Goyal ed5d960ec1 Removing some bitmap drawables.
Loading the edge drawables only when legacy DND is enabled

Change-Id: I1c66d03146fb7fa7d61a4abf8c2e5a4289a117b9
2016-10-18 15:55:55 +01:00
Sunny Goyal 2e013ea7f6 Alienating QSB
> Moving all QSB widget handling code in a separate package
> QSB is handled on a separate host, independent of the main
host. This allows us to safely reset either of the two hosts
> Also removing the logic around closeSystemDialog:
   Launcher does not use any panels which need closing
   System sends an onActivityResult(RESULT_CANCELLED), we do
   not need special handling for waitingForResult
> Fixing bug when auto-generated qsb widget id was not being saved

Change-Id: I2d889b7b1c80b14785d14f35624142a4b78452de
2016-10-18 11:44:21 +01:00