Loading core/proto/android/graphics/point.proto 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package android.graphics; option java_multiple_files = true; message PointProto { optional int32 x = 1; optional int32 y = 2; } core/proto/android/server/windowmanagerservice.proto +2 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,8 @@ message WindowStateProto { optional WindowStateAnimatorProto animator = 13; optional bool animating_exit = 14; repeated WindowStateProto child_windows = 15; optional .android.graphics.RectProto surface_position = 16; optional .android.graphics.RectProto shown_position = 17; } message IdentifierProto { Loading graphics/java/android/graphics/Point.java +16 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.graphics; import android.os.Parcel; import android.os.Parcelable; import android.util.proto.ProtoOutputStream; import java.io.PrintWriter; Loading Loading @@ -121,6 +122,21 @@ public class Point implements Parcelable { out.writeInt(y); } /** * Write to a protocol buffer output stream. * Protocol buffer message definition at {@link android.graphics.PointProto} * * @param protoOutputStream Stream to write the Rect object to. * @param fieldId Field Id of the Rect as defined in the parent message * @hide */ public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId) { final long token = protoOutputStream.start(fieldId); protoOutputStream.write(PointProto.X, x); protoOutputStream.write(PointProto.Y, y); protoOutputStream.end(token); } public static final Parcelable.Creator<Point> CREATOR = new Parcelable.Creator<Point>() { /** * Return a new point from the data in the specified parcel. Loading services/core/java/com/android/server/wm/WindowState.java +4 −0 Original line number Diff line number Diff line Loading @@ -118,7 +118,9 @@ import static com.android.server.wm.proto.WindowStateProto.GIVEN_CONTENT_INSETS; import static com.android.server.wm.proto.WindowStateProto.IDENTIFIER; import static com.android.server.wm.proto.WindowStateProto.PARENT_FRAME; import static com.android.server.wm.proto.WindowStateProto.STACK_ID; import static com.android.server.wm.proto.WindowStateProto.SHOWN_POSITION; import static com.android.server.wm.proto.WindowStateProto.SURFACE_INSETS; import static com.android.server.wm.proto.WindowStateProto.SURFACE_POSITION; import static com.android.server.wm.proto.WindowStateProto.WINDOW_CONTAINER; import android.annotation.CallSuper; Loading Loading @@ -3112,6 +3114,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mContentFrame.writeToProto(proto, CONTENT_FRAME); mContentInsets.writeToProto(proto, CONTENT_INSETS); mAttrs.surfaceInsets.writeToProto(proto, SURFACE_INSETS); mSurfacePosition.writeToProto(proto, SURFACE_POSITION); mShownPosition.writeToProto(proto, SHOWN_POSITION); mWinAnimator.writeToProto(proto, ANIMATOR); proto.write(ANIMATING_EXIT, mAnimatingExit); for (int i = 0; i < mChildren.size(); i++) { Loading Loading
core/proto/android/graphics/point.proto 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ syntax = "proto2"; package android.graphics; option java_multiple_files = true; message PointProto { optional int32 x = 1; optional int32 y = 2; }
core/proto/android/server/windowmanagerservice.proto +2 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,8 @@ message WindowStateProto { optional WindowStateAnimatorProto animator = 13; optional bool animating_exit = 14; repeated WindowStateProto child_windows = 15; optional .android.graphics.RectProto surface_position = 16; optional .android.graphics.RectProto shown_position = 17; } message IdentifierProto { Loading
graphics/java/android/graphics/Point.java +16 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.graphics; import android.os.Parcel; import android.os.Parcelable; import android.util.proto.ProtoOutputStream; import java.io.PrintWriter; Loading Loading @@ -121,6 +122,21 @@ public class Point implements Parcelable { out.writeInt(y); } /** * Write to a protocol buffer output stream. * Protocol buffer message definition at {@link android.graphics.PointProto} * * @param protoOutputStream Stream to write the Rect object to. * @param fieldId Field Id of the Rect as defined in the parent message * @hide */ public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId) { final long token = protoOutputStream.start(fieldId); protoOutputStream.write(PointProto.X, x); protoOutputStream.write(PointProto.Y, y); protoOutputStream.end(token); } public static final Parcelable.Creator<Point> CREATOR = new Parcelable.Creator<Point>() { /** * Return a new point from the data in the specified parcel. Loading
services/core/java/com/android/server/wm/WindowState.java +4 −0 Original line number Diff line number Diff line Loading @@ -118,7 +118,9 @@ import static com.android.server.wm.proto.WindowStateProto.GIVEN_CONTENT_INSETS; import static com.android.server.wm.proto.WindowStateProto.IDENTIFIER; import static com.android.server.wm.proto.WindowStateProto.PARENT_FRAME; import static com.android.server.wm.proto.WindowStateProto.STACK_ID; import static com.android.server.wm.proto.WindowStateProto.SHOWN_POSITION; import static com.android.server.wm.proto.WindowStateProto.SURFACE_INSETS; import static com.android.server.wm.proto.WindowStateProto.SURFACE_POSITION; import static com.android.server.wm.proto.WindowStateProto.WINDOW_CONTAINER; import android.annotation.CallSuper; Loading Loading @@ -3112,6 +3114,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mContentFrame.writeToProto(proto, CONTENT_FRAME); mContentInsets.writeToProto(proto, CONTENT_INSETS); mAttrs.surfaceInsets.writeToProto(proto, SURFACE_INSETS); mSurfacePosition.writeToProto(proto, SURFACE_POSITION); mShownPosition.writeToProto(proto, SHOWN_POSITION); mWinAnimator.writeToProto(proto, ANIMATOR); proto.write(ANIMATING_EXIT, mAnimatingExit); for (int i = 0; i < mChildren.size(); i++) { Loading