diff options
author | vadimt <vadimt@google.com> | 2019-10-03 13:34:28 -0700 |
---|---|---|
committer | Vadim Tryshev <vadimt@google.com> | 2019-10-03 20:58:15 +0000 |
commit | 1ac98548a73e6c82876433c5ab0f037c6da688cd (patch) | |
tree | ac22e242e3e63404641268402d5f19ccdcfedd9c | |
parent | 055c22e8e658dcb87447a9c11ec492c2b8e922e5 (diff) | |
parent | 08776ada1e37c4b424893306c058b1de9f85903f (diff) | |
download | packages_apps_Trebuchet-1ac98548a73e6c82876433c5ab0f037c6da688cd.tar.gz packages_apps_Trebuchet-1ac98548a73e6c82876433c5ab0f037c6da688cd.tar.bz2 packages_apps_Trebuchet-1ac98548a73e6c82876433c5ab0f037c6da688cd.zip |
resolve merge conflicts of 08776ada1e37c4b424893306c058b1de9f85903f to ub-launcher3-qt-future-dev
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I9a3b0f67ee874b5ec4ad67f41a46ec7876d19082
Merged-in: I9a3b0f67ee874b5ec4ad67f41a46ec7876d19082
4 files changed, 13 insertions, 11 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java index 72a14b58e..2161591bf 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java @@ -37,12 +37,6 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { return response; } - case TestProtocol.REQUEST_IS_LAUNCHER_INITIALIZED: { - response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, - TouchInteractionService.isInitialized()); - return response; - } - case TestProtocol.REQUEST_HOTSEAT_TOP: { if (mLauncher == null) return null; @@ -81,4 +75,9 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { return super.call(method); } + + @Override + protected boolean isLauncherInitialized() { + return super.isLauncherInitialized() && TouchInteractionService.isInitialized(); + } } diff --git a/src/com/android/launcher3/testing/TestInformationHandler.java b/src/com/android/launcher3/testing/TestInformationHandler.java index d3ec83b4f..cc2d586e2 100644 --- a/src/com/android/launcher3/testing/TestInformationHandler.java +++ b/src/com/android/launcher3/testing/TestInformationHandler.java @@ -29,6 +29,7 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAppState; +import com.android.launcher3.LauncherModel; import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.allapps.AllAppsStore; @@ -83,7 +84,7 @@ public class TestInformationHandler implements ResourceBasedOverride { } case TestProtocol.REQUEST_IS_LAUNCHER_INITIALIZED: { - response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, true); + response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, isLauncherInitialized()); break; } @@ -153,4 +154,10 @@ public class TestInformationHandler implements ResourceBasedOverride { } return response; } + + protected boolean isLauncherInitialized() { + final LauncherModel model = LauncherAppState.getInstance(mContext).getModel(); + return model.getCallback() == null || model.isModelLoaded(); + } } + diff --git a/tests/src/com/android/launcher3/ui/DefaultLayoutProviderTest.java b/tests/src/com/android/launcher3/ui/DefaultLayoutProviderTest.java index a76b4a488..ff21880d0 100644 --- a/tests/src/com/android/launcher3/ui/DefaultLayoutProviderTest.java +++ b/tests/src/com/android/launcher3/ui/DefaultLayoutProviderTest.java @@ -73,7 +73,6 @@ public class DefaultLayoutProviderTest extends AbstractLauncherUiTest { // Launch the home activity mDevice.pressHome(); - waitForModelLoaded(); mLauncher.getWorkspace().getHotseatAppIcon(getSettingsApp().getLabel().toString()); } @@ -89,7 +88,6 @@ public class DefaultLayoutProviderTest extends AbstractLauncherUiTest { // Launch the home activity mDevice.pressHome(); - waitForModelLoaded(); // Verify widget present assertTrue("Widget is not present", @@ -106,7 +104,6 @@ public class DefaultLayoutProviderTest extends AbstractLauncherUiTest { // Launch the home activity mDevice.pressHome(); - waitForModelLoaded(); mLauncher.getWorkspace().getHotseatFolder("Folder: Copy"); } diff --git a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java index e6348d9c0..f42bf1f3c 100644 --- a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java +++ b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java @@ -271,7 +271,6 @@ public class BindWidgetTest extends AbstractLauncherUiTest { // Launch the home activity mDevice.pressHome(); - waitForModelLoaded(); } private void verifyWidgetPresent(LauncherAppWidgetProviderInfo info) { |