Commit Graph

1077 Commits

Author SHA1 Message Date
TreeHugger Robot de6188ff03 Merge "Deleting sample code demonstrating how to extend Launcher3" into ub-launcher3-master 2017-11-06 17:58:00 +00:00
Sunny Goyal 076839c321 Moving various runtime flags into the common base class.
Caching the ststemApp status for workspace shortcuts.

Change-Id: I25663e1f04a9768afcca000294adcbb00ea1db7b
2017-10-31 11:00:28 -07:00
Sunny Goyal 0ab09fcf7b Deleting sample code demonstrating how to extend Launcher3
Launcher already includes Launcher3Go build flavour and we will
be adding another build flavour for RecentsUI. There is no need
to maintain another build which is not used anywhere.

Change-Id: I9287f62691d57750460ccc9d6859c7fa11c99956
2017-10-30 09:28:03 -07:00
Sunny Goyal ea60926c3f Moving mState from Workspace to StateManager
Bug: 67678570
Change-Id: I8cdab044d0760fcc4c188830cde4f963d072b907
2017-10-25 15:48:01 -07:00
Sunny Goyal 3e3f44c3ad Exposing the state manager directly instead of providing various helper methods for state change
Bug: 67678570
Change-Id: If3d05c804c034ffa5e403da8eaa23e85e373c863
2017-10-25 13:41:13 -07:00
Sunny Goyal 4d519f2568 Enable overview state restore
> Reapplying CellLayout state when new pages are added (page bind comes after restore)
> Removing support for different scroll range for freescroll (the calculations were not
  consistant with maxScroll)

Bug: 67678570
Change-Id: Ic1911de1b707f2f6940e7040f07ca7e733e2ef2a
2017-10-24 10:39:24 -07:00
Sunny Goyal be93f264d7 Moving all-apps state logic to an independent class
Unifying all the paths for state change to a single flow

Bug: 67678570
Change-Id: I0773c0f59ae1ef324c507bc1aae188d8c059dea4
2017-10-23 16:33:58 -07:00
Sunny Goyal c99cb174c3 Moving some state specific logic to subclass of LauncherState
Bug: 67678570
Change-Id: I1316f91c9f19bd572e4a0da67a22fa8921e1dcf9
2017-10-20 13:56:47 -07:00
TreeHugger Robot cac861068e Merge "Log time spent on different UI surfaces" into ub-launcher3-master 2017-10-19 22:23:01 +00:00
Hyunyoung Song 7fb3ccc4a5 Log time spent on different UI surfaces
- When swipe happens on worskpace, elapsed container ms is reset
- Fling DOWN is also logged so that we now know how much time was spent on
  all apps screen
- If screen off or power button trigger onPause, log this event.

Bug: 67745115
Change-Id: Ie3a0090c78195a4a028de9935131e9e034dcf48a
2017-10-19 15:15:02 -07:00
Sunny Goyal cd7c0aad5f Changing LauncherState to a class to allow adding custom functionality
Bug: 67678570
Change-Id: I777e335e9fdf7014b041addff6b8e54fb94167bb
2017-10-19 12:37:11 -07:00
Sunny Goyal f9403d92fa Removing state definition from Launcher
State is only maintained is workspace and is used for all the UI

Bug: 67678570
Change-Id: Ie3cce5a1f4ada3913d0480f7918c27460dacbd34
2017-10-18 15:04:22 -07:00
Sunny Goyal 4c7f215651 Moving Workspace states into a separate file
Bug: 67678570
Change-Id: I5c63b4df29ca0f58a0223fb1919abc132576a1b6
2017-10-18 09:17:43 -07:00
Sunny Goyal aeb1643ec6 Launcher state management cleanup
> Removing Widgets and related states
> Fixing different durations being used when opening/closing all-apps
> Removing some unnecessary object allocations when changing state without animation
> Differentiating widget bootm sheel and full sheet in logs

Bug: 67678570
Change-Id: Ic169528736d04ee0b38564b4f96595ba066eabda
2017-10-17 12:42:08 -07:00
Sunny Goyal 1797af41d1 Cleaning up drag state management.
When the drag is started, the UI automatically goes into spring loaded mode. On a successful
drop, it is the responsibility of the {@link DropTarget} to exit out of the spring loaded
mode. If the drop was cancelled for some reason, the UI will automatically exit out of this mode.

Bug: 34692289
Change-Id: Ic611739a43bb8d9279b587aaee3039326c143e8b
2017-10-16 13:06:52 -07:00
Sunny Goyal f1fbc3fbe7 Converting widget panel into a floating view
> The widget panel is only inflated when needed
> Using the swipe up/down interaction for widgets tray
> Removing additional view wrappers from all-apps
> Widget tray is preserved across activity recreation
> Launcher no longer has WIDGET state, the actual code around
  the states will be removed in a follow-up cl

Bug: 67678570
Bug: 67585158
Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
2017-10-13 18:47:54 -07:00
Sunny Goyal 10a1bd0e65 Converting PopupContainerWithArrow into a base class so that it is easier
to create other types of popup

Bug: 67585158
Change-Id: I966ae7bb90f941951b26feaf71b3ea30c3f3c0cc
2017-10-10 10:28:05 -07:00
Sunny Goyal 00c95b8447 Removing some obsolete callbacks
Change-Id: I3cf19a13ff145923f2973e23c24033f196324aa3
2017-10-06 11:56:01 -07:00
TreeHugger Robot 6750836bd0 Merge "Merging duplicate logic for deferred drop handling in Worksace and Folder" into ub-launcher3-master 2017-10-06 17:00:40 +00:00
Sunny Goyal 3dce5f3f50 Merging duplicate logic for deferred drop handling in Worksace and Folder
> All the logic is contained in UninstallDropTarget
> Also fixing a bug were mWaitingForResume was not cleared

Bug: 34692289
Change-Id: I617475ce53062902d6817954fb608198e6e03d3c
2017-10-06 09:07:36 -07:00
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