Commit Graph

1011 Commits

Author SHA1 Message Date
Sunny Goyal deb91c46eb Decoupling some dragController methods
Change-Id: I7c4ab5f1504c49eaa0566afe643d7672faa80205
2020-03-24 17:27:58 -07:00
Sunny Goyal 6e379fc784 Removing animation when stripping empty pages, as the animation is
run by LayoutAnimation already

Bug: 151978739
Change-Id: I75b9055c3e862a6813164cce6c1ba7b2fe1f870a
2020-03-23 01:50:55 -07:00
Adam Cohen f946e0a5ee Merge "Refactor / Cleanup / Simplify a bunch of dnd related rendering / animation" into ub-launcher3-master 2020-03-21 01:27:08 +00:00
Adam Cohen 650869973a Refactor / Cleanup / Simplify a bunch of dnd related rendering / animation
Addresses:
=> Fix folder icon drop location mapping (was very far off)
=> Fix BubbleTextView drop animation shifted by a few pixels
=> Get rid multiple unnecessary calls to setDragMode(none), was breaking
   some of the reorder flow; still some issues to address here.
=> Fix folder icon parallax (didn't work when the folder had a dot)

Test: manual

Change-Id: I5959cf341996f75d30212353ec096ed25bf40ea5
2020-03-21 01:26:09 +00:00
Sunny Goyal 9b18010990 Decoupling some drag and drop code handling
> Removing some special checks around accessibility drag
> Unifying folder alarm code path for accessible and normal DnD
> Maintaining mDragStartTime inside the dragDriver instead of the callers
> Simplifying some accessibility callbacks

Future cl will create a Accessibility DragDriver and unify it with
other DnD flow

Change-Id: I1919ef218de0174678110f271b450bcb9aaf4a5c
2020-03-18 12:41:42 -07:00
Sunny Goyal f3ac703256 Moving animation config so a separate class
Using PendingAnimation for animation builder.
This will allow us to easily add SpringAnimation to stateAnimation

Change-Id: I8d88489a5da6fc85747ef9be7c13858b441cd28a
2020-03-16 19:36:36 -07:00
Samuel Fufa a579ddc9c8 Refactor logging to capture Target hierarchy
Instead of creating a fixed number of targets, we now pass an ArrayList
of targets to. Any class implementing
LogContainerProviders#fillInLogContainerData can setup it's own target
and add it to the ArrayList, It can also pass the ArrayList to other
LogContainerProvider to capture full Target hierarchy.

Bug: 147305863
Change-Id: I0063c692120fb9e1cff2d8902c5da972d0623418
2020-03-06 13:49:19 -08:00
Vinit Nayak a406f727ad Add vertical layout support for Overview in portrait
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.

PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.

The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]

Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
2020-03-02 18:02:35 -08:00
Zak Cohen 3eeb41de9a Rename flag IS_DOGFOOD to IS_STUDIO.
The flag is only set when building from Android Studio... and is never
used for dogfood.

Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b
2020-02-14 14:19:59 -08:00
Samuel Fufa 28c3e4553a Sync prediction client and folders
- Notifies prediction client when a folder is converted into workspace
item as a result of losing all items but one.
- Notifies predction client when a folder is created from an item in the
workspace with no duplicates.

Bug: 148749638
Test: Manual
Change-Id: Ifd51a6fe2a40c8baf4d88e2dba1e5bdc925e1608
2020-02-08 16:19:53 -08:00
TreeHugger Robot 61d639d756 Merge "Make LauncherState transitionDuration overridable at runtime" into ub-launcher3-master 2020-02-06 20:01:49 +00:00
Tony Wickham c7203ad541 Make LauncherState transitionDuration overridable at runtime
This follows the pattern of most of the other state properties, and
allows us, for example, to extend the overview transition in 0-button
mode, but keep it shorter for other modes that don't travel as far.

Bug: 143361609
Change-Id: Ibf8142bf3f57bb73be826adb6f4a32c136ff56dc
2020-02-05 11:16:58 -08:00
Samuel Fufa 746d420f76 Notify predictor on appIcon convert to folder
Bug:148749638
Test:Manual
Change-Id: I7eed1f309197479f708a23029c04106af0ac536f
2020-02-03 15:42:43 -08:00
Hyunyoung Song 1ae42423ca Load folder names during LoaderTask
Bug: 147359653

Change-Id: I4d1b53c3a72d0773d4bc8819ee8118fc719944ad
2020-01-28 22:06:05 -08:00
TreeHugger Robot 0618d689e8 Merge changes from topic "state-supplier" into ub-launcher3-master
* changes:
  Translate recents slightly while dragging after pausing
  Two-zone model: swipe up from nav bar vs above it
  Change LauncherState to Supplier<LauncherState> in tests
2020-01-29 03:06:04 +00:00
Tony Wickham 4fdba14cfb Two-zone model: swipe up from nav bar vs above it
When ENABLE_OVERVIEW_ACTIONS flag is enabled, swiping up from the nav
bar goes to overview if you hold, or the first home screen if you don't.

- Added NoButtonNavBarToOverviewTouchController, which extends
  FlingAndHoldTouchController but only works if you start from the nav
  bar. Otherwise it falls back to PortraitStatesTouchController to
  handle normal state transition to all apps.
- Added HintState. This is where the workspace/hotseat/qsb scale down
  when you swipe up from the nav bar, to hint that you're about to
  either go to overview or the first home screen.
  - Added getQsbScaleAndTranslation() to allow Overview and Hint states
    to treat it as part of the hotseat.
  - Since Overview needs to show above the QSB as it's animating, bring
    Overview to the front and update OverviewScrim to handle the case
    where there's no view above Overview to draw the scrim beneath.
- ENABLE_OVERVIEW_ACTIONS is always false in 2-button mode, since the
  shelf is crucial to that mode.

Bug: 143361609
Change-Id: I743481bb239dc77f7024dc98ba68a43534da2637
2020-01-28 18:31:10 -08:00
Sunny Goyal 09b03c55df Optimizing some slow calls on the main thread
Change-Id: I4eed5f7e5bf1316556d6985a610918fc709a7471
2020-01-28 22:18:14 +00:00
Andy Wickham ff13792b83 Adds Launcher flag to enable Universal Smartspace.
Test: Used the flag
Bug: 141701658
Change-Id: Id06016e313b05ae70b693c39e2e1cde2576cfbb1
2020-01-17 23:03:03 +00:00
Tracy Zhou 4d7b244f3f Render user's actual workspace in ThemePicker preview (Part 2)
With this change, we can also render folders in preview. It's built on top of part 1.

Test: Go to grid options, choose a different grid option, and see user's workspace rendered in the preview
Bug: 144052839
Change-Id: Iaf6d8af6b909ece4147ea250d95dec3d2c0019d3
2020-01-08 15:42:58 -08:00
vadimt 675c877765 Removing tracing for a fixed flake
Presumably, the flake was fixed when I added waiting for model load
before the test body starts.

Bug: 138729456
Change-Id: Ie921ebd40e42a7d73884c19949ca5f0129afc96e
2020-01-06 18:35:37 -08:00
Sunny Goyal 337c81f664 Removing static instances of UserManagerCompat and AppWidgetManager
> Changing the lifecycle to follow other static objects in Launcher
> Removing compat interface and inlining everything to helpers

Bug: 141376165
Change-Id: I82bd5db1969101de9a7eac77f32728d70195bb35
2019-12-11 10:03:19 -08:00
Samuel Fufa 3a39a25d1c Ignore predicted items when items are drag over them
Bug:145565886
Test:Manual
Change-Id: I727975234d36ef2cba0d58ba1df6886e09157ce6
2019-12-04 12:13:46 -08:00
Samuel Fufa ddab25da6b Merge "Enable a11y scrolling with item drag" into ub-launcher3-qt-future-dev
am: 574e8413ba

Change-Id: I37c71d6f55d2478d029a9509ca61d32599582442
2019-11-14 14:04:35 -08:00
Samuel Fufa 8fb487413c Enable a11y scrolling with item drag
Bug:142300278
Test:Manual
Change-Id: Ieb79dac8a793f5adfe715b1cbe5b7ecae95a26b5
2019-11-13 13:22:49 -08:00
vadimt 5631b4a7ef Removing tracing for a fixed bug
Bug: 141770616
Change-Id: I52ec681eca20733021090fe50058bc7d3f996ade
2019-10-28 16:59:45 -07:00
vadimt 4d342406a2 Merge "Adding debug tracing for a flake" into ub-launcher3-qt-qpr1-dev am: 1a02173321
am: 10b1414778

Change-Id: I4e56e1f19f1eb3d48eb93978d0e544d7a26efc1d
2019-09-28 01:14:54 -07:00
vadimt 10b1414778 Merge "Adding debug tracing for a flake" into ub-launcher3-qt-qpr1-dev
am: 1a02173321

Change-Id: Id1feb3f64191475472bdfceac309b6e26869a1e6
2019-09-28 01:07:55 -07:00
vadimt 3895d9b642 Adding debug tracing for a flake
Bug: 141770616
Change-Id: I6413ca6ce380eede817ae2418d5a1bc04c091270
2019-09-27 17:55:48 -07:00
Samuel Fufa 0659400dcb Merge "Drag and drop preview size for BubbleTextView" into ub-launcher3-qt-future-dev
am: ecee887d1a

Change-Id: I546cfa34058c3dff49ebef4ddc24c0fb8ef0d77d
2019-09-26 12:49:21 -07:00
Samuel Fufa 45812a9ed6 Drag and drop preview size for BubbleTextView
Test:Manual
Bug:141260670,141263002
Change-Id: If08dba28cce3ae07bb39ddad3743dd5eea92cb90
2019-09-26 12:21:45 -07:00
Pinyao Ting 30414c5699 Merge changes from topic "a11y-minus-one" into ub-launcher3-qt-future-dev
am: ff4977d42d

Change-Id: I5c565a2d67274240dcd06e41ad03564526d486ce
2019-09-24 14:58:53 -07:00
Pinyao Ting af6daa2873 Revert "Revert "support scroll backward to minus one screen via voice/switch access""
This reverts commit 3ad4ace203.

Reason for revert: roll forward and bugfixes

Change-Id: Icd56cdeddb3baf9819700cc567c04af0905825ef
2019-09-23 12:56:11 -07:00
Pinyao Ting f7e9b051b5 Merge "Revert "support scroll backward to minus one screen via voice/switch access"" into ub-launcher3-qt-future-dev
am: 4ca6449e39

Change-Id: Id11261547476ef4f43dfda5cbf63f1e30cae936f
2019-09-17 10:30:14 -07:00
Pinyao Ting 3ad4ace203 Revert "support scroll backward to minus one screen via voice/switch access"
This reverts commit d5af944f41.

Reason for revert: Test failure on master that might be related to this code change.

Change-Id: I269bf5b0a6505da291e1ff4ed181a851268d6ed8
2019-09-17 16:58:07 +00:00
Pinyao Ting 388a2122b1 Merge "support scroll backward to minus one screen via voice/switch access" into ub-launcher3-qt-future-dev
am: 6462a44935

Change-Id: I686c2204c4229a1027924bca11c048408ff80315
2019-09-16 20:51:13 -07:00
Pinyao Ting d5af944f41 support scroll backward to minus one screen via voice/switch access
Bug: 140406263
Test: Manual
Change-Id: I604b12f8ba8706cbabc28acafd6c151166832f22
2019-09-16 14:21:49 -07:00
Samuel Fufa 6915245924 Merge "Remove launcher widget onAppWidgetRemoved" into ub-launcher3-qt-future-dev
am: d61f73d935

Change-Id: Ib283b5db54c17dce4b8c09d70e52f10f95a6a315
2019-09-12 15:11:20 -07:00
Samuel Fufa 44043ec3eb Remove launcher widget onAppWidgetRemoved
Test: manual
Bug:79462255
Change-Id: Ib5dd32d9db11acf27cb9e0e6fee266b57cff1828
2019-09-11 13:21:11 -07:00
Sunny Goyal b1d7de25f8 Adding support for overlay and corresponding plugin to Launcher
Updating various task callbacks to handle overlays

Change-Id: I80077508ad35c31269c873f51f0105302a9e6a5d
2019-09-10 08:08:28 -07:00
Sunny Goyal ac6f69f78d Lazily binding folder pages and icons
Folders are bound before they are opened and unbound on close. This
allows us to recycle the views in folders

Bug: 139051851
Change-Id: Ic1ed3265c0f583af54d73dab6f2751bc95266ea9
2019-09-05 17:17:11 +00:00
Becky Qiu 71959e59d2 Merge "Move swipe actions on container logging to west world." into ub-launcher3-qt-qpr1-dev
am: 6d0d8969f6

Change-Id: I2229ea7c878ac84b00110235df65ced2f9baf171
2019-08-23 20:01:05 -07:00
Samuel Fufa 08457b0017 Dragging an icon from prediction row to workspace crashes launcher
Test:Manual
Bug:139942462
Change-Id: I5c4a2ca518b08f4ccf47072f8f355e76b7da9424
2019-08-23 14:40:11 -07:00
Becky Qiu f0a014d7ff Move swipe actions on container logging to west world.
Test: manual
Bug: 137777105

Log result for swiping in and out of -1 screen.
  data {
    elapsed_timestamp_nanos: 597609736235111
    atom {
      launcher_event {
        action: SWIPE_LEFT
        src_state: HOME
        dst_state: HOME
        is_swipe_up_enabled: true
      }
    }
  }

  data {
    elapsed_timestamp_nanos: 597610569783111
    atom {
      launcher_event {
        action: SWIPE_RIGHT
        src_state: HOME
        dst_state: HOME
        is_swipe_up_enabled: true
      }
    }
  }


Change-Id: Ic84d3c32d1c9f780f13ec5cd6320e9f1d610f018
2019-08-22 16:27:49 -07:00
Sunny Goyal 6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
Sunny Goyal 11a50747ed Refactoring some folder binding logic:
> Moving grid calcutation in a separate class
> Moving content saving logic to folder instead of relying on item bind

Bug: 139051851
Change-Id: I81b226dbebe13652482a767c992e8cc8f4f35a60
2019-08-14 12:03:09 -07:00
Vadim Tryshev f4a1814c3f Merge "Adding debug tracing to catch non-dragging to workspace" into ub-launcher3-qt-qpr1-dev 2019-08-05 23:30:13 +00:00
vadimt f1726290d4 Adding debug tracing to catch non-dragging to workspace
Bug: 138729456
Change-Id: I28f1eaeb17a75cbc6f52b259d0226deaff42e0bb
2019-08-05 13:52:36 -07:00
Becky Qiu bfc2da1fd8 Log the right workspace id for -1 screen for stop and resume.
Test: manual
Bug: 137952354

Logs after this fix:
08-01 12:01:36.220 17105 17105 D UserEvent: action:STOP
08-01 12:01:36.220 17105 17105 D UserEvent:  Source child:WORKSPACE id=-1
08-01 12:01:36.220 17105 17105 D UserEvent:  Elapsed container 5511 ms, session 5511 ms, action 0 ms
08-01 12:01:36.220 17105 17105 D UserEvent:
08-01 12:01:38.042 17105 17105 D UserEvent:
08-01 12:01:38.042 17105 17105 D UserEvent: -----------------------------------------------------
08-01 12:01:38.042 17105 17105 D UserEvent: action:RESUME
08-01 12:01:38.042 17105 17105 D UserEvent:  Source child:WORKSPACE id=-1
08-01 12:01:38.042 17105 17105 D UserEvent:  Elapsed container 7334 ms, session 7334 ms, action 0 ms
08-01 12:01:38.042 17105 17105 D UserEvent:

Change-Id: Ic2d88eee3ff7a0e28d5c7e4cab8ee61952ed95ee
2019-08-01 22:55:42 +00:00
Hyunyoung Song e299a45944 Add several missing swipe logging
Enable swipe down to open noti shade from landscape

Bug: 137137090
Bug: 137954767
Bug: 134181439

Change-Id: I47b4d17c9ae0586565fce101eb478e33ed8f7e3d
2019-07-25 13:18:48 -07:00
vadimt 7a4ed2f258 Removing tracing for fixed bugs
Bug: 133009122
Bug: 133765434
Bug: 134532571
Change-Id: I37aa1851a1bc0874c0b9acf561bde28966e9b523
2019-07-15 18:48:06 -07:00