Commit Graph

4240 Commits

Author SHA1 Message Date
Alex Chau 9c07fc1350 Re-land "Update Tapl tests for enable_grid_only_overview"
- Fix getCurrentTask() to correctly get the top-right tasks in grid only overview. It'll first get the widest task, and then top, and then rightmost task
- Fix scrollLeftByDistance() to correctly account for leftGestureMargin to make sure it scroll by distance provided
- Fix scrollCurrentTaskOffScreen() to actually scroll the task off screen
- Fix createAndLaunchASplitPair() to use Task menu instead of Overview actions for grid only overview
- Skip testOverviewActions() in grid only overview, where Overview actions isn't available
- Fix testOverivewForTablet to expect the correct task in grid only overview; also disabled part of a test due to an animation bug in Overview
- Fix dismissBySwipingUp() to swipe from bottom of task, which is required to effectively dismiss top row tasks
- Also fixed OverviewTask to correctly get objects in FallbackOverview
- Fix touchOutsideContainer() to calcualte y base on container's middle correctly

Bug: 283246928
Test: presubmit
Flag: None
Change-Id: I77e91dcc1a404ade356b29fba6cf967c534c08f4
2023-11-02 22:37:26 +00:00
Vadim Tryshev 260657b79c Disable flash detector
The tests fail on TaskView, even though it's in the ignore list.
I have to bandwidth to investigate this now, so just disabling the
detector.

Bug: 309014345
Test: presubmit
Flag: N/A
Change-Id: Ied24afdefaf4a122a4603f978aa44a6933a746cf
2023-11-02 15:28:27 -07:00
fbaron 1bc36b93b4 Ensure shortcuts show up in widget picker screenshot test
Bug: 295901350
Flag: NONE
Test: WidgetPickerImageTest
Change-Id: Ib16739aa04838a6f133cf2728dbb3fcd52a9c2ed
2023-11-02 17:49:40 +00:00
Alex Chau 39c548bd03 Merge "Revert "Update Tapl tests for enable_grid_only_overview"" into main 2023-11-02 13:36:34 +00:00
Sam Dubey 0552d37f34 Revert "Update Tapl tests for enable_grid_only_overview"
Revert submission 25220083-b/283246928

Reason for revert: b/308930958

Reverted changes: /q/submissionid:25220083-b/283246928

Bug: 283246928
Change-Id: I69ce128061f7ffad213f8f193122b18e5ee9378d
2023-11-02 13:33:55 +00:00
Alex Chau 25cd358a27 Merge "Update Tapl tests for enable_grid_only_overview" into main 2023-11-02 11:06:03 +00:00
Tony Wickham eccf070bae Change TAPL to swipe to stash taskbar (instead of deprecated long press)
This also means Taskbar is transient by default in automated tests,
instead of persistent. Updated some checks accordingly.

Flag: LEGACY ENABLE_TRANSIENT_TASKBAR ENABLED
Test: TaskbarExpandCollapse#hideShowTaskbar; TaplTestsTaskbar;
TaplTestsTransientTaskbar; TaplTestsPersistentTaskbar
Bug: 270395798

Change-Id: Ib6e592a31a55a912a7ea991a421a9c60bca51c80
2023-11-01 23:16:10 +00:00
Vinit Nayak a0ed884dfd Merge "Add logs when sysuiProxy clears binder refs" into main 2023-11-01 22:49:17 +00:00
Alex Chau 3029b8314e Update Tapl tests for enable_grid_only_overview
- Add "task" as id for TaskView, and use it instead of "snapshot" when creating OverviewTask, so that for split tasks are caputred as a whole in getCurrentTask and getTasks
- Fix getCurrentTask() to correctly get the top-right tasks in grid only overview. It'll first get the widest task, and then top, and then rightmost task
- Fix scrollLeftByDistance() to correctly account for leftGestureMargin to make sure it scroll by distance provided
- Fix scrollCurrentTaskOffScreen() to actually scroll the task off screen
- Fix createAndLaunchASplitPair() to use Task menu instead of Overview actions for grid only overview
- Skip testOverviewActions() in grid only overview, where Overview actions isn't available
- Fix testOverivewForTablet to expect the correct task in grid only overview; also disabled part of a test due to an animation bug in Overview
- Fix dismissBySwipingUp() to swipe from bottom of task, which is required to effectively dismiss top row tasks
- Also fixed OverviewTask to correctly get objects in FallbackOverview

Bug: 283246928
Test: presubmit
Flag: None
Change-Id: I5dd39b1779ea02738556f921169dbe38aa4cba8c
2023-11-01 22:15:12 +00:00
Vadim Tryshev 864c02a47d Merge "Clean up comment" into main 2023-11-01 21:39:42 +00:00
Thales Lima 9623aaa470 Merge "Change AllApps padding to use a Rect" into main 2023-11-01 12:21:53 +00:00
Vadim Tryshev 5ad63608f7 Clean up comment
Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: Ibe17cd8142689598db1ce5700ef122b67b37e1a7
2023-10-31 15:49:52 -07:00
Stefan Andonian 7117c55578 Merge "Robustly fixed issue where migration from different versions of DB data tables was causing crashes upon grid size switching." into main 2023-10-31 22:44:06 +00:00
Stefan Andonian e8b86db34d Robustly fixed issue where migration from different versions of DB data
tables was causing crashes upon grid size switching.

Bug: 304687723
Test: Verified behavior through unit test. Also manually tested that
factory resetting device -> adding shortcuts to the workspace ->
changing the grid size didn't cause any issues and resulted in normal
behavior.

Change-Id: I1945004d2c9a2d6f2b74d9597b39763ed4962e7b
2023-10-31 20:27:26 +00:00
Thales Lima b433c9c312 Change AllApps padding to use a Rect
AllApps uses different values for left and right padding in some places (e.g. ActivityAllAppsContainerView uses workspacePadding.left/right), and this change is the first step into moving those values into DeviceProfile.

Bug: 269632571
Test: NexusLauncherTest
Flag: NONE
Change-Id: I14c4edf55ca74f256b1aaa336fff246a0c78e25d
2023-10-31 16:19:40 +00:00
Uwais Ashraf 4fc9a1001f Replace usage of deprecated initAllFlagsToReleaseConfigDefault() method
Bug: 306088813
Flag: NA
Test: Presubmits passing
Change-Id: Iff852702424f4e18c67a6bd3b110beb528b39e3b
2023-10-31 15:31:18 +00:00
Pat Manning b53d8d6360 Fix focus navigation of All Apps when using external keyboard.
- All apps icons do not show the focus rectangle when focused as mIconFocusListener is null in BaseAllAppsAdapter when onCreateViewHolder is called.
- All apps recyclerview does not scroll down when focus goes from top to bottom of list, as AllAppsToastUiDelegate calls hideKeyboard which clears focus.
- Focus goes behind AllApps into hotseat, so update hotseat setDescendantFocusability.

Flag: NONE
Fix: 296844600
Test: TaplKeyboardFocusTest
Change-Id: I65f6fbb6f4df0be4b4ff922dda267d27da16effe
2023-10-31 13:47:12 +00:00
Vinit Nayak d1e9cacfdc Add logs when sysuiProxy clears binder refs
Bug: 302551868
Flags: None
Change-Id: Iec9fc3cd52a3e3bac0ba61d0f38dbc05933e573c
2023-10-30 16:13:51 -07:00
Jeremy Sim 1819868da9 Merge "Fix bug with TAPL tests not recognizing full height/width of split tasks" into main 2023-10-30 21:53:58 +00:00
Helen Cheuk e389a8566e Merge "Use correct resource id for verifying launching Lens from PSB" into main 2023-10-30 16:59:35 +00:00
Federico Baron e96eeb176d Merge "Fix failing DeleteDropTargetTest" into main 2023-10-27 22:48:45 +00:00
fbaron 3235dc5a16 Fix failing DeleteDropTargetTest
Test was failing because on some devices a height of 30 is not enough for the text to be clipped

Bug: 306179709
Test: DeleteDropTargetTest
Flag: NONE
Change-Id: Ie6e37ec9b2ccc83097ed74e70e6e5048bc6199a6
2023-10-27 18:23:04 +00:00
helencheuk dcb702fe22 Use correct resource id for verifying launching Lens from PSB
Fix: 292083393
Test: Qsb#launchLens
Flag: NA
Change-Id: Id248e1f6a166a02e29eaa8a8f23d55fbdd462672
2023-10-27 16:57:10 +01:00
Jeremy Sim 3303704c70 Fix bug with TAPL tests not recognizing full height/width of split tasks
Previously, OverviewTask was only using one task tile to calculate its visible bounds. In the case of split tasks, this sometimes returned a wrong value.

Fixed by changing getVisibleHeight() to calculate height differently if the task is split.

Bug: 307853547
Test: Tests still pass, upcoming changes (ag/25143701) are unblocked.
Flag: N/A
Change-Id: I78221bafd8069275987c310ab05e0ed9e9cd4aa7
2023-10-26 12:43:15 -07:00
Uwais Ashraf 6eb006ed90 Merge "Add margins to top and bottom when grid only overview enabled" into main 2023-10-25 13:53:24 +00:00
Pat Manning 93f8778da2 Merge "Go home before getting overview in test to ensure overview will exist." into main 2023-10-25 10:37:01 +00:00
Thales Lima 7275322cf0 Merge changes from topic "handheld_landscape" into main
* changes:
  Remove app labels in isVerticalBar
  Decrease text size if it doesn't fit the cell
2023-10-25 10:13:58 +00:00
Sunny Goyal 7955bd97df Merge "Simplifying settings activity" into main 2023-10-24 20:13:17 +00:00
Charlie Anderson c8ac1b41f7 Merge "Adds unit tests for AppWidgetsRestoredReceiver" into main 2023-10-24 19:39:18 +00:00
Sunny Goyal 6eb256d794 Simplifying settings activity
> Removing multiple fragments
> Exposing support to select preference root
> Adding support for recreating preferences
> Moving Developer options to same fragment

Bug: 305084752
Flag: N/A
Test: Manual
Change-Id: I499be1938ef8ed58cbc7f9b0f4ad3510d4b306c8
2023-10-24 11:40:12 -07:00
Uwais Ashraf aa7fa886d6 Add margins to top and bottom when grid only overview enabled
Fix: 299100244
Test: OverviewImageTest and dump tests
Flag: ACONFIG com.android.launcher3.enable_grid_only_overview TEAMFOOD
Change-Id: I22ebced5bf1e27974036d6e2ef72d2b8d63df824
2023-10-24 16:15:39 +00:00
Pat Manning 3a2fde4db4 Go home before getting overview in test to ensure overview will exist.
Also when opening settings, do not wait for A11Y event which never fires. (added in ag/24777489, but seems to fail as mentioned here b/303329286#comment2 and tracked here b/298114205)

Fix: 307379525
Fix: 307397957
Bug: 298114205
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu TRUNKFOOD
Test: TaplOverviewIconTest
Change-Id: Icd8a47b47d22ddb32db7df6882ec655f0e6f54c1
2023-10-24 14:43:11 +00:00
Thales Lima 24ceca6993 Decrease text size if it doesn't fit the cell
Bug: 293467738
Test: ResponsiveHomeScreenImageTest
Test: ResponsiveAllAppsImageTest
Test: DeviceProfileResponsiveDumpTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: Ic0b2d3cde1d4b8b9089f93b96c9bb386247603ce
2023-10-24 13:07:22 +00:00
Jordan Silva 4d95f79db5 Merge "Create a new test suite for screenshot tests" into main 2023-10-23 22:46:11 +00:00
Pat Manning 1f5d5be70d Merge "Move overview tests to quickstep package." into main 2023-10-23 18:26:38 +00:00
Charlie Anderson 65f1fc806c Adds unit tests for AppWidgetsRestoredReceiver
- Makes slight adjustments (no behavior changes) to RestoreDbTask and its tests for proper separation

Test: ran unit tests
Bug: 294386159
Flag: none

Change-Id: I3d882f5edcb6a0161a203ef46a5258e9c4ffe18e
2023-10-23 14:21:50 -04:00
Brandon Dayauon e7396c927b Merge "ENABLE_TWOLINE_ALLAPPS to true" into main 2023-10-23 18:19:51 +00:00
Jordan Silva e5fb55cf88 Create a new test suite for screenshot tests
Adding a new test suite NexusLauncherScreenshotTests to run the screenshot tests separate from the Launcher tests.

Bug: 303224992
Flag: N/A - tests
Test: atest NexusLauncherScreenshotTests
Change-Id: Ie4c328b829402f23fc22876481d66fc414aede3c
2023-10-23 15:22:16 +00:00
Pat Manning 954e3b8dee Move overview tests to quickstep package.
Fix: 305394234
Test: TaplOverviewIconAppChipMenuTest, TaplOverviewIconTest
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu DEVELOPMENT
Change-Id: Ib39e2ec7f53de0c4b557558776c7ad428e4cab22
2023-10-23 16:15:33 +01:00
Vadim Tryshev 8695855591 Aggressively unlocking phone while in presubmit
Bug: 303755862
Test: presubmit
Flag: N/A
Change-Id: I6c314c9a42b4e4935cbbfc0faaf7d788c1020697
2023-10-20 19:40:58 +00:00
Randy Pfohl 8fb1d8f295 Merge "Removing obselete logging used for flaky test investigation" into main 2023-10-18 16:33:06 +00:00
randypfohl e07068a0c9 Removing obselete logging used for flaky test investigation
Bug: 293191790

Test: not needed.

Flag: not needed.

Change-Id: I0378c1cc16ae25006d226db3b858394e5f20a22b
2023-10-17 11:47:00 -07:00
Pat Manning df72740384 Merge "Revert "Revert "Combine icon app tests to allow overriding flag ..."" into main 2023-10-17 17:28:24 +00:00
Pat Manning 24cec69361 Revert "Revert "Combine icon app tests to allow overriding flag ..."
Revert submission 25032768-revert-25007147-tapl-flag-SBORVHYDTI

Reason for revert: Resubmitting for b/304470271

Reverted changes: /q/submissionid:25032768-revert-25007147-tapl-flag-SBORVHYDTI

Change-Id: Ib0bd13a5c2a366160b185a2c6409c607ed7525a1
2023-10-17 15:56:48 +00:00
Uwais Ashraf c1eecf21e9 Merge "[Trunk Stable] Use SetFlagsRule.initAllFlagsToReleaseConfigDefault instead of disabling all flags in setUp." into main 2023-10-17 14:09:47 +00:00
Riddle Hsu a60c091c94 Merge "Finish recents animation for standalone recents on home" into main 2023-10-17 10:56:28 +00:00
Anushree Ganjam 6ee3a32b12 [Trunk Stable] Use SetFlagsRule.initAllFlagsToReleaseConfigDefault instead of disabling all flags in setUp.
Bug: 294913042
Flag: NA
Test: Unit tests
Change-Id: Ib570ce67f53d4af7407b36f6fee1a3517800155f
2023-10-17 10:27:54 +00:00
Riddle Hsu aeb3ff6b5c Finish recents animation for standalone recents on home
(This is to reland with fixing FallbackRecentsTest#testOverview
by excluding fallback overview panel which doesn't show visual
difference from AnomalyDetector)
There was a check from RunningTask to avoid using transient-launch
when launching recents activity on a 3rd party home. But the info
may not be updated in time (from TaskStackChangeListener) if there
are several changes happen in a short time.

Then it may misjudge that home is still on top but the current top
is a normal app. Then the app will be paused unexpected because
setTransientLaunch() is not called.

Since FLAG_MOVED_TO_TOP is introduced, task reorder will also be
collected in transition, so the check of isHomeTask is longer needed.
But RecentsTransitionHandler still needs to cooperate with it about
how to animate the merging animation while recents animation is running.
To simplify it, just finish the recents animation when recents activity
is launched on top of home activity, i.e. consider it as a regular
launch because only the recents activity is on top and there are no
other apps need to keep visible for live-tile.

Note that setTransientLaunch() is still called for the case. However
its effect will be gone after the transition is finished.

This can also fix various issues when using a 3p launcher:
 - When auto rotation is enabled and put device in landscape:
    - Unable to enter recents from gesture mode
    - System bars are disappeared when pressing recents key
 - Jump-cut when pressing home key to leave recents on home.

Bug: 302703228
Bug: 294029838
Test: WindowInsetsBehaviorTests
Test: Rapidly click navigation bar while a regular app is on top.
      The app should not receive onPause.
Change-Id: I387fcb26aa01072dfd5a215107c9c15b28513a82
2023-10-17 05:45:16 +00:00
Pat Manning 0cf05c92e3 Set FastBitmapDrawable's badge alpha when updating drawable alpha.
Test: FastBitmapDrawableTest
Fix: 304559962
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:08f89425bbd652f9f6e0ad0d31f2e9aba8556705)
Merged-In: Ie545cc5da506c77af18f99b5d045cafc37110a5a
Change-Id: Ie545cc5da506c77af18f99b5d045cafc37110a5a
2023-10-17 02:43:07 +00:00
Brandon Dayauon 617db544da ENABLE_TWOLINE_ALLAPPS to true
Need to use old way of changing FeatureFlag flag values in tests since this feature
also uses FeatureFlag.java flag value.

bug: 270390937
Test: presubmit/locally - https://screenshot.googleplex.com/4nCVDPb2yRwW7rh
Flag: turning to ENABLED (been in teamfood in aconfig)
Change-Id: I392de84c6fb84b7a217b953f2335160056b4ecc3
2023-10-16 10:02:06 -07:00