Commit Graph

170 Commits

Author SHA1 Message Date
Vadim Tryshev dc755e718d Started converting Launcher to be gesture-stable
All tests keep passing.

WorkTabTest.workTabExists was made gesture-stable. There is no need to
use TAPL, as the point is not to check answering to gestures, but to
check presence of tabs, which is better to do using launcher internal
state. (It still fails if run as a part of all tests, presumably,
because after Launcher's start, changes in user configuration are not
recognized, so I've commented the failing part)

Bug: 110103162
Test: Run all tests
Change-Id: Ic30b8e8475d16cee3880332f12311a44ddfa26cb
2018-08-14 10:29:57 -07:00
Vadim Tryshev 3b5793fdf5 Support for running Overview tests with quickstep on and off
Bug: 110103162
Test: TaplTests suite
Change-Id: Ic479156f2973aeec5cc3d288e1c891b8086d9daa
2018-08-10 17:35:43 -07:00
TreeHugger Robot 8f7137b769 Merge "Removing magic constant 0.1f from Overview" into ub-launcher3-master 2018-08-10 22:03:12 +00:00
Vadim Tryshev 309053fff9 Using SWIPE_UP_SETTING_NAME in TAPL
Bug: 110103162
Test: TaplTests suite
Change-Id: Ia62207773a156aca1e226307ccc462c252cc9227
2018-08-10 14:30:59 -07:00
Vadim Tryshev 846718a79a Removing magic constant 0.1f from Overview
Bug: 110103162
Test: TaplTests suite
Change-Id: If3af510360158a2c2b1c3d13c75321c49ece67e2
2018-08-09 14:21:46 -07:00
Vadim Tryshev b02bcd4c76 Removing code duplication for getting swipe-up setting
This is between Tapl and Launcher

Bug: 110103162
Test: TaplTests suite
Change-Id: I5b458438834204ca257f45c707577b4d2793fb4e
2018-08-07 18:01:12 -07:00
Vadim Tryshev 7d0cf2a748 Increasing wait time.
Extremely rarely starting an app takes more than 10 sec.

Bug: 110103162
Test: TaplTests suite
Change-Id: Ic6127e373b76c610eea5126e53e6048ba0f9bd3e
2018-08-06 11:11:25 -07:00
TreeHugger Robot 589f53cf89 Merge "Enabling more checks in TAPL tests." into ub-launcher3-master 2018-08-03 21:07:20 +00:00
Vadim Tryshev 7acde48955 Enabling more checks in TAPL tests.
Hiding workspace from tests when in AllApps or Overview.

Also, we don’t need workspace_page_container.

Bug: 110103162
Test: Running TaplTests suite
Change-Id: I10875a1ce5d41a015c63034160676578f52d2e98
2018-08-03 10:29:36 -07:00
TreeHugger Robot 7f63682742 Merge "Adding AOSP into the tapl library name." into ub-launcher3-master 2018-08-03 02:10:06 +00:00
TreeHugger Robot e98aab058e Merge "Fixing scrolling up in App Apps." into ub-launcher3-master 2018-08-02 22:58:25 +00:00
TreeHugger Robot ce15b325e8 Merge "Retiring some feature flags" into ub-launcher3-master 2018-08-02 21:48:54 +00:00
Vadim Tryshev ff3fa34a7a Fixing scrolling up in App Apps.
Done by scrolling only when scroll position is not zero. This way, the
scroll gesture can't close All Apps.

Bug: 110103162
Test: TaplTests suite
Change-Id: Icfe47d2bcc0210ae221df169d6c35cd1be10ff86
2018-08-02 14:15:05 -07:00
Vadim Tryshev 44780bad8f Adding AOSP into the tapl library name.
The idea is to prevent accidentally
adding non-AOSP code to it, which would make it wrong to
drop it to AOSP parts of the platform.

Bug: 110103162
Test: Building TaplTests suite
Change-Id: Ide68f469d59fefb72b5195c7916bd1515a9bbed2
2018-08-01 13:08:19 -07:00
Vadim Tryshev a279b2ea3e Adding a build rule for Tapl static library
Bug: 110103162
Test: TaplTests suite
Change-Id: Ibff017b68b1a31728d3a8d0c1ede2da6ebfecbb1
2018-07-24 17:16:25 -07:00
TreeHugger Robot 1143469a79 Merge "Tapl library" into ub-launcher3-master 2018-07-24 19:39:54 +00:00
Vadim Tryshev 2ce6a13f60 Tapl library
The public API of the library has finalized; flakiness has been removed;
code polished.

Bug: 110103162
Test: TaplTests suite
Change-Id: Ic156bbfeedb1cb9c4a48ef907f97e396e8e81936
2018-07-20 14:43:05 -07:00
Hyunyoung Song 484c643f7e Delete unnecessary line to trigger build
Change-Id: I905560cb3bb461ff44b76d782b370ea9b8bff320
2018-07-18 17:30:29 -07:00
Sunny Goyal 36b54228fc Retiring some feature flags
Change-Id: I80a00ecaec0785ce2ba6a5f14a54c8a76f555d43
2018-07-10 13:52:17 -07:00
Android Build Merger (Role) 0095d14ec0 [automerger] Add @Test and @Ignore to untested test methods in RequestPinItemTest. am: ca02f00eb1
Change-Id: I396c673bf256e1003f109201ebac9bb87b864622
2018-06-22 00:21:45 +00:00
Jon Miranda ca02f00eb1 Add @Test and @Ignore to untested test methods in RequestPinItemTest.
Error prone complains when trying to merge launcher3 code to platform pi-dev.

"This looks like a test method but is not run; please add @Test and @Ignore,
or, if this is a helper method, reduce its visibility."

Output:

Executing tasks: [:assembleGoogleDebug, :assembleGoogleDebugAndroidTest]
Gradle build finished in 1s 631ms
Tests Ignored: 1 passed, 4 ignored

Bug: 78589564
Change-Id: Icde57fd8307e1ef409822d1417f629cd1aaa57ba
2018-06-21 17:20:23 -07:00
Android Build Merger (Role) 4a724052af [automerger] Add @Test and @Ignore to untested test methods. am: 1aaaac8343
Change-Id: Ife9d31c9cf55e17275f8dfa0b70662a94948d395
2018-06-21 21:05:04 +00:00
Jon Miranda 1aaaac8343 Add @Test and @Ignore to untested test methods.
Error prone complains when trying to merge launcher3 code to platform pi-dev.

"This looks like a test method but is not run; please add @Test and @Ignore,
or, if this is a helper method, reduce its visibility."

Change-Id: I95f55b95d8f7752c9c941f0828ca22d6427528c6
2018-06-21 14:04:52 -07:00
TreeHugger Robot bc57c64d6a Merge "Comment out part of WorkTabTest as it is not succeeding in the build server. Bug: 78589564" into ub-launcher3-edmonton-polish 2018-06-20 18:46:30 +00:00
Android Build Merger (Role) 73c0010a91 [automerger] Comment out part of WorkTabTest as it is not succeeding in the build server. Bug: 78589564 am: 70e36604a4
Change-Id: I2acebdf20bef9f5c94e53129cb34590d174af80a
2018-06-20 18:25:53 +00:00
Hyunyoung Song 70e36604a4 Comment out part of WorkTabTest as it is not succeeding in the build server.
Bug: 78589564

Change-Id: I7a979d9a62e222b8b2217844883d4a41c42f8209
2018-06-20 11:25:39 -07:00
TreeHugger Robot 9a36abc179 Merge "Increase timeout for WorkTabTest Bug: 78589564" into ub-launcher3-edmonton-polish 2018-06-19 23:20:33 +00:00
Android Build Merger (Role) 7b26b7e435 [automerger] Increase timeout for WorkTabTest Bug: 78589564 am: e8d5bcfb92
Change-Id: Ib0e8029c56b6822d19f1803544b1259d3ecac9c1
2018-06-19 22:57:29 +00:00
Hyunyoung Song e8d5bcfb92 Increase timeout for WorkTabTest
Bug: 78589564

Change-Id: Ie52843d08488d4c7444dd3c0231054cfecc00922
2018-06-19 15:57:02 -07:00
TreeHugger Robot 3c83d4ed72 Merge "Fix the Launcher3Tests Bug: 78589564" into ub-launcher3-edmonton-polish 2018-06-19 21:23:48 +00:00
Android Build Merger (Role) 1b570700cc [automerger] Fix the Launcher3Tests Bug: 78589564 am: 3efd037e63
Change-Id: I3d59b092d92ad7fe1d8a27b567b7eba9b614d95b
2018-06-19 21:13:29 +00:00
Hyunyoung Song 3efd037e63 Fix the Launcher3Tests
Bug: 78589564

$ adb shell am instrument -w com.android.launcher3.tests/android.support.test.runner.AndroidJUnitRunner

com.android.launcher3.allapps.search.DefaultAppSearchAlgorithmTest:..
com.android.launcher3.logging.FileLogTest:..
com.android.launcher3.model.AddWorkspaceItemsTaskTest:....
com.android.launcher3.model.CacheDataUpdatedTaskTest:...
com.android.launcher3.model.DbDowngradeHelperTest:....
com.android.launcher3.model.GridSizeMigrationTaskTest:...........
com.android.launcher3.model.LoaderCursorTest:........
com.android.launcher3.model.PackageInstallStateChangedTaskTest:...
com.android.launcher3.popup.PopupPopulatorTest:..
com.android.launcher3.provider.RestoreDbTaskTest:..
com.android.launcher3.touch.SwipeDetectorTest:.....
com.android.launcher3.ui.AllAppsAppLaunchTest:..
com.android.launcher3.ui.AllAppsIconToHomeTest:..
com.android.launcher3.ui.ShortcutsLaunchTest:..
com.android.launcher3.ui.ShortcutsToHomeTest:..
com.android.launcher3.ui.WorkTabTest:.
com.android.launcher3.ui.widget.AddConfigWidgetTest:....
com.android.launcher3.ui.widget.AddWidgetTest:..
com.android.launcher3.ui.widget.BindWidgetTest:......
com.android.launcher3.ui.widget.RequestPinItemTest:.
com.android.launcher3.util.GridOccupancyTest:..
com.android.launcher3.widget.WidgetsListAdapterTest:......

Time: 180.363
OK (76 test)

Change-Id: I4a50581bc8d06a030467ac9fec3e1ef668745214
2018-06-19 14:13:13 -07:00
TreeHugger Robot 2bc269265b Merge "Fix duplicate <uses-sdk> elements in Launcher3Tests" into ub-launcher3-master 2018-06-19 17:11:47 +00:00
Vadim Tryshev 5a7d701d55 UNREVIEWED: TAPL prototype for in-lab flake test
These sources didn't pass a normal CR, and mustn't be used in prod. The
goal of landing them is to start in-lab flakiness tests ASAP. A normal
code review will follow after landing cleanup CLs.

Bug: 110103162
Test: Running TaplTests suite
Change-Id: I051591c9af7822d4cbae4261e66563f1ccc1cfcc
2018-06-18 14:29:34 -07:00
Colin Cross 5d4eb1d5ab Fix duplicate <uses-sdk> elements in Launcher3Tests
PackageManager is probably ignoring the first one.

Bug: 78447299
Test: m Launcher3Tests
Change-Id: I359beac6819ec3f0d856e8e3c909765ea521e487
Merged-In: I359beac6819ec3f0d856e8e3c909765ea521e487
(cherry picked from commit d219bc1923)
2018-06-18 13:49:04 -07:00
Hyunyoung Song c22dec25f7 Change target SDK for Launcher3Tests.apk to run on Sailfish device (API28)
Bug: 78589564

https://sponge.corp.google.com/target?tab=Details&run=1&sortBy=STATUS&show=ALL&id=453a6b41-ff25-4a20-927a-561abad0e730&target=launcher3_unittests_invocation&searchFor=

Change-Id: I7e97545329e684304c074c66bca409467e17b90b
2018-06-14 14:38:14 -07:00
Sunny Goyal 4213783716 Updating gradle configuration
Change-Id: I77c6ba057c751123bb40862a94a0027b7e0c87ef
2018-04-23 14:03:12 -07:00
Tony Mak 87827b5d90 Add sanity test for work tab
Create work profile and assert the tab is there.
Also, fixed openAllApps in the test.

FIX: 74390632

Change-Id: I526b4da0609643057a3d2306fa0034d57167840e
2018-03-08 18:26:35 +00:00
Sunny Goyal 605bcf3367 Fixing bug when model was not reflected properly on the UI.
If launcher submits a job, and then reloads before the job is executed, the correct model
is not reflected on the Launcher. In that case, we simply rebind the launcher

Change-Id: I380242a4de13e7b2bc326d1a076f0a974435999c
2018-03-05 17:38:47 -08:00
Sunny Goyal 623eddd7e8 Updating Launcher rotation logic
When auto-rotate is on, launcher allways allows rotation. This allows uses to use
locked rotation feature is available on the device
When auto-rotate is off, workspace does not allow rotation, but overview in quickstep
will allow rotation

Bug: 73872056
Change-Id: Ie12365c268fd5e4958634ed97b5a33dcadc691e2
2018-03-03 00:41:09 -08:00
Sunny Goyal b29a5fa55c Adding support for hiding widgets from the widget tray and reconfiguring widgets
> Removing AppInfo target
> Switching between uninstall and setup based on the drag view

Bug: 63931362
Change-Id: Iccd6f965fa3d61992244a365efc242122292c0ca
2018-03-02 13:20:09 -08:00
Tony Mak 1b6826c53c Deprecate work folder
FIX: 73876183

Change-Id: I9d15df247eed3500c679cba085c680b75581cffb
2018-02-27 17:47:22 +00:00
Sunny Goyal 179249d804 Dominant color is part of icon cache
> Calculating extracted color during icon generation and storing it in model and DB
> Removing unused logic avoid various types of badge rendering
> Icons are badged with extracted colors, while folder is badged with theme color

Bug: 35428783
Change-Id: I93e30c52fbded7515c3ae1778422e84672eafb56
2018-01-03 16:55:58 -08:00
Sunny Goyal 29947f0b53 No more waiting around for resume
Apply model updates as son as they arrive instead of waiting for onResume.
Various workspace items do not use any configuration dependent resources.
For Widgets, we wait until the host starts lietening before inflating the actual view.

Change-Id: Icb2f5e5940c1ce6c27062ccd34eff87e80af5ab1
2017-12-19 12:50:17 -08:00
Sunny Goyal 8b0a647a11 Removing dependency on deprecated android.test.** package
Change-Id: Ib1065e26fff3c193d12531c8bca944693ea6137c
2017-11-06 21:10:09 -08:00
Sunny Goyal f1fbc3fbe7 Converting widget panel into a floating view
> The widget panel is only inflated when needed
> Using the swipe up/down interaction for widgets tray
> Removing additional view wrappers from all-apps
> Widget tray is preserved across activity recreation
> Launcher no longer has WIDGET state, the actual code around
  the states will be removed in a follow-up cl

Bug: 67678570
Bug: 67585158
Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
2017-10-13 18:47:54 -07:00
Sunny Goyal 91498abf75 Moving install queue updates to worker thread.
This avoids acquiring a lock for upating the sharedPrefs during onResume
as all the logic runs on a single thread.

Bug: 67305604
Change-Id: I1bbea382da9fafb403b4e9508f393f78db28478d
2017-10-06 11:33:43 -07:00
Sunny Goyal 952e63d006 Fixing custom widgets support:
> Moving the definitions to xml so that it is easier to override in derivative projects
> Fixing verious bind and save logic for custom widgets
> Adding feature flag to easily disable custom widgets

Change-Id: I0e278bc7dd415713029364060ef10842da990be9
2017-09-13 14:04:35 -07:00
Hyunyoung Song e24cb63b81 WallpaperManagerCompat should target correct platform
Also replace Utilities.isAtLeastO() to static final constant.
Bug: 65544683

Change-Id: I39fbea66939d72c31702748716c4e65b4f9bee6a
2017-09-11 12:17:09 -07:00
Hyunyoung Song 8e5464b544 Remove flicker when multiple apps are added/removed/updated on widget tray
Bug: 36718342

1.The flicker was also happening partially because notifyWidgetProviderChanged
callback also made the entire widget list to update in addition to
packageManager update.

2. Now that adapter calls notifyItemInserted, Removed, the recycler
view uses it's internal animation to elegantly move items or insert
them. (added benefit!)

3. Added tests for WidgetsListAdapterTest

$ adb shell am instrument -w -e class com.android.launcher3.widget.WidgetsListAdapterTest com.google.android.apps.nexuslauncher.tests/android.support.test.runner.AndroidJUnitRunner

com.android.launcher3.widget.WidgetsListAdapterTest:.

Time: 0.337

OK (6 test)

Change-Id: I0818d546532631bf889fae560118decff64ec5a4
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2017-08-23 18:04:37 -07:00