summaryrefslogtreecommitdiff
path: root/tests/testables/src
diff options
context:
space:
mode:
authorSiarhei Vishniakou <svv@google.com>2017-06-02 17:20:34 -0700
committerSiarhei Vishniakou <svv@google.com>2017-06-19 14:06:21 -0700
commit6ad0e39f338d47e75bd1b964259ba21c00043f45 (patch)
tree136f9ec688f81f9262b9604d290c0c968c98d4fc /tests/testables/src
parent8a95d49d8f149e190f2e170c968cbdef6a7db687 (diff)
Revive DeadZone
Override dispatchTouchEvent for the root FrameLayout of NavigationBar to process ACTION_OUTSIDE MotionEvents and dispatch directly to DeadZone to keep track of the most recent outside tap. Clarified documentation of ACTION_OUTSIDE behaviour. Bug: 37552674 Test: open IME, tap any key, then quickly tap on top half of the home button. The home button tap is ignored and device does not go to homescreen. Change-Id: Icb5cf6c76959f3514b8b94c09e38cc5434f31b23
Diffstat (limited to 'tests/testables/src')
-rw-r--r--tests/testables/src/android/testing/BaseFragmentTest.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/testables/src/android/testing/BaseFragmentTest.java b/tests/testables/src/android/testing/BaseFragmentTest.java
index 32ee091a46c9..f1e4d21c1a35 100644
--- a/tests/testables/src/android/testing/BaseFragmentTest.java
+++ b/tests/testables/src/android/testing/BaseFragmentTest.java
@@ -50,7 +50,7 @@ public abstract class BaseFragmentTest {
private static final int VIEW_ID = 42;
private final Class<? extends Fragment> mCls;
private Handler mHandler;
- private FrameLayout mView;
+ protected FrameLayout mView;
protected FragmentController mFragments;
protected Fragment mFragment;
@@ -61,9 +61,13 @@ public abstract class BaseFragmentTest {
mCls = cls;
}
+ protected void createRootView() {
+ mView = new FrameLayout(mContext);
+ }
+
@Before
public void setupFragment() throws Exception {
- mView = new FrameLayout(mContext);
+ createRootView();
mView.setId(VIEW_ID);
assertNotNull("BaseFragmentTest must be tagged with @RunWithLooper",