summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yunfan Chen <yunfanc@google.com> 2022-04-04 03:15:01 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-04-04 03:15:01 +0000
commit268eff33eca3c080f3f276e3060ec0da9aedcfcc (patch)
treee15e4126562027d11ef593d2ead5392d2327ff08
parentebcfe1c6e04e02cc4e27be020268b392c502777f (diff)
parent16e58e7322fdc48d37767d155c332b15c508cfbb (diff)
Merge "Provide gesture and tappable element insets for caption"
-rw-r--r--core/java/android/view/InsetsState.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/view/InsetsState.java b/core/java/android/view/InsetsState.java
index 75b69cb12d32..d15d7c7045e9 100644
--- a/core/java/android/view/InsetsState.java
+++ b/core/java/android/view/InsetsState.java
@@ -391,6 +391,17 @@ public class InsetsState implements Parcelable {
processSourceAsPublicType(source, typeInsetsMap, typeSideMap, typeVisibilityMap,
insets, Type.SYSTEM_GESTURES);
}
+ if (type == Type.CAPTION_BAR) {
+ // Caption should also be gesture and tappable elements. This should not be needed when
+ // the caption is added from the shell, as the shell can add other types at the same
+ // time.
+ processSourceAsPublicType(source, typeInsetsMap, typeSideMap, typeVisibilityMap,
+ insets, Type.SYSTEM_GESTURES);
+ processSourceAsPublicType(source, typeInsetsMap, typeSideMap, typeVisibilityMap,
+ insets, Type.MANDATORY_SYSTEM_GESTURES);
+ processSourceAsPublicType(source, typeInsetsMap, typeSideMap, typeVisibilityMap,
+ insets, Type.TAPPABLE_ELEMENT);
+ }
}
private void processSourceAsPublicType(InsetsSource source, Insets[] typeInsetsMap,