Commit Graph

12553 Commits

Author SHA1 Message Date
Andy Wickham 6729f0b950 Refactors Search results into separate RV for Toast.
This will help enable transitions between A-Z apps lists and
search results because both can be seen simultaneously and
manipulated independently.

Some high level items of the refactor:
 - SearchRecyclerView is added; logic that populated the main
   (personal) tab with search results was simply redirected to
   this RV instead.
 - BaseAllAppsContainerView added isSearching() method. Returns
   false, and ActivityAllAppsContainerView overrides (as search
   is handled there).
 - Renamed BaseRecyclerView to FastScrollRecyclerView to better
   describe what it does. SearchRecyclerView extends this, but
   returns false for supportsFastScrolling().
 - AlphabeticalAppsList#mAllAppsStore is now optional, so the
   Search RV doesn't need to store/listen to apps. Note this
   doesn't affect the predicted app row which is still updated
   if one of the predicted apps is uninstalled (I tested this).

Future work:
 - Determine why dispatchRestoreInstanceState is not called for
   BaseAllAppsContainerView. Save is called, e.g. on rotation.
   Effect of restore not called: rotating while searching goes
   back to A-Z list.
 - Keep suggested apps in Header while searching. Currently they
   are rendered in the SearchRV above search results, as before.
 - Potentially extract Personal/Work tabs to move independently of
   header.
 - AlphabeticalAppsList is a misleading name because it can also
   contains search results. However, things are pretty intertwined
   between that and BaseAllAppsAdapter (effectively a circular
   dependency), so I figured cleaning all that up was out of the
   immediate scope of this refactor, which is mainly meant to
   unblock transition work.

Bug: 206905515
Test: Manually checked for regressions, ran tests.
Change-Id: I4d3757c8a8f9b774956ca6be541dd4fcdad1de13
2022-04-24 17:36:48 -07:00
TreeHugger Robot 4ebc61e76a Merge "Provide more accurate feedback on nav bar region gestures during the back gesture tutorial." into tm-dev am: 1582aafbc0 am: 9c3bd94b48
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17921423

Change-Id: I5a02a4c0d0d22655559100c95998ceec0f7a752b
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-23 03:56:23 +00:00
TreeHugger Robot 418bcb0979 Merge "Provide more accurate feedback on nav bar region gestures during the back gesture tutorial." into tm-dev am: 1582aafbc0 am: ea1c7379d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17921423

Change-Id: I18d80825ce6d1392080592ded2b86228adb7ec9e
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-23 03:55:20 +00:00
TreeHugger Robot 1582aafbc0 Merge "Provide more accurate feedback on nav bar region gestures during the back gesture tutorial." into tm-dev 2022-04-23 02:51:20 +00:00
Tony Wickham 96c5c67dca Defer onIsStashedChanged() until all controllers are initialized am: aed0c4d73e am: cc10db044f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17921731

Change-Id: I0471cb6feb14e517dea2ca0a07445335ecee45a5
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-23 01:47:33 +00:00
Tony Wickham 33474c4f7a Defer onIsStashedChanged() until all controllers are initialized am: aed0c4d73e am: a9359fc943
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17921731

Change-Id: I629c619a20e39c327fb20f788a02f610b7c8bbf3
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-23 01:47:01 +00:00
Tony Wickham aed0c4d73e Defer onIsStashedChanged() until all controllers are initialized
Test: N/A
Fixes: 230133882
Change-Id: I27df993a08327d28669963e3cecfaa133daf11c9
2022-04-22 17:28:35 -07:00
Tony Wickham b0b89c7f00 Merge "Address a couple small followups for TaskbarInsetsController" into tm-dev am: 357c622572 am: 9de10ff889
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17873349

Change-Id: I56e8a873e333b1470eddddb73157ace4eb531bb7
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 23:43:01 +00:00
Tony Wickham efdae030a6 Merge "Address a couple small followups for TaskbarInsetsController" into tm-dev am: 357c622572 am: b8bfa20d79
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17873349

Change-Id: I14e26af5f266999bbc7f7a3ad528f96fa652ebff
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 23:42:28 +00:00
Schneider Victor-tulias 04169cd3fc Provide more accurate feedback on nav bar region gestures during the back gesture tutorial.
Test: manual
Fixes: 221192860
Change-Id: Id9f912e7db2d89fc948566f5cd16f4b641cdfa31
2022-04-22 16:37:49 -07:00
Tony Wickham 357c622572 Merge "Address a couple small followups for TaskbarInsetsController" into tm-dev 2022-04-22 22:55:10 +00:00
Santiago Etchebehere e9f490374c Merge "Revert "Use new onStartSplitLegacy when starting split from overview"" into tm-dev am: 8340cb6d7d am: f52e543389
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17918609

Change-Id: I8e138883c1440327abb6e0e595a0b5e47e17d545
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 21:52:37 +00:00
Santiago Etchebehere eef266fe39 Merge "Revert "Use new onStartSplitLegacy when starting split from overview"" into tm-dev am: 8340cb6d7d am: 78194ca6ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17918609

Change-Id: I2d68fd2a3348c2ca7bede5a189e93c14b34b8826
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 21:20:47 +00:00
Sunny Goyal 8fbfd8ecf8 Merge "Removing fade in logic during load." into tm-dev am: 84151d2bca am: d99aee90ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17768817

Change-Id: I7ca9e432376e4533a1643187c51ab3545f25c465
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 21:20:32 +00:00
Sunny Goyal ba0a00eec9 Merge "Removing fade in logic during load." into tm-dev am: 84151d2bca am: 77d7797f83
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17768817

Change-Id: Icaa4a4a6863e43f6b499d0c21be0614e11b4381c
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 21:19:48 +00:00
Santiago Etchebehere 8340cb6d7d Merge "Revert "Use new onStartSplitLegacy when starting split from overview"" into tm-dev 2022-04-22 21:07:18 +00:00
Santiago Etchebehere b8ad6e08cf Revert "Use new onStartSplitLegacy when starting split from overview"
Revert submission 17779173-startSplitLegacy

Reason for revert: Broken build: b/230129218
Reverted Changes:
I01590e53c:Remove check for preventing re-parenting non-split...
I696749f76:Use new onStartSplitLegacy when starting split fro...

Change-Id: I6d81e0584bbfda3694772dcf293a4d064b2e8517
2022-04-22 21:02:22 +00:00
Sunny Goyal 84151d2bca Merge "Removing fade in logic during load." into tm-dev 2022-04-22 20:29:34 +00:00
Jeremy Sim d0b1258d27 Merge "Fix crash bug when splitting with animations disabled" into tm-dev am: 602b46c399 am: 8f00e9bc55
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17807433

Change-Id: I95cf7e35b7f7424d30e978214135476e86da12ff
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:24:24 +00:00
TreeHugger Robot 936a3e1239 Merge "Use new onStartSplitLegacy when starting split from overview" into tm-dev am: 8aead5503f am: 1a3002207b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17779173

Change-Id: I9d130eb8e5d070dfd2f5f3fe6e94978eb0fbf8f3
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:23:43 +00:00
Tony Wickham ae15c42ce6 Merge "Migrate from InsetsInfo.contentInsets to WindowManager.LayoutParams#providedInternalInsets" into tm-dev am: 741e4aeb95 am: 8426275608
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17778392

Change-Id: I90101494f32fa6b15b5085b75a78fb80bc8d3cfc
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:22:09 +00:00
Jeremy Sim fb8907517c Merge "Fix crash bug when splitting with animations disabled" into tm-dev am: 602b46c399 am: cca5e510fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17807433

Change-Id: Ie12e347f3d58730d4a0ae5ed9c4c92fbfcace800
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:21:14 +00:00
TreeHugger Robot f06f6e7f1d Merge "Use new onStartSplitLegacy when starting split from overview" into tm-dev am: 8aead5503f am: e17589f4b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17779173

Change-Id: Ib73e94fdb7f113ba0838b857817648520d91bb02
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:20:50 +00:00
Tony Wickham cf6b7e2dd9 Merge "Migrate from InsetsInfo.contentInsets to WindowManager.LayoutParams#providedInternalInsets" into tm-dev am: 741e4aeb95 am: 44e65099c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17778392

Change-Id: If17f49f0227f14bdbbd72a8c7480b7a27eacc73a
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:20:01 +00:00
Jeremy Sim 602b46c399 Merge "Fix crash bug when splitting with animations disabled" into tm-dev 2022-04-22 20:05:09 +00:00
TreeHugger Robot 8aead5503f Merge "Use new onStartSplitLegacy when starting split from overview" into tm-dev 2022-04-22 20:03:36 +00:00
Jeremy Sim 42276318b9 Fix crash bug when splitting with animations disabled
Fixes a bug where disabling animations (through Settings) would cause split staging to crash.

The crash occurs because when animations are disabled, StateManager advances to OVERVIEW_SPLIT_SELECT too quickly, and does not trigger the appropriate code block in RecentsViewStateController#handleSplitSelectionState(). This causes a crash.

Fixed by changing the conditional so that it always runs when OVERVIEW_SPLIT_SELECT is the target state, no matter the starting state.

Note: If more animations are added for this state in the future, the conditional may need to be tweaked further.

Fixes: 223598955
Test: Confirmed not crashing on 2 devices when splitting in a variety of ways.
Change-Id: I7f3def88f124fa1babe9a943adf72c10f58b7131
2022-04-22 19:58:40 +00:00
Tony Wickham 741e4aeb95 Merge "Migrate from InsetsInfo.contentInsets to WindowManager.LayoutParams#providedInternalInsets" into tm-dev 2022-04-22 19:55:31 +00:00
TreeHugger Robot da0d7d3fcc Merge "Reset touch state when removing all tasks in RecentsView.applyLoadPlan" into tm-dev am: 37fa1392ec am: e03e7e1f5f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17586926

Change-Id: I44be923da02284b6edf86e2b1f3d539ccd6a6c15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 18:20:07 +00:00
TreeHugger Robot 3c2956abcc Merge "Reset touch state when removing all tasks in RecentsView.applyLoadPlan" into tm-dev am: 37fa1392ec am: 0e46bac72f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17586926

Change-Id: I0303221c25206ae054099019d0426b40794cfd73
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 18:19:35 +00:00
Alex Chau a053005db5 Update pull back animation for tablet AllApps am: e3b806366a am: a6f8f85436
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17757987

Change-Id: I79e4523321a3ac8a5d6f806bc075f02bebf29230
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 18:18:57 +00:00
Alex Chau d5620750fc Update pull back animation for tablet AllApps am: e3b806366a am: 24771d2ef7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17757987

Change-Id: If13ee7fdfaced3a40e45be7e817e03bbcc911413
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 18:18:37 +00:00
TreeHugger Robot 37fa1392ec Merge "Reset touch state when removing all tasks in RecentsView.applyLoadPlan" into tm-dev 2022-04-22 17:33:06 +00:00
Sunny Goyal 7b8d63fcf8 Removing fade in logic during load.
Launcher already blocks the draw during load, which ensures
that system draws the loading screen. Additional fade animation
is not visible since the Launcher window is already getting fade in

Bug: 199120420
Bug: 199120420
Test: Verified on device

Change-Id: I7089cea4c5f97f6ef92eabcba56451de407c98b8
2022-04-22 16:35:40 +00:00
Alex Chau e3b806366a Update pull back animation for tablet AllApps
- This is a follow-up of http://ag/17636490
- Introduced animation property specifically for pullback translation and alpha, which will invoke getRecyclerViewContainer directly on tablet, and invoke aggregate setter of appsView on phones
- Delay reset of pullback animation to after dismiss animation to avoid jump in value during state transition animation
- Introduced property factory for addictive properties similar to MultiScalePropertyFactory

Fix: 220345008
Test: manual on small and large screen
Change-Id: I7b5c0019c1d4d36c3c7ca4ec79e38e4eb09c32ca
2022-04-22 16:27:25 +01:00
TreeHugger Robot 71a63918c6 Merge "Snap to last task if swiping down at a greater Y than X velocity." into tm-dev am: df436c364c am: dc06e3be5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17891361

Change-Id: I49cffc67fb9b7ae6b2cbcd40840f0b4109614c01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 04:15:13 +00:00
TreeHugger Robot 6aa256ea42 Merge "Snap to last task if swiping down at a greater Y than X velocity." into tm-dev am: df436c364c am: 26a5435136
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17891361

Change-Id: Icb517661a1120676aaa1df8e946bc1ff6b377d52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 03:28:53 +00:00
Brian Isganitis e10ab8cdcd Snap to last task if swiping down at a greater Y than X velocity.
If you swipe down slightly diagonally, it will almost always be treated as a swipe to the next task rather than a return to the current task. If we are swiping down and the Y velocity is grater, we should snap to the current task instead.

Test: Manually in fully gestural mode.
Bug: 222117127
Change-Id: I0f591fa5117291a9c095c2b733280464d29103d9
2022-04-21 22:50:39 +00:00
Vinit Nayak dd7e132db5 Use new onStartSplitLegacy when starting split from overview
Bug: 223396876
Change-Id: I696749f7674a09b2a12c6ef2c2b7d19d0884049a
2022-04-21 11:51:24 -07:00
TreeHugger Robot 15e9b89a37 Merge "Fixing potential NullPointer exceptions when Launcher is created before TouchInteractionService is initialized" into tm-dev am: d880a4fa63 am: b455425f49
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17805037

Change-Id: Icf9988913455e02797c9ba183a0ca20895dba201
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 18:40:24 +00:00
TreeHugger Robot 6a75aaee52 Merge "Fixing potential NullPointer exceptions when Launcher is created before TouchInteractionService is initialized" into tm-dev am: d880a4fa63 am: b12c1b938d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17805037

Change-Id: Ibd1567306b78855ce80602be657b623598048681
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 18:39:56 +00:00
TreeHugger Robot d1ab7dc291 Merge "Disallow long press below taskbar icons" into tm-dev am: 8e0177813a am: b2ac0758a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17872520

Change-Id: I293cc8908f34ec5d8ed6bc77a315b220ff597812
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 18:00:01 +00:00
TreeHugger Robot c1cf8b0e95 Merge "Disallow long press below taskbar icons" into tm-dev am: 8e0177813a am: c922594e6b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17872520

Change-Id: I763257e603be7845bd63478505266651a4895bba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 17:59:32 +00:00
TreeHugger Robot d880a4fa63 Merge "Fixing potential NullPointer exceptions when Launcher is created before TouchInteractionService is initialized" into tm-dev 2022-04-21 17:54:03 +00:00
TreeHugger Robot 8e0177813a Merge "Disallow long press below taskbar icons" into tm-dev 2022-04-21 17:16:42 +00:00
Tony Wickham f286f9cb98 Address a couple small followups for TaskbarInsetsController
- Added no-op onDestroy()
- Reformated some if conditions, also adding
  AbstractFloatingView.hasOpenView()

Test: TaplTestsTaskbar
Bug: 215411414
Change-Id: I89b39ca5fabd03f5ac0f25d6ef69170683cf060d
2022-04-21 16:16:02 +00:00
Tony Wickham a681cf6abe Migrate from InsetsInfo.contentInsets to WindowManager.LayoutParams#providedInternalInsets
- This allows us to distinguish taskbar's ITYPE_EXTRA_NAVIGATION_BAR insets from its ITYPE_BOTTOM_TAPPABLE_ELEMENT insets
- Set nav bar insets as before (contentInsets)
- Set tappable elements insets the same, except when taskbar is stashed, in which case set to 0

Test: TaplTestsTaskbar; manually stash/unstash taskbar, open IME, open Calculator (which uses tappableElement() insets) and Contacts (which uses systemBars())
Fixes: 215411414
Change-Id: If00f7a590b0780715d5b8159f5135054364ce84e
2022-04-21 16:15:41 +00:00
Tony Huang 8b260268d8 Merge "Add jank instrument support for split screen" into tm-dev am: 8edc0dfcf1 am: 0e5421b491
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17818645

Change-Id: I7bbd34aa8b2f90c103cceb762e0a2efc4f233963
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 12:09:32 +00:00
Tony Huang ac409540bc Merge "Add jank instrument support for split screen" into tm-dev am: 8edc0dfcf1 am: b01dc823a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17818645

Change-Id: I680bba5206adfb81754b042b7b76748bf5a4d404
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 12:09:23 +00:00
Tony Huang 8edc0dfcf1 Merge "Add jank instrument support for split screen" into tm-dev 2022-04-21 11:31:22 +00:00