Commit Graph

56 Commits

Author SHA1 Message Date
Vadim Tryshev
c63c0f7f47 Reformatting a comment.
"b/197780098" can be mistaken for an indication that the code is
temporary and requires cleanup.

This is not the case here, so reformatting the code so that the query
searching for cleanup candidates doesn't see it.

Bug: 197780098
Test: presubmit
Flag: N/A
Change-Id: I076267dc8878763632b52d3449cb20cac331ed04
2024-05-10 12:27:39 -07:00
Winson Chung
94e8ad0731 Add multi-instance state to item infos
- Add legacy resource for supported multi-instance apps that
  matches the current SystemUI resource of the same name, and will
  be removed as apps migrate to the V manifest property to declare
  multi-instance support
- Load the multi-instance state from PackageManager when the db is
  first loaded or when packages are updated
- The multi-instance check is then used to determine if an app pair
  can be saved (ie. whether the action can be shown)

Bug: 323112914
Test: atest NexusLauncherTests

Change-Id: I565b4bee4ab5f7040910306b1fd60a4fc3bf9a1c
2024-05-09 18:43:38 +00:00
Jordan Silva
cbd111483e Add TestActivity without any label for testing
This change adds an unlabeled activity to test the overview select action. The test evaluates the overview modal task state to verify that the UI displays correctly.
Using an activity without a label prevents flakiness from AiAi, which sometimes shows the activity title as selected and sometimes does not.

Bug: 332750488
Flag: NA
Test: OverviewTaskSelectImageTest
Change-Id: I6b63f1410bc466ac6711b0ca3d609d8f7a31d8c1
2024-04-22 12:39:06 +01:00
Tony Wickham
b84b8524a1 Add TaplTestsQuickstep#testExcludeFromRecents
- Add ExcludeFromRecentsTestActivity, and add it to the manifest
  with excludeFromRecents="true"
- Add the test to check the current Overview task content
  description, ensuring that the excludeFromRecents task is
  present directly after a gesture but not after going home.
Bug: 324495241
Flag: None
Test: TaplTestsQuickstep#testExcludeFromRecents

Change-Id: I06be53673f0ac06924f79b44f19744da066cc7ea
2024-03-18 22:30:13 +00:00
Jordan Silva
baae8c5572 Add function to start a test activity with different name and label
Bug: 320314835
Test: NexusLauncherImageTests
Test: NexusLauncherTests
Flag: N/A
Change-Id: Ida26572706eaaa8c46dbe446c700a54b019b530d
2024-02-19 14:33:38 +00:00
Rohit Goyal
9977121e8e Test Fix: Move UnarchiveBroadcastReceiver to AndroidManifest-common to also support NexusLauncher tests.
* Currently unarchival tests only pass for Launcher3. We extend the broadcast receiver to AndroidManifest-common to also support NexusLauncher tests.

Test: atest TaplPromiseIconUiTest.java
Bug: 319240622
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: I9be459a2a0648063d62538eed20c0a6e7644ad44
2024-01-26 00:40:17 +05:30
Uwais Ashraf
ee9089658d Merge "Hardcode ActionBar height to avoid changes while emulating" into main 2024-01-09 12:34:50 +00:00
Uwais Ashraf
aa9e98b5d7 Hardcode ActionBar height to avoid changes while emulating
Test: Presubmits passing
Bug: 284210693
Flag: NA
Change-Id: If3fdb74703f57bfc5c7afbb38caa2acd5b7bd189
2024-01-08 14:53:23 +00:00
Vadim Tryshev
38d395be3e Removing dependency of All Apps test from 1P apps
Test: presubmit
Flag: N/A
Bug: 187761685
Change-Id: I8b3894a383416cea08c56c8874e6974323ffdc3a
2024-01-05 19:02:30 -08: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
Brian Isganitis
d0b9c59839 Add TAPL APIs for search web suggestions.
Design doc: go/toasty-taskbar-tapl

Test: Compiles
Bug: 295366997
Flag: not needed
Change-Id: I4f11a9a0c99a736a499ab498b05b20996e1dc59b
2023-08-25 20:25:39 +00:00
fbaron
e0a3da08ee Update the launcher test app widgets to include a custom icon instead of the default icon
Bug: 292287927
Test: no test
Flag: no flag
Change-Id: I98b87029a7afdcaf85e40accda03a145b213136c
2023-07-31 15:44:00 +00:00
Charlie Anderson
6702ed1e19 adding popup test files and allow for selecting activity to use
Test: manual
Bug: 289228540
Flag: N/A
Change-Id: Ie78cd39d5636d8737b80a809fb22328de574f0c0
2023-07-28 10:07:00 -04:00
Federico Baron
827001a1fa Add WidgetPicker screenshot tests
We need screenshot tests for widget picker to prevent unintended UI changes.

Bug: 268219507
Test: n/a
Change-Id: I405401f5c68bb73bcb7bbd097f507abb1d66ff7e
2023-06-27 17:20:11 -07:00
Sunny Goyal
62ea1f1cb7 Re-enabling testShortcutIconWithTheme
> Updating shortcut id incache the icon cache was the culprit

Bug: 260722220
Test: Verified locally
Change-Id: I0e6bc9b06d1b99e33cb9b1a248647d54bf47dea4
2023-01-04 13:05:42 -08:00
Sunny Goyal
50097ef272 Waiting for app install to finish before procedding with the test
Bug: 256659409
Test: Presubmit
Change-Id: Ia0f4cdd072c4c439d09070b0395fcfd6909c2a8f
2022-11-03 13:33:41 -07:00
Sunny Goyal
39b07fd66c Fixing background jump when closing a widget
We do not add background animation when opening target is translucent
Added additional check to not animate background if launcher is not
closing (which is already a subset of all-targets-translucent)

Also removing reverse background animation from widgets, similar
to app-icons as it is never added for launcherNotClosing path

Bug: 242379946
Test: Added translucent activtiy and widget and verified manually
      that the behavior does not change
Change-Id: Icda8007c0063295bf8431c00a0f0b665ecdef109
2022-11-02 19:17:18 +00:00
Ming-Shin Lu
4d4f62ac77 TAPL: add setIgnoreTaskbarVisibility in LauncherInstrumentation
As now FlickerTests is leveraging TAPL to interact devices CUJs,
we realized in LauncherInstrumentation will verify task bar visibility
automatically to expect it always visible when quick-switch, which is
not always reliable since the task bar may be hidden by manual or
when the activity requests to show IME.

Add setIgnoreTaskbarVisibility in LauncherInstrumentation for the caller
to ignore taskbar visibility if the test does not need to verify it.

Bug: 228012334
Bug: 240306344
Test: atest FlickerTests:SwitchImeWindowsFromGestureNavTest
      in tablet device
Test: atest NexusLauncherOutOfProcTests:com.android.quickstep.\
       TaplTestsQuickstep#testQuickSwitchToPreviousAppForTablet

Change-Id: Id0a35561523d733b8434acb702ec7dcaa466a1c2
2022-10-05 11:37:37 +08:00
Schneider Victor-tulias
fb252e7ce1 Add taskbar TAPL tests
- Added TAPL objects to support TAPL tests for taskbar features
- Added tests for major taskbar features: hiding/showing the taskbar, opening all apps, lauching apps and app deep shortcuts from the taskbar/all apps page, launching apps and app deep shortcuts in splitscreen
- These tests should only run for large devices

Design: go/taskbar-tapl-tests
Test: ran tests locally with invalid configurations and remotely
Bug: 215218813
Change-Id: I3c28c339707467414aa47fa633f87fa0c1fdee57
2022-03-10 13:02:35 -08:00
Sunny Goyal
bcec90b081 Adding tests for themed icons support in Launcher
Bug: 205772453
Test: Presubmit
Change-Id: I2fc8cade8e103e5a7b3aa7349c870e613929464c
2022-02-25 13:35:18 -08:00
Alex Chau
4f7952ead4 Use percentage scaling for overview thumbnail size
- Limit overview to screen ratio to be at max 70%
- Tuned row spacing and page spacing
- Added 2 more test activities to testOverviewForTablet to avoid dismissing tasks at end of grid, as more grid tasks are now shown

Bug: 207350366
Test: manual
Change-Id: Id04871464bdb3ef2d6b046977b0ffd9bd51bc230
2021-12-07 11:00:48 +00:00
TreeHugger Robot
67cace3558 Merge "Make Launcher activity restart on density change" into sc-v2-dev am: e641701c9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16183372

Change-Id: I8e26c801c530d4f2851fe7d41cc58ed83ff5d51b
2021-11-05 12:02:23 +00:00
Alex Chau
84fe75d72e Make Launcher activity restart on density change
- Launcher used to restart when density changes before http://ag/14234761, which added smallestScreenSize and density in configChange
- http://ag/14234761 aims to avoid restart when switching display in split dispalys, for which only size changes, therefore density is unnecessary in configChange
- Keeping density in configChange make Launcher acitvity to stay after changing display size, making all buttons stays in old size in previous denstiy, which is a bug

Bug: 204157738
Test: manual
Change-Id: Ib85326078c67c35d90dc5e9ae5c20eeb5286a610
2021-11-04 11:33:16 +00:00
Pat Manning
2e5511ad4b Merge "Add new quickstep test for many tasks open at once." into sc-v2-dev am: 3c647ff30a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15992810

Change-Id: I0ef6bd2b1f3b77a0d515610eb1f14a9fb88ae71b
2021-10-20 15:39:04 +00:00
Pat Manning
ccec1de6ae Add new quickstep test for many tasks open at once.
This test is needed for testing overview-grid-related functionality.
- Opening non-focused tasks
- Dismissing a non-focused task from the grid
- Grid rows rebalancing after dismissal, which only happens when enough
apps are open to be off-screen.
- Grid tasks do not scroll after dismissal.

Test: TaplTestsQuickstep.java
Bug: 197630182
Change-Id: Ic907db4643cdc2eb9e4610dab917347e234e470c
2021-10-20 14:40:32 +01:00
Alan Viverette
db37d96b83 Disable eager initialization of Jetpack libraries am: 58dd935348 am: 9713c150f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15689631

Change-Id: Ida3ccd06d7edb8a922cba3d54ada6c04483277fd
2021-09-09 22:18:26 +00:00
Alan Viverette
58dd935348 Disable eager initialization of Jetpack libraries
Bug: 197780098
Test: Launcher3 tests
Change-Id: I8f921ae26e873822ac2340ad78449cf1040af4cf
Merged-In: I8f921ae26e873822ac2340ad78449cf1040af4cf
(cherry picked from commit a88802ee92)
2021-08-26 12:38:09 -07:00
Sunny Goyal
4af8cf9269 Updating test build rules
> Moving definition to bp files
> Adding mokito-inline to allow mocking final classes
> Moving src_common to src to avoid unnecessary code split

Bug: 196825541
Test: Presubmit
Change-Id: Ib6879cda6aee74f5b9050a16eb6ca94ed3b7e28c
2021-08-18 10:22:52 -07:00
Alex Chau
a02eddc144 Handle config changes in Launcher
- This is practically a revert to http://ag/c/13687966/5 and refactored to use DisplayController.DisplayInfoChangeListener
- Make Launcher handle size and density change so transition is less janky when screen size changes
- Added fix in RecentsView to update state and TaskView when display profile changes
- Removed 720dp specific resoureces
- Removed unused widget_section_indent
- Removed unnecessary all_apps_background_canvas 600dp override that is not needed in AllApps+
- Moved remaining dp specific into DeviceProfile
- Simplified allowRotation logic to use single variable in DeviceProfile to determine if allow rotation is enabled by default

Fixes: 180803696
Test: manual
Change-Id: Iea0a7d1a0e14dc3613152dd3b3887450a2e1fc2f
2021-05-10 18:50:02 +01:00
Pierre Barbier de Reuille
ab33b76dce Launcher changes to support dynamic coloring on static widgets.
Bug: 179783721
Test: By hand using the AppWidgetDynamicColors widget
Change-Id: I27863cac31f2f6c29f5a717ff8d4492325f936fb
2021-03-10 22:04:35 +00:00
Alex Chau
8c575c378e Remove smallestScreenSize from configChanges
- Remove smallestScreenSize so Launcher activity restarts when screen size changes to pick up new smallestSize dependent values e.g. R.bool.allow_rotation

Bug: 180803696
Test: Ensure rotation preference is respected when switching between large and small screen

Change-Id: I58f856a97effa8e35236d013300181c5d332b25a
2021-03-01 12:20:26 +00:00
Winson Chung
ff6d94dd92 DO NOT MERGE Revert "Handle uiMode changes"
Bug: 171707437
Test: Repro steps on bug

This reverts commit 0ad7b172e6.

Change-Id: If30cbb6c155e879dc8307a0a4a06dfb548b389a1
(cherry picked from commit 4b4341d3a7)
2020-12-09 07:33:40 +00:00
Winson Chung
0c2b05947e Handle uiMode changes
- Launcher already dedupes if there are no theme changes

Bug: 148988542
Test: adb shell cmd uimode car yes/no, adb shell cmd uimode night yes/no
Change-Id: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
2020-07-21 17:20:53 +00:00
Ashwini Oruganti
aa902e859b Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for future versions. This change adds the value reflecting the
previous default to the manifest.

These changes were made using an automated tool, the xml file may be
reformatted slightly creating a larger diff. The only "real" change is
the addition of "android:exported" to activities, services, and
receivers that have one or more intent-filters.

Bug: 150232615
Bug: 158198882
Test: TH
Exempt-From-Owner-Approval: mechanical refactoring
Change-Id: I083a7bcab968c881f7cdff7152a249691ffac316
2020-06-23 13:58:18 -07:00
vadimt
aad54ab686 Using grantRuntimePermission()
"pm grant" is considered obsolete

Bug: 145686584
Change-Id: Ieeec76b2fdb666f89957a0a3039956bd69e9f315
2020-01-08 12:01:34 -08:00
Pinyao Ting
f2a3e79e76 Merge "correct naming and add comments for test case of custom shortcut." into ub-launcher3-qt-future-dev
am: 055c22e8e6

Change-Id: I64b7723a8ad9bbf9836b9b3c4d45add80b54107a
2019-10-03 11:04:37 -07:00
Pinyao Ting
d7fdcab612 correct naming and add comments for test case of custom shortcut.
Bug: 141934188
Change-Id: I69ce5f05214df10e2a376ff68c713efe8874df15
2019-10-03 10:15:30 -07:00
Pinyao Ting
d9bef1f3f0 include integration test for adding shortcut widget
am: d625e49552

Change-Id: Id0b8963f2c34355de97ddb4cbb1daf10d2f78e0c
2019-10-03 09:48:00 -07:00
Pinyao Ting
d625e49552 include integration test for adding shortcut widget
this integration test help us catching app crashes when adding shortcut
widgets to the workplace. see b/141568904 for more context.

Bug: 141934188
Change-Id: I4d33d6127793efe2071d0d146aef24db6b676360
2019-10-03 07:46:50 -07:00
Sunny Goyal
8f90d5da8a Adding test to check view inflation during swipe up
Bug: 137851409
Change-Id: Ic8e6f0b3c667051b921d1d4fad03c94122ee92e9
2019-09-20 15:36:02 -07:00
vadimt
9473421755 Adding system health permissions to Launcher3 tests
Change-Id: Id4ae4731274bef243801e3a15bc87e9c3fa9e0c4
2019-08-05 17:31:53 -07:00
Vadim Tryshev
a8700f69eb Adding 1 more icon to all apps for virtual devices
Change-Id: I1ebde81ab03b46c325e49196c89ed5866f5d838a
2019-05-22 19:30:35 -07:00
vadimt
f1e0c90a3b Not using Contacts app
Bug: 131628231
Change-Id: If877cc95879263330b7bbd344ddd3a526a5e6fac
2019-05-01 12:21:56 -07:00
vadimt
db4afbba92 Adding more activities for inproc tests
So that virtual devices can scroll all apps

Change-Id: I7aeca9e73e4089431624ab88fc9216a60c575039
2019-04-30 18:19:50 -07:00
vadimt
b96898a025 Not using Settings app as a source of shortcuts
Bug: 126587956
Change-Id: I13ef4298a8133ff5773eef8658a04094d5d154da
(cherry picked from commit 476a511ca5)
2019-04-12 19:22:09 +00:00
vadimt
fb0cb7a26c Not using Settings in TaplTestsLauncher3.testDragAppIcon
Settings frequently crashes

Bug: 126587956
Change-Id: Ied62d6f8783d8f0f9c434bdd8ee14c62d6cbc4c1
2019-04-04 18:45:49 -07:00
Winson Chung
b3fe661860 Add kill-process call to TestCommandReceiver
Bug: 117888000
Test: On Nexus side
Change-Id: I4803a884ffe8ae6147fdbaf98e2f813934418b76
2018-10-30 13:52:19 -07:00
Sunny Goyal
4ed58d6c03 Adding tests for fallback recents when a 3rd party launcher is installed
Change-Id: I1d4da13cc779f49832008b12b9628d01631faffe
2018-10-09 14:25:01 -07:00
Hyunyoung Song
484c643f7e Delete unnecessary line to trigger build
Change-Id: I905560cb3bb461ff44b76d782b370ea9b8bff320
2018-07-18 17:30:29 -07:00
Sunny Goyal
4213783716 Updating gradle configuration
Change-Id: I77c6ba057c751123bb40862a94a0027b7e0c87ef
2018-04-23 14:03:12 -07:00