Commit Graph

1317 Commits

Author SHA1 Message Date
Vadim Tryshev f4cacd720c Merge "Fixing Launcher3 tests" into sc-dev 2021-03-15 17:47:05 +00:00
Alina Zaidi e17f4651d0 Merge changes from topic "SEARCH_INTEGRATE" into sc-dev
* changes:
  Add a WidgetsSearchBar(Launcher3) and a WidgetsSearchController.
  Have a recycler view to show search results.
2021-03-15 13:24:20 +00:00
Alina Zaidi d07acba048 Add a WidgetsSearchBar(Launcher3) and a WidgetsSearchController.
- Make WidgetsSearchBar in Launcher3 initialize WidgetsSearchController with SimpleWidgetsSearchPipeline
- Modify SimpleWidgetsSearchPipeline to filter widgets entries on widgets/shortcut labels also.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: I65f5fa0240ffb6d22023167e4e86d94d83bbd9f7
2021-03-15 11:25:08 +00:00
vadimt 730b9d60a4 Fixing Launcher3 tests
Adding an atest config.
Correctly calculating display height.
Allowing scrolling from a partially visible bottom row in AllApps

Test: presubmit
Bug: 182006150
Change-Id: I5f3b976ac05ed1c2e1ffbb67cc6db0c0ee13ae6c
2021-03-12 15:11:34 -08:00
Vadim Tryshev 976bd24f57 Merge "Increase wait times in TAPL" into sc-dev 2021-03-12 22:53:22 +00: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
vadimt 368dc79f55 Increase wait times in TAPL
This helps to avoid misleading errors when
the system has performance problems.

Test: presubmit
Bug: 179392551
Change-Id: I4de3c543f32f41af64bd6107885df82b03973d35
2021-03-10 12:19:12 -08:00
Samuel Fufa d0bb42bf2e Pause onAppsUpdate when AllApps is converted to tabs.
To avoid onAppsUpdated conflicting with WorkTabEdu, this change pauses callback updates when AllApps is first converted to tabs. This should  avoid the need for additional  extended timeouts.

Bug: 159671700
Test: Presubmit
Change-Id: I0959629f47ae6d824e5886b2cf917635f5bfdf0e
2021-03-09 02:48:08 +00:00
Samuel Fufa 3531778a08 Defer AllAppsUpdate while edu test is running
Bug: 159671700
Test: Presubmit
Change-Id: I6f1421117286225d80a1538e45fbf2592229b586
2021-03-04 14:11:38 -06:00
TreeHugger Robot 161b27d5c5 Merge "Better diagnosing leaked activities." into sc-dev 2021-03-03 08:26:34 +00:00
Yogisha Dixit a6554759aa Merge "Move widget files into widget folder + add tests." into sc-dev 2021-03-02 09:30:02 +00:00
Alex Chau dee1167409 Merge "Remove smallestScreenSize from configChanges" into sc-dev 2021-03-01 21:01:19 +00:00
TreeHugger Robot f6987b0be1 Merge "Add tracing to track every allApps rebind" into sc-dev 2021-03-01 17:40:12 +00:00
Yogisha Dixit 741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +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
TreeHugger Robot d3b82a2471 Merge "Log a bit more data in switchToAllApps()" into sc-dev 2021-02-27 03:15:24 +00:00
Tony Wickham 4faa87c478 Log a bit more data in switchToAllApps()
Test: TaplTestsQuickstep.testWorkspaceSwitchToAllApps
Bug: 181122114
Change-Id: Ice5515f5b3ac87c42af42d946036505879deb235
2021-02-26 16:25:35 -08:00
vadimt ab469ac515 Better diagnosing leaked activities.
Test: manual
Bug: 181356264
Change-Id: I9bf843a1d26bc4cf255c1b8d2cce0febeaa4c4fe
2021-02-26 14:45:10 -08:00
Samuel Fufa a18abf55b4 Add tracing to track every allApps rebind
Bug: 159671700
Test: presubmit
Change-Id: I1c7507ac2175d6e2f4514e4ad51c356aa75dd6e9
2021-02-26 16:40:27 -06:00
Vadim Tryshev e1ea6cf754 Merge "Waiting for the state of views to settle after orientation change" into sc-dev 2021-02-26 19:37:06 +00:00
TreeHugger Robot 47603e4e69 Merge "Diagnosing expected selector in app-start" into sc-dev 2021-02-26 19:28:44 +00:00
vadimt 6e2a8e86df Diagnosing expected selector in app-start
Test: manual
Bug: 179392551
Change-Id: I4c7173e784caaa6435927f94eef6b269884d0ce9
2021-02-25 19:32:41 -08:00
vadimt 5f21f104f0 Waiting for the state of views to settle after orientation change
Presumably, we currently have flakes when immediately
after orientation change, we check for the presence of certain
views, and they are still not present.

Test: presubmit
Bug: 181057446
Change-Id: I6dbcb757a47c19728d4096283da6710f6dd5aa02
2021-02-25 18:50:49 -08:00
Bob Badour 8182d214e1 Merge "[LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Launcher3" am: 541d0855ac am: 3be35ec269 am: 8824a5cd61
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/1587746

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia1a355fb2ed5bebd8cfff2f5da2eef14428bfe15
2021-02-24 23:53:29 +00:00
Bob Badour 8824a5cd61 Merge "[LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Launcher3" am: 541d0855ac am: 3be35ec269
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/1587746

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I21ee4a4ccd42b0bdbc3e20121b5d53c9067e8cf2
2021-02-24 22:58:35 +00:00
Bob Badour 3be35ec269 Merge "[LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Launcher3" am: 541d0855ac
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/1587746

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc96bfa8a3d59a19194a154baeaffaea1281af0a
2021-02-24 22:25:46 +00:00
Steven Ng e8d92342fa Replace horizontal ScrollViews with tables in the full widgets picker
Test: Run gnl test, AddWidgetTest
      Run Robolectric tests for widgets
      Manual test video: https://drive.google.com/file/d/1uwCtVNIlC9150kv5eEfILfP5r5M7ARYm/view?usp=sharing

Bug: 179797520
Change-Id: I2f4cdf84338a91b63967879d0c9268c312ace19b
2021-02-24 19:49:15 +00:00
Steven Ng 391404fcb7 Add personal / work tabs for work profile widgets
Video: https://drive.google.com/file/d/1TORRNcvVM7fIvNd_WZaajLbI7D9z4VFA/view?usp=sharing


Test: Main profile only: run AddConfigWidgetTest.
      With work profile: manually launch the full widgets sheet.
      Go to the personal tab: only personal widgets are shown.
      Go to the work tab: only work widgets are shown
      Successfully add personal / work widgets from the full widgets
      sheet.

Bug: 179797520

Change-Id: Iad8b90c2af35e0580319d7a05510ec88e4f8b86c
2021-02-22 16:10:09 +00:00
Bob Badour 4bdf380625 [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Launcher3
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  Android.mk
  robolectric_tests/Android.mk
  tests/Android.mk

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ia348bba8ca075e87070ff8a605ca79ffcbea9982
Merged-in: Ia348bba8ca075e87070ff8a605ca79ffcbea9982
2021-02-21 20:34:37 -08:00
Vinit Nayak a34af18b0e Update System settings content observer to cache values.
Existing ContentObserver will cache values and overwrite
them when the value itself is modified or caller force
updates.

Bug: 149571513
Test: Wrote unit tests, mostly for caching logic.
Not meant to test ContentObserver contract for registering an
observer.

Change-Id: I12835f6c2be27ce17f65a55c51c4ef85c63b4487
2021-02-16 20:58:53 -08:00
Steven Ng e92bc55d12 Make all widgets collapsed in the full widget picker by default
Changes:
1. Add a WidgetListHeader view for showing icon, app name and a subtitle.
2. Only WidgetListHeaders are always visible to users in the full widget
   picker.
3. Only one widgets list from an app is visible in the full widget picker
   at any one time.

Test: Auto: run add robolectric tests under widget/picker
      Manual: Open full widgets picker. Then, expand and collapse apps.
      Video: https://drive.google.com/file/d/1gzfeEm5IOAu0qHsO77OTS2eMfU7CHJiL/view?usp=sharing

Bug: 179797520
Change-Id: Idac58be23dfeafcb79b3c61b4972d3addb462de1
2021-02-15 17:46:38 +00:00
Steven Ng 2f5648a911 Refactoring before adding a new view type in the WidgetsListAdapter
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
2021-02-10 21:23:40 +00:00
linalex 0646238ab4 [DO NOT MERGE ANYWHERE] Add swipes left method in Background.java
Bug: 153276032
Test: TF_GLOBAL_CONFIG=/google/src/cloud/<ldap>/<workspace>/google3/wireless/android/test_tools/forrest/configs/local-host-config.xml \
pts-tradefed run commandAndExit cuj/<testname> \
--primary-abi-only \
--log-level verbose --log-level-display verbose \
--wifi-network GoogleGuest

Change-Id: Ib1cbc609f47a547f173e8170f00af9e8bdfa77bb
(cherry picked from commit 8492c67639)
2021-01-26 04:58:49 +00:00
TreeHugger Robot f56efc0187 Merge "Adding debug tracing for Device.wait" 2021-01-20 18:58:21 +00:00
Vadim Tryshev 9e86e3b89d Merge "Removing automatic failure investigator" 2021-01-20 18:46:42 +00:00
vadimt 952471f675 Removing automatic failure investigator
It wasn't updated for a while,
creates a false impression that the failure
is already tracked, and hopefully soon
will be replaced by new clustering.

Test: presubmit
Bug: 161478674
Change-Id: Icc3716c1f534867d5e4b21d18c9cede273da8704
2021-01-19 15:14:03 -08:00
vadimt ed86cb19bc Adding debug tracing for Device.wait
I suspect it may wait for a period of time less than
the specified one, causing flakes.

Test: presubmit
Bug: 177318681
Change-Id: I0be8790c6ee9a5831767fe83c36054ed5a84f8d7
2021-01-15 13:58:03 -08:00
vadimt f48097f270 Correctly generating heap dumps for OOP tests
Not trying to dump the test process :)

Still using Debug.dumpHprofData for inproc because
using shell command for inproc can deadlock.

Test: manual
Bug: 177065099
Change-Id: I4b581954a01ecc8a1427409baa030aaa3b70d6b5
2021-01-14 19:43:28 -08:00
TreeHugger Robot 23f0dc318c Merge "Generating Hdumps for more leaks" 2021-01-14 07:01:55 +00:00
vadimt c37058976d Generating Hdumps for more leaks
Test: presubmits
Bug: 177065099
Change-Id: I386229cf92a925d2953952ed0fab6c44dcdc61f0
2021-01-13 11:34:16 -08:00
Samuel Fufa a5f289a605 Increase timeout and additional logs for WorkTabTest#testWorkEduFlow
Bug: 159671700
Test: WorkTabTest#testWorkEduFlow
Change-Id: I5c015fbb9555be0e3e74c721873da4edd0393c8a
2021-01-13 10:26:00 -06:00
TreeHugger Robot b3f2862a30 Merge "Removing workaround for battery defender" 2021-01-08 19:45:32 +00:00
vadimt f4bb052ca0 Removing workaround for battery defender
The bug is supposed to be fixed.

Bug: 151613234
Change-Id: I8e803ead29e08e68fa75f61b5ad0e1198c9228ec
(cherry picked from commit ff39fd3e14)
2021-01-05 19:17:33 +00:00
Sunny Goyal 9b1e77377b Removing shelf from 2-button gesture mode
Test: Manual
Bug: 175137718
Change-Id: Ifb64b4dcac53252aefa8ee0bd6434f90f1d868b7
2021-01-05 19:07:21 +00:00
vadimt 0d9cb19453 Checking menu item test to improve test fail diags
Test: atest
Bug: 75641613
Change-Id: Idb5c7fe744e4a3e69ee0fdb59d1a5a58bc6ce0b2
2020-12-14 19:57:59 -08:00
Ice Chang feb22118bf Merge "Add swipes left method in Background.java" 2020-12-12 16:33:16 +00:00
Samuel Fufa 06ade42dd7 Merge "Resolve Flaky work tab tests" 2020-12-10 23:49:34 +00:00
Samuel Fufa b8df6a573a Resolve Flaky work tab tests
In cases where test execution and launcher relayout overlap, mLauncher.getAppsView().getContentView() returns a recyclerview instead of pagedView. This is resolved when rebindAdapters is later called with showTabs=true. The issue here is we are keeping a stale value of mLauncher.getAppsView().getContentView() in WorkEduView which is problematic as pagedView is required to set the right tab index for the test.

This behavior also affects work testWorkEduIntermittent as we need to verify the a pagedView is visible before text execution.
Bug: 149867607
Bug: 159671700
Test: flake -t com.android.launcher3.ui.WorkTabTest

Change-Id: I4b0968d6b9daa5c8fe741d4b1ed090f9c7acabed
2020-12-10 11:02:13 -06: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
icechang 212cff1dec Add swipes left method in Background.java
Bug: 153276032
Test: TF_GLOBAL_CONFIG=/google/src/cloud/<ldap>/<workspace>/google3/wireless/android/test_tools/forrest/configs/local-host-config.xml \
pts-tradefed run commandAndExit cuj/<testname> \
--primary-abi-only \
--log-level verbose --log-level-display verbose \
--wifi-network GoogleGuest

Test:

Change-Id: Ib1cbc609f47a547f173e8170f00af9e8bdfa77bb
2020-12-01 21:34:26 +08:00