Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58514eaa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add WindowConfiguration's bounds to proto"

parents 17e17e2f 5f8b52cb
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.app;
import static android.app.ActivityThread.isSystem;
import static android.app.WindowConfigurationProto.ACTIVITY_TYPE;
import static android.app.WindowConfigurationProto.APP_BOUNDS;
import static android.app.WindowConfigurationProto.BOUNDS;
import static android.app.WindowConfigurationProto.WINDOWING_MODE;
import static android.view.Surface.rotationToString;

@@ -585,6 +586,9 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu
        }
        protoOutputStream.write(WINDOWING_MODE, mWindowingMode);
        protoOutputStream.write(ACTIVITY_TYPE, mActivityType);
        if (mBounds != null) {
            mBounds.writeToProto(protoOutputStream, BOUNDS);
        }
        protoOutputStream.end(token);
    }

@@ -606,6 +610,10 @@ public class WindowConfiguration implements Parcelable, Comparable<WindowConfigu
                        mAppBounds = new Rect();
                        mAppBounds.readFromProto(proto, APP_BOUNDS);
                        break;
                    case (int) BOUNDS:
                        mBounds = new Rect();
                        mBounds.readFromProto(proto, BOUNDS);
                        break;
                    case (int) WINDOWING_MODE:
                        mWindowingMode = proto.readInt(WINDOWING_MODE);
                        break;
+1 −0
Original line number Diff line number Diff line
@@ -29,4 +29,5 @@ message WindowConfigurationProto {
    optional .android.graphics.RectProto app_bounds = 1;
    optional int32 windowing_mode = 2;
    optional int32 activity_type = 3;
    optional .android.graphics.RectProto bounds = 4;
}