summaryrefslogtreecommitdiff
path: root/tests/WindowInsetsTests
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2020-01-17 00:55:23 +0100
committerJorim Jaggi <jjaggi@google.com>2020-01-21 17:03:04 +0100
commit6d13bf4a545c6b4edde044918e9f77067d606219 (patch)
tree8a749135f03e96c24fcaef4b708a6055503729ae /tests/WindowInsetsTests
parent0865f08f5a0b065648c786243a4f36393409f9cf (diff)
Fix up new insets dispatch behavior
- Fix up target SDK check - Keep WindowInsets.CONSUMED concept to stop dispatch for performance optimization. If the insets are handled at some point in the hierarchy, we really don't need to dispatch it to all the children. However, deprecate all the individual consuming methods instead. Bug: 118118435 Test: ViewGroupTest Change-Id: I6b6627fb9c0a43444ee3f9dbeb978109f9138fbd
Diffstat (limited to 'tests/WindowInsetsTests')
-rw-r--r--tests/WindowInsetsTests/src/com/google/android/test/windowinsetstests/WindowInsetsActivity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/WindowInsetsTests/src/com/google/android/test/windowinsetstests/WindowInsetsActivity.java b/tests/WindowInsetsTests/src/com/google/android/test/windowinsetstests/WindowInsetsActivity.java
index b8b2de5141a7..f3c89d8addf6 100644
--- a/tests/WindowInsetsTests/src/com/google/android/test/windowinsetstests/WindowInsetsActivity.java
+++ b/tests/WindowInsetsTests/src/com/google/android/test/windowinsetstests/WindowInsetsActivity.java
@@ -97,6 +97,11 @@ public class WindowInsetsActivity extends Activity {
mRoot.setWindowInsetsAnimationCallback(new WindowInsetsAnimationCallback() {
@Override
+ public int getDispatchMode() {
+ return DISPATCH_MODE_STOP;
+ }
+
+ @Override
public void onPrepare(InsetsAnimation animation) {
if ((animation.getTypeMask() & Type.ime()) != 0) {
imeAnim = animation;