Commit Graph

1057 Commits

Author SHA1 Message Date
Sunny Goyal 53b993688f Instead of posponing state change until onResume, applying the state
change directly in onCreate and onNewIntent()

> State UI do not depend on view measurement and each state is able
to adapt itself based on measure/layout. We do not need to wait for
first layout pass before chaning the state.

Bug: 67305604
Change-Id: I8906e3245cc07aac0038fe630e2a16875d4e8949
2017-10-05 15:06:31 -07:00
Sunny Goyal 213b916ff0 Merge "Moving widget reinflation to push model" into ub-launcher3-master 2017-10-05 17:16:49 +00:00
TreeHugger Robot c4cbd7d978 Merge "Removing predicted apps reset on every onResume" into ub-launcher3-master 2017-10-05 17:01:48 +00:00
Sunny Goyal ba47faae6a Moving widget reinflation to push model
Instead of checking every widget, a widget which needs reinflation
would post a callback on launcher avoiding unnecessary loops in onResume

Bug: 67305604
Change-Id: I53e08d6f4795f7b716a9debca5c0c68dd25a7afe
2017-10-05 09:58:13 -07:00
TreeHugger Robot 8e35dbb2ed Merge "Moving the wallpaper offset interpolator to background thread" into ub-launcher3-master 2017-10-05 15:47:51 +00:00
Sunny Goyal d0c3d3a53c Moving the wallpaper offset interpolator to background thread
Bug: 67305604
Bug: 25321240
Change-Id: I2d667a4d1a4b91ec2a11e5e171f8a1d1c4222b33
2017-10-05 08:35:05 -07:00
Sunny Goyal d0d0703399 Removing predicted apps reset on every onResume
Predicted apps should be pushed by the called whenever they change
instead of Launcher polling them on every UI update.

Bug: 67305604
Change-Id: Ibd3d809b09b7d8fd39036f69367e8580fb90dcef
2017-10-04 10:41:43 -07:00
TreeHugger Robot 0474222c25 Merge "Removing buildLayer call on workspace pages." into ub-launcher3-master 2017-10-03 22:39:49 +00:00
TreeHugger Robot 8838b8e0e5 Merge "Removing extraction service and palette api dependency" into ub-launcher3-master 2017-10-03 20:56:02 +00:00
Sunny Goyal 3792096688 Allowing the widgetBottomSheet to be dragged
even when the touch is started from outside the panel

Removing various instanceOf checks in onNewIntent and onBackPress
and moving all the corresponding logging in the FloatingView
This simplifies handling of panel specific log and avoids
missing a particular panel type in the if-else statement.

Bug: 64751884
Bug: 64751923
Change-Id: I98f5aae18560a64be73c9efcf495479740d49a00
2017-10-02 16:18:52 -07:00
Sunny Goyal a502aa313b Removing buildLayer call on workspace pages.
> buildLayer was followed by setLayerType(NONE) which was causing the
layer to get destroyed immediately and hece was never useful.
> Also removing mAnimatingViewIntoPlace as after setting this to true
updateChildLayer was never being called.

Change-Id: I08a6da25de002247c956308973f1675c0e61e15c
2017-10-02 16:10:35 -07:00
Sunny Goyal 326403e958 Moving some calls off the UI thread
This saves ~5ms in onNewIntent

Bug: 67305604
Change-Id: Ic97727b1c526e50bd3c8a1d8f511e1d7fd5e05e7
2017-10-02 14:50:09 -07:00
TreeHugger Robot ec21a599f4 Merge changes from topic "am-337c344f-ec88-4e4e-9ad7-07a92571f781" into ub-launcher3-master
* changes:
  [automerger] Remove discovery bounce for demo users am: 3993348043
  Remove discovery bounce for demo users
2017-10-02 21:07:21 +00:00
Android Build Merger (Role) ea8e140328 [automerger] Remove discovery bounce for demo users am: 3993348043
Change-Id: Id561b960f1b080ef9bf5d6245513401e859e2afb
2017-10-02 20:49:45 +00:00
Adam Cohen 3993348043 Remove discovery bounce for demo users
Bug 67116550

Change-Id: I8a27685f91e201072c0669c102077affe550fab6
2017-10-02 20:49:30 +00:00
Sunny Goyal fca6bc9dce Adding a utility method to simplify method tracing
Change-Id: I79ef0aa5d65b933f4b7f0520fc8bac26e366da2d
2017-10-02 13:47:42 -07:00
Sunny Goyal f2dd4216c1 Removing extraction service and palette api dependency
Change-Id: I30ad1a1462a97b6bc03f8e386ae3058c7fe022e5
2017-09-29 10:40:08 -07:00
Jonathan Miranda ef4697fdad [automerger] Fix bug where widgets are inflated in the wrong orientation. am: 6bed350b75
Change-Id: I9d4bdaba96fe6afc90a48a141cd3af640b592a7a
2017-09-19 21:43:36 +00:00
Jon Miranda 6bed350b75 Fix bug where widgets are inflated in the wrong orientation.
The bug is that in onResume, the context may tell us the wrong
orientation.

As a workaround, we store the orientation that the Launcher
is created with, and we use that orientation to check whether
we actually need to reinflate the widgets.

Bug: 64916689
Change-Id: I5194debbd217a573d1f177c31d8c0abdf9da51b5
2017-09-19 14:43:17 -07:00
Hyunyoung Song 465435d16d Merge "Remove haptic on touch down Bug: 65463659" into ub-launcher3-dorval-polish2 2017-09-14 17:51:48 +00:00
Hyunyoung Song 2dd64c0710 Merge changes from topic "am-ef87c1d2-519f-467f-b097-802ff59b63b3" into ub-launcher3-master
* changes:
  [automerger] Remove haptic on touch down Bug: 65463659 am: d315ff2bc2
  Remove haptic on touch down Bug: 65463659
2017-09-14 17:51:48 +00:00
Sunny Goyal 952e63d006 Fixing custom widgets support:
> Moving the definitions to xml so that it is easier to override in derivative projects
> Fixing verious bind and save logic for custom widgets
> Adding feature flag to easily disable custom widgets

Change-Id: I0e278bc7dd415713029364060ef10842da990be9
2017-09-13 14:04:35 -07:00
Hyunyoung Song 3705664cf0 [automerger] Remove haptic on touch down Bug: 65463659 am: d315ff2bc2
Change-Id: Ib476e68fe09e94e4a6299434c876b8bd4834c248
2017-09-12 22:55:15 +00:00
Hyunyoung Song d315ff2bc2 Remove haptic on touch down
Bug: 65463659

Change-Id: I111d18a3d1dcd7877ad4aa5baaeca2e6810be332
2017-09-12 15:54:50 -07:00
Hyunyoung Song 8c1e15f3a5 [automerger] WallpaperManagerCompat should target correct platform Also replace Utilities.isAtLeastO() to static final constant. Bug: 65544683 am: e24cb63b81
Change-Id: I85935372c20d6b473b692119730212811e01657d
2017-09-11 19:17:38 +00:00
Hyunyoung Song e24cb63b81 WallpaperManagerCompat should target correct platform
Also replace Utilities.isAtLeastO() to static final constant.
Bug: 65544683

Change-Id: I39fbea66939d72c31702748716c4e65b4f9bee6a
2017-09-11 12:17:09 -07:00
Sunny Goyal 7ce471bdf6 Removing support for CustomContent screen
The supported way to customize Launcher and add a "-1 page" is by
using LauncherOverlays. Custom content screen is no longer supported.

Change-Id: I3f8a2734c287d1a69ae0c038ec1de1d45fa1b464
2017-09-08 14:06:30 -07:00
Sunny Goyal e18d3f537f Updating the all-apps discovery bounce animation
> Animation plays on every onResume
> Updating animation to loop continuously on v23+
> Updating animation spec

Bug: 64331951
Change-Id: Ic6fb8d6975b37f5b010fc585329cba615296f5c7
2017-08-29 10:17:51 -07:00
Mario Bertschler 8ff9e1d679 Integrating suggested app by handling new status flags for shortcut items.
Guarded via feature flag SUGGESTED_APP.

Bug: 62483883

Change-Id: I7e0c8a9875bc37c435aa4316b44322a628cd4826
2017-08-24 12:23:06 -07:00
TreeHugger Robot d722645e7f Merge "Simplifying some package matching code by using common itemInfo mathcher" into ub-launcher3-dorval-polish2 2017-08-21 19:28:39 +00:00
TreeHugger Robot b55b6264ae Merge "Remove LAUNCHER3_ALL_APPS_PULL_UP Bug: 63712253 Verified: all apps transition fully functional Verified: NO_ALL_APPS_ICON = false case also works." into ub-launcher3-dorval-polish2 2017-08-21 19:22:56 +00:00
Hyunyoung Song d725f644b7 Remove LAUNCHER3_ALL_APPS_PULL_UP
Bug: 63712253
Verified: all apps transition fully functional
Verified: NO_ALL_APPS_ICON = false case also works.

Change-Id: I779fb7bd4927c5923da3f85590d912dbbbcdef4d
2017-08-21 11:59:14 -07:00
Sunny Goyal 49fc3f7aa8 Fixing bindAllApplications scheduled with null list.
When deferring bindAllApplications, the same global state was being
used to store the pending state. This global state was being cleared
in one deferred execution after a second execution was scheduled, causing
the second execution to get null/wrong values.

Instead using independent local/anonymous class to maintian states, so that
it does not get cleared by other methods.

Bug: 64789383
Change-Id: I78477a110fe663603b4bdeb7d1fac7c4ce0831a2
2017-08-18 12:07:11 -07:00
Sunny Goyal a9a1a210d3 Fixing crashloop due to ag/2750101
Change-Id: Idebf6bfad4e56a52780b848fbb09b3a0134ffdc2
2017-08-18 01:03:48 -07:00
Sunny Goyal 6e13dd3aa8 Simplifying some package matching code by using common itemInfo mathcher
Change-Id: Ib98d528391e19c0de3fe11304330dfa37710548c
2017-08-17 11:15:12 -07:00
Sunny Goyal b23980cc0e Fixing duplicate/inconsistent definitions for model and callbacks
> 2 implementations for filtering workspace items
> 2 implementations for binding widgets
> duplicate logic for add and update appInfo

Change-Id: Id68a49926af398478deca8ac85ab1f22341a9449
2017-08-17 11:05:56 -07:00
Tony 2917a8bf2b Defer some work until after workspace fade-in
Defer:
- Setting all apps
- Setting widgets

Also set the launcher-loader thread to THREAD_PRIORITY_BACKGROUND
for the duration of the animation.

Bug: 37965432
Change-Id: I8364940805b84aecb8353a473ab4d575c27bfec4
2017-08-04 11:52:42 -07:00
Sunny Goyal 786a25e9ec [automerger] Sending onCreate to the callbacks after our call is complete am: 14b3240eca
Change-Id: If854ef0686bf528a41778f8ec0ab3779f2122e54
2017-07-31 17:04:46 +00:00
Sunny Goyal 14b3240eca Sending onCreate to the callbacks after our call is complete
Bug: Bug: 63381480
Change-Id: Ib5fcd9ef500a91fef93c9e5af657b23723748ccc
2017-07-31 10:04:06 -07:00
Jonathan Miranda f880ecca32 [automerger] Optimize updating All Apps Predictions. am: 7653a60c74
Change-Id: Id7ebeee3d4cc605849ac95623ffe6321bc691b7a
2017-07-30 18:05:43 +00:00
Jon Miranda 7653a60c74 Optimize updating All Apps Predictions.
* Prefetch existing predictions in onResume.
* Only update predictions if something has been changed.
* Swap predictions in place (if possible) -- this avoids
  having to relayout all of All Apps when just the predictions
  change.

Bug: 64126588
Bug: 63711551
Change-Id: Iffa0d9d7d6f99f606dd68b7df5893d6eba1574f5
2017-07-30 11:04:58 -07:00
Sunny Goyal e29897f503 Adding spring effect for folder icons when dragging similar to adaptive icons
Bug: 63889144
Change-Id: Idd1fd13c6343bf3e0a3a0e5ff0be730d41996575
2017-07-25 14:30:54 -07:00
Sunny Goyal 64a75aa305 Adding A feature flag to disable widgets and a corresponding build
target Launcher3Go without widgets support

Bug: 62353159
Change-Id: Ia03d2235a9bcf75f9ef191924f81630e63a2c684
2017-07-21 14:10:13 -07:00
TreeHugger Robot bdf6e7d8f8 Merge "Update when Launcher's scrim should fade." into ub-launcher3-dorval-polish 2017-07-20 18:20:34 +00:00
Jon Miranda 7fda285cf0 Update when Launcher's scrim should fade.
* Scrim will fade first time the user starts Launcher (unlocks device).
* Scrim will fade if resuming from a screen off and Launcher is in
  the foreground.

Bug: 63801668

Change-Id: I4465765fe5a0f81c2f4dec715f9f5a24a309fc1b
2017-07-20 11:10:07 -07:00
Jonathan Miranda db8bc9b044 Update when Launcher's scrim should fade. am: 7fda285cf0
Change-Id: I0761f13886f34d9f27bc50ee523a0c1de7f6a7a1
2017-07-20 18:09:39 +00:00
Sunny Goyal 2b50b53183 Updating UserEventDispatcher to make some methods accessible.
> Removing helper methods around fillInLogContainerData so that its easier to
  create events with 3 and more srcTargets
> Removing setPredictedApps from userEventDispatcher as its specific to Launcher
  and does not apply to other activities. Instead moving it to AllAppsRecyclerView

Bug: 63719473
Change-Id: Ib92621e41ede4ffe03892642ab173772b5a84dd1
2017-07-19 11:03:35 -07:00
Adam Cohen bf78f3cd41 Collapse caret click and all apps click into one
-> Was separating them for cleanliness, but turns out
   in portrait the caret is the button, but in landscape it's not.
   We'll clean all this up later.

Change-Id: Icbc185f9183ded685b4a988eacf19cb7583ed8ad
2017-07-14 16:11:10 -07:00
Adam Cohen 5441a9d30a Make landscape all apps caret clickable when in all apps as well as workspace
-> Also increase the touch target size of the caret
-> Center the asset horizontally within the view (but keep it bottom
   asligned)

issue 63681599
issue 63682248

Change-Id: I64efdfb9f84b82cc21d82c10d9301a99fed3353a
2017-07-14 22:09:56 +00:00
Sunny Goyal c7b8df8329 Sanitizing various search container ids and layout names
Bug: 63014381
Change-Id: Ia75a8a048c7a85c6324f8861abd2bcf1721032fa
2017-06-27 11:11:32 -07:00