Commit Graph

5974 Commits

Author SHA1 Message Date
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
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
Sunny Goyal
32f3dda802 Adding a utility class to enforce that icons are always flattened on
the background thread.

Bug: 21325319
Change-Id: I4d0f02557cdbf70cfa86750ac047faf2917e39bf
2016-11-19 23:40:07 +05:30
Sunny Goyal
db2fa049a6 Merge "Moving saving state transtion listener logic to individual views" into ub-launcher3-master 2016-11-18 01:17:51 +00:00
Sunny Goyal
0666592bea Merge "Fixing item check when user is enabled/disabled" into ub-launcher3-master 2016-11-17 22:41:35 +00:00
Sunny Goyal
4f9611a87c Fixing item check when user is enabled/disabled
Bug: 32747950
Change-Id: I278cbd7626ee30be6b803d617cf05f8359e5d940
2016-11-15 17:27:53 -08:00
Jon Miranda
c1b08c5b7f Add bottom padding to hotseat in multi-window mode.
In multi-window mode, the navigation bar is black which makes the
hotseat's top padding -- and lack of symmetric botom padding --
super apparent. We add bottom padding to the hotseat so that the
hotseat icons remain visually centered.

Bug: 32176631
Change-Id: I3eebf5ab98898c8ee092bda6ec48c6afdcd353b9
2016-11-15 14:37:56 -08:00
Jonathan Miranda
0b80aca9c5 Merge "Hide workspace text in multi-window mode." into ub-launcher3-master 2016-11-15 20:17:42 +00:00
Tony Wickham
075b878842 Merge "Animate icons back to where they were picked up." into ub-launcher3-master 2016-11-15 19:53:32 +00:00
Jon Miranda
93e1f04fa9 Hide workspace text in multi-window mode.
* Vertically centers workspace icons.
* New iconDisplay value so shortcut text is not overriden.

Bug: 32176631

Change-Id: I86753bab5b24aafc417e0f77d8c471fc4c0dc7f0
2016-11-15 11:19:03 -08:00
Sunny Goyal
f8d5370a9f Merge "Catching TransactionTooLargeException when binding widget." into ub-launcher3-master 2016-11-15 19:07:32 +00:00
Jonathan Miranda
5202aa7504 Merge "Using dimension defined for all apps search bar height." into ub-launcher3-master 2016-11-15 18:52:16 +00:00
Sunny Goyal
db36437931 Moving saving state transtion listener logic to individual views
Change-Id: If5402b6961d7d6be0c50778f27a8746ed6f1bbfb
2016-11-14 17:43:31 -08:00
Jon Miranda
145435ef6e Using dimension defined for all apps search bar height.
In portrait multi-window mode, hotseat cell height is
too small. Found that there was already a resource for
all_apps_search_bar_height so using that instead.

Change-Id: I56647eb55a7808e93bdcbb3334b1513f6ac23d7c
2016-11-11 14:35:20 -08:00
Sunny Goyal
0bbd5548ac Moving the setContentView at the end of onCreate
In multi-window mode, when the activity is resized, the window might
exist even before onCreate, which could call onAttachToWindow while
they are being inflated. Many Views in Launcher assume
onAttachToWindow to be called after onCreate has completed.

Bug: 32745705
Change-Id: Id6ee68826c4f3cc579880540812fd8ed834f8267
2016-11-11 13:43:13 -08:00
Jonathan Miranda
47a96054d9 Merge "Refactor edge of screen detection code." into ub-launcher3-master 2016-11-11 19:45:25 +00:00
Sunny Goyal
015bee7a6a Merge "Removing dependency on LauncherActivityInfoCompatV16" into ub-launcher3-master 2016-11-11 19:33:25 +00:00
Tony Wickham
6b910a235d Keep disabled FastBitmapDrawables disabled while fast scrolling.
Previously, they were animating to be colored because they were
set to have a FAST_SCROLL_UNLHIGHLIGHTED state. Now they retain
their disabled color when changing fast scroll states.

Specfically, we remove the DISABLED state and instead make it a
property of the FastBitmapDrawable.

Bug: 32642959
Change-Id: I6cb2da134a550c267eebfc756eff8c91a33f028c
2016-11-11 10:59:17 -08:00
Sunny Goyal
f4a0d1886f Merge "Enabling async inflation for AppWidgets" into ub-launcher3-master 2016-11-10 19:50:24 +00:00
Sunny Goyal
f0ba8b7ca1 Moving various runnables in LauncherModel to individual tasks
> Adding tests for some of the runnable

Change-Id: I1a315d38878857df3371f0e69d622a41fc3b081a
2016-11-09 15:50:08 -08:00
Sunny Goyal
712ee53c67 Catching TransactionTooLargeException when binding widget.
A widget can potentially bypass binder size limit with remote views when
using partual updates (as the merging happens on the system service). In
such a case, show the widget in error state.

Bug: 32365088
Change-Id: Id1c4425958a06463273731464e31f05908c35ec7
2016-11-09 12:43:11 -08:00
Sunny Goyal
1582f1673b Removing dependency on LauncherActivityInfoCompatV16
Bug: 32745285
Change-Id: Iece352c891dd9e573c526831c62833f5387ce2b6
2016-11-08 14:41:15 -08:00
Sunny Goyal
0d547bfd57 Merge "Changing status bar color extraction to use region decoder" into ub-launcher3-master 2016-11-08 21:53:33 +00:00
Sunny Goyal
a9f1e720f9 Changing status bar color extraction to use region decoder
Change-Id: Ie9913a9cb28948128e6624dc3a335c790fa5a11a
2016-11-08 09:37:34 -08:00
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
Jon Miranda
51f037d674 Refactor edge of screen detection code.
There were two resources that both defined the edge of the screen.

Change-Id: I82ab553cc3123ef54ff1f0c692d29f3678ad04ac
2016-11-07 10:11:49 -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
dcc0ba29a5 Enabling async inflation for AppWidgets
Bug: 22839968
Change-Id: Id622053c2882f478b3a3ab3918a9f76750ead8c6
2016-11-03 15:25:23 -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
Tony Wickham
ea62fe0be1 Animate icons back to where they were picked up.
We do this for pre-dragged icons instead of calling onDrop().
- Removes need for special logic in onDrop() to check if mIsInPreDrag
- Dropping from pre-drag in all apps also animates instead of jumping

We also do this when dropping an icon while still transitioning
to spring-loaded mode, to avoid having a janky jump at the end
- Bug: 27135377

Change-Id: I4548c3e2fef3423d1ba36057fb53807b1b4ad0fc
2016-11-02 15:07:57 -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