Commit Graph

5994 Commits

Author SHA1 Message Date
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
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
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
Hyunyoung Song
0d4899026c Add logging for workspace rearrangement in overview mode
b/32457561

Change-Id: Ic38fbd540616a74f26c19a09ab4247fe8f9174b4
2016-11-17 20:48:18 +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