summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowInfo.java
diff options
context:
space:
mode:
authorPhil Weaver <pweaver@google.com>2017-03-03 13:44:00 -0800
committerPhil Weaver <pweaver@google.com>2017-03-10 15:35:30 -0800
commitf00cd14f17c0acd6bffe78947d32ea0a2900d139 (patch)
tree33a9800317cd51898e4c359d7343804233085557 /core/java/android/view/WindowInfo.java
parent7219795ffb1b2eafa10ac85f603dbef1620bf810 (diff)
Basic accessibility support for picture-in-picture
Exposing actions from the PIP InputConsumer to accessibility, stripping all actions from a covered PIP app, and adding the InputConsumer's actions on the PIP app's root view. We were also using an "undefined" accessibility ID to mean three different things: a root view, a host view of a virtual view hierarchy, and a truly undefined view. I've introduced new values for cases where the id could be defined. Also gathering all window IDs into one place to reduce the chance of collisions. Bug: 34773134 Test: In progress. Current cts passes. Change-Id: I97269741a292cf406272bf02359c76c396f84640
Diffstat (limited to 'core/java/android/view/WindowInfo.java')
-rw-r--r--core/java/android/view/WindowInfo.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/view/WindowInfo.java b/core/java/android/view/WindowInfo.java
index 737e46071313..95a63944b3bc 100644
--- a/core/java/android/view/WindowInfo.java
+++ b/core/java/android/view/WindowInfo.java
@@ -46,6 +46,7 @@ public class WindowInfo implements Parcelable {
public List<IBinder> childTokens;
public CharSequence title;
public int accessibilityIdOfAnchor = View.NO_ID;
+ public boolean inPictureInPicture;
private WindowInfo() {
/* do nothing - hide constructor */
@@ -69,6 +70,7 @@ public class WindowInfo implements Parcelable {
window.boundsInScreen.set(other.boundsInScreen);
window.title = other.title;
window.accessibilityIdOfAnchor = other.accessibilityIdOfAnchor;
+ window.inPictureInPicture = other.inPictureInPicture;
if (other.childTokens != null && !other.childTokens.isEmpty()) {
if (window.childTokens == null) {
@@ -101,6 +103,7 @@ public class WindowInfo implements Parcelable {
boundsInScreen.writeToParcel(parcel, flags);
parcel.writeCharSequence(title);
parcel.writeInt(accessibilityIdOfAnchor);
+ parcel.writeInt(inPictureInPicture ? 1 : 0);
if (childTokens != null && !childTokens.isEmpty()) {
parcel.writeInt(1);
@@ -136,6 +139,7 @@ public class WindowInfo implements Parcelable {
boundsInScreen.readFromParcel(parcel);
title = parcel.readCharSequence();
accessibilityIdOfAnchor = parcel.readInt();
+ inPictureInPicture = (parcel.readInt() == 1);
final boolean hasChildren = (parcel.readInt() == 1);
if (hasChildren) {
@@ -156,6 +160,7 @@ public class WindowInfo implements Parcelable {
if (childTokens != null) {
childTokens.clear();
}
+ inPictureInPicture = false;
}
public static final Parcelable.Creator<WindowInfo> CREATOR =