scrolling in all apps did not factor in additional top padding in the all apps list recycler. This made it so that apps could occasionally scroll and be obcured by that top padding, making them un-tappable. Added this padding to the scrolling logic to make scrolling less flaky.
Test: TaplTestsTaskbar, TaplTestsLauncher3 and presubmit
Fixes: 248064856
Change-Id: Id76b92b4bc354917f3688ac53673d0ed7a905f02
> Updating the LayoutManager's scroll calculation instead of a separate
implementation to better support recyclerView's calculations
> Caching the view sizes during layout to avoid view-inflation for
unknown types
> Fixing scrollbar jump during scroll when widget list is expanded
> Fixing scrollbar never reaching end when onboarding card is displayed
in work tab
Bug: 240343082
Test: Verified on device that new views are not inflated
Change-Id: Ied11ccf65b053691c5c126c4bf8de306ec24786d
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.
Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
Some devices in portrait mode have the same symptoms as b/234322284.
Simply return 1/3 of the position like the X axis to solve the problem.
Bug: 238202110
Test: atest Launcher3Tests:TaplTestsLauncher3#testAddDeleteShortcutOnHotseat
Change-Id: Ic7d3756cfbda6673a62b266c6093745b8311e6ac
- Removed TestProtocol.sForcePauseTimeout and
TestProtocol.REQUEST_SET_FORCE_PAUSE_TIMEOUT
- Instead, add MotionPauseDetector.TEST_HARNESS_TRIGGER_TIMEOUT, which
is used when Utilities.IS_RUNNING_IN_TEST_HARNESS.
Test: unbundled/launcher/launcher3_test_platform
Fixes: 232548865
Change-Id: I224e99042b41375cab6bffd555434217518958c5
This reverts commit 6729f0b950.
Reason for revert: This change caused b/230648542.
Please see https://b.corp.google.com/issues/230648542#comment5 for the video after reverting this change.
Bug: 206905515
Bug: 230648542
Change-Id: I85f063c56cad137c05b810204244bba7e8f94ee7
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
These are review comments followup from ag/17399997
Bug: b/218187058
Test: manually test thet Launcher3 features work correctly
Change-Id: I9865a37c1ed663370dc28e7678994f3d961e3cd1
The change updates features listed as follow:
1. Create a new class for folder icon.
2. Implement function to drag a icon to the other.
(create a folder)
3. Find folders in a workspace.
Bug: 199120092
Test: Launcher3Tests:com.android.launcher3.ui.TaplTestsLauncher3#testDragToFolder
Change-Id: I3044025f8297f6e442446d70238f4b56f38a798a
- Override our insets in LauncherRootView to explicitly only care about nav bar size, ignoring any insets due to taskbar.
- Previously we used nonOverlappingTaskbarInsets to belatedly subtract from measurements in e.g. DeviceProfile, but now we can revert most of those calculations since we effectively subtract taskbar insets at the root.
Test: visual in different orientations and navigation modes, and testPressHomeOnAllAppsContextMenu to ensure REQUEST_WINDOW_INSETS still works for automated tests
Fixes: 200607741
Change-Id: I8de5a268c686a1354b4beaa30e101bab6bed5af9
- getTargetInsets will be reverted to its behavior before ag/15431427
- getBottomGestureSize will use the new getWindowInset call uses windowInsets instead of the max of windowInsets/gestureInsets, with the taskbar inset calibration
Bug: 195263971
Test: com.android.launcher3.ui.widget.AddWidgetTest#testDragCustomShortcut
Change-Id: I89368edee5252a404ef490db6540734ec4806f2b
- In cuttlefish occasionally MOTION_MOVE and MOTION_UP takes more than 300ms due to lag, increasing the motion pause timeout to avoid getting false signals in tests
Bug: 194114179
Test: atest NexusLauncherOutOfProcTests:com.android.launcher3.memory.MemoryTests#testAppLaunchFromWorkspace
Change-Id: I0a33f34b5bf96f4f7ae56020c5a27f4ef9a0ff64
- Consider taskbar size for bottom gesture size, by using TargetInsets
- TargetInsets should substract overlapping taskbar size when it's present
- For pressHome, use the same gesture scope when context menu is present as well.
- For pressHome, GestureScope.INSIDE_TO_OUTSIDE should only be used when it's already at home screen on launcher3 tablet.
Bug: 193539246
Test: NexusLauncherTest and Launcher3Test
Change-Id: I4a20522f3b38ef326acae4b189df11a125990411
Changes made:
1. Model: added an abstract class for storing common information for
entries shown in the full page widgets picker.
2. Introduced a ViewHolderBinder interface to split the logic of binding
data to ViewHolder into separate classes.
3. Move the view holder binding of WidgetsListRow from WidgetListAdapter
to its new class.
4. Move some widgets picker classes into a new picker package.
Test: Auto: Run WidgetsListAdapterTest, WidgetsListRowEntryTest and
WidgetsListRowViewHolderBinderTest.
Manual: open the all apps widgets tray and navigate the list.
Bug: 179797520
Change-Id: Iab29557842bb79156cad84d00a4c5d0db0c5aa06
Slight revert of ag/10668129 with adjustment
of disabling it for tests.
Fixes: 151456795
Test: Ran the labtest command for OOP
tests for crosshatch (where this issue
was first detected)
Change-Id: I315d138c2e4a6d4068304e9b5fb2e1b7feb34e63
The flake had disappeared, perhaps because of this logging, or,
hopefully, for some other reason.
Bug: 148313079
Change-Id: I636783d5fc71474dd443c143289c3ff74651835e
Activity tracker is accessed on a non-UI thread, which can cause a non-initialized
Launcher to be treated as initialized
Bug: 149022794
Change-Id: I6634a6aff891592369c16469bbe95a9ea611819c
compare pid of launcher process after test execution to verify launcher isn't crashed when running in oop test.
Bug: 147235759
Change-Id: Id13c47f5c4e388cc8e95b19d099e94a2e540bf3f
Test: fun flake locally
Clicking an icon within its padding area is ignored by Launcher. Hence,
ensuring that the whole icon is visible.
Bug: 141770616
Change-Id: I19e3ba7cfa25de75a47202845d0838bea46af92c
- There are two issues:
1) Currently the system does not add the task to the task list until
the activity starting the task has been resumed (to be fixed in a
follow up platform CL). When the three activities are started in
sequence, it's possible for one of the activities to not reach the
resumed state leading to an unexpected number of recent tasks the
next time it's fetched.
2) When swiping up, it may take time for getTasks to return and call
applyLoadPlan, so try and wait until the task views have had a
chance to be applied before continuing.
3) Use the launcher activity tracker instead of activity rule since it
will return the same activity even after the activity is destroyed
- Move the margin handling to the caller instead of the scroll method
Bug: 141580748
Change-Id: I2b7634f5ac6869ba4b369b3bd60e0f63747c0f0b
Now performing jreck@-style garbage collection prior to getting Launcher
PSS. The reduces PSS noise from ~700KB to ~250KB (std dev).
The tests (MemoryTests) run outside of Launcher process and
communicate with Launcher via RPC.
The change is in the RPC handler that lives in Launcher and returns
Launcher PSS to the test.
Bug: 139137636
Change-Id: I457e590b005dac53345f4223d972c7961754938c
> Using a common class for both Launcher and RecentsActivity
> Removing static refenrece to LauncherModel and using a common pattern for
tracking activities
Bug: 141376165
Bug: 137568159
Change-Id: Ic1897abe6913ec78e25725118eedf5b468d5ec70