diff options
author | Pinyao Ting <pinyaoting@google.com> | 2019-09-18 17:10:54 -0700 |
---|---|---|
committer | Pinyao Ting <pinyaoting@google.com> | 2019-09-23 13:06:36 -0700 |
commit | 7752023c08643554ef422447c8ed841476137f8f (patch) | |
tree | 21be79c2b490b8bb70499a967d27dd71dcaa9c6e /src/com | |
parent | af6daa2873a82e9222cad3589061e5c2b26702b5 (diff) | |
download | android_packages_apps_Trebuchet-7752023c08643554ef422447c8ed841476137f8f.tar.gz android_packages_apps_Trebuchet-7752023c08643554ef422447c8ed841476137f8f.tar.bz2 android_packages_apps_Trebuchet-7752023c08643554ef422447c8ed841476137f8f.zip |
fix test for a11y change in supporting -1 page
Bug: 140406263
Change-Id: I0a39db135a5e5b0fe570ace55a368a7f4b6cb453
Test: run TaplTestLauncher3 locally
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 7 | ||||
-rw-r--r-- | src/com/android/launcher3/testing/TestInformationHandler.java | 11 | ||||
-rw-r--r-- | src/com/android/launcher3/testing/TestProtocol.java | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 5c790f379..34b102c0b 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -1708,4 +1708,11 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou mTmpIntPair[1] = rightChild; return mTmpIntPair; } + + /** + * Returns true if overscroll is allowed, otherwise false. + */ + public boolean allowOverScroll() { + return mAllowOverScroll; + } } diff --git a/src/com/android/launcher3/testing/TestInformationHandler.java b/src/com/android/launcher3/testing/TestInformationHandler.java index 0d1d1a670..d62b591b8 100644 --- a/src/com/android/launcher3/testing/TestInformationHandler.java +++ b/src/com/android/launcher3/testing/TestInformationHandler.java @@ -15,9 +15,10 @@ */ package com.android.launcher3.testing; -import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static android.graphics.Bitmap.Config.ARGB_8888; +import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; + import android.content.Context; import android.graphics.Bitmap; import android.graphics.Color; @@ -81,6 +82,14 @@ public class TestInformationHandler implements ResourceBasedOverride { break; } + case TestProtocol.REQUEST_DOES_WORKSPACE_HAVE_SECOND_PAGE: { + if (mLauncher == null) return null; + + response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, + mLauncher.getWorkspace().getPageCount() > 1); + break; + } + case TestProtocol.REQUEST_IS_LAUNCHER_INITIALIZED: { response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, true); break; diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java index 19c557c9f..a68a140ef 100644 --- a/src/com/android/launcher3/testing/TestProtocol.java +++ b/src/com/android/launcher3/testing/TestProtocol.java @@ -66,6 +66,8 @@ public final class TestProtocol { "all-apps-to-overview-swipe-height"; public static final String REQUEST_HOME_TO_ALL_APPS_SWIPE_HEIGHT = "home-to-all-apps-swipe-height"; + public static final String REQUEST_DOES_WORKSPACE_HAVE_SECOND_PAGE = + "does-workspace-have-second-page"; public static final String REQUEST_HOTSEAT_TOP = "hotseat-top"; public static final String REQUEST_IS_LAUNCHER_INITIALIZED = "is-launcher-initialized"; public static final String REQUEST_FREEZE_APP_LIST = "freeze-app-list"; |