Methods Summary |
---|
private void | clear()
type = 0;
layer = 0;
token = null;
parentToken = null;
focused = false;
boundsInScreen.setEmpty();
if (childTokens != null) {
childTokens.clear();
}
|
public int | describeContents()
return 0;
|
private void | initFromParcel(android.os.Parcel parcel)
type = parcel.readInt();
layer = parcel.readInt();
token = parcel.readStrongBinder();
parentToken = parcel.readStrongBinder();
focused = (parcel.readInt() == 1);
boundsInScreen.readFromParcel(parcel);
final boolean hasChildren = (parcel.readInt() == 1);
if (hasChildren) {
if (childTokens == null) {
childTokens = new ArrayList<IBinder>();
}
parcel.readBinderList(childTokens);
}
|
public static android.view.WindowInfo | obtain()
WindowInfo window = sPool.acquire();
if (window == null) {
window = new WindowInfo();
}
return window;
|
public static android.view.WindowInfo | obtain(android.view.WindowInfo other)
WindowInfo window = obtain();
window.type = other.type;
window.layer = other.layer;
window.token = other.token;
window.parentToken = other.parentToken;
window.focused = other.focused;
window.boundsInScreen.set(other.boundsInScreen);
if (other.childTokens != null && !other.childTokens.isEmpty()) {
if (window.childTokens == null) {
window.childTokens = new ArrayList<IBinder>(other.childTokens);
} else {
window.childTokens.addAll(other.childTokens);
}
}
return window;
|
public void | recycle()
clear();
sPool.release(this);
|
public java.lang.String | toString()
StringBuilder builder = new StringBuilder();
builder.append("WindowInfo[");
builder.append("type=").append(type);
builder.append(", layer=").append(layer);
builder.append(", token=").append(token);
builder.append(", bounds=").append(boundsInScreen);
builder.append(", parent=").append(parentToken);
builder.append(", focused=").append(focused);
builder.append(", children=").append(childTokens);
builder.append(']");
return builder.toString();
|
public void | writeToParcel(android.os.Parcel parcel, int flags)
parcel.writeInt(type);
parcel.writeInt(layer);
parcel.writeStrongBinder(token);
parcel.writeStrongBinder(parentToken);
parcel.writeInt(focused ? 1 : 0);
boundsInScreen.writeToParcel(parcel, flags);
if (childTokens != null && !childTokens.isEmpty()) {
parcel.writeInt(1);
parcel.writeBinderList(childTokens);
} else {
parcel.writeInt(0);
}
|