1 package com.android.tests.basicprojectwithaidl;
2 
3 import android.os.Parcel;
4 import android.os.Parcelable;
5 
6 public class Rect implements Parcelable {
7     public int left;
8     public int top;
9     public int right;
10     public int bottom;
11 
12     public static final Parcelable.Creator<Rect> CREATOR = new Parcelable.Creator<Rect>() {
13         public Rect createFromParcel(Parcel in) {
14             return new Rect(in);
15         }
16 
17         public Rect[] newArray(int size) {
18             return new Rect[size];
19         }
20     };
21 
Rect()22     public Rect() {
23     }
24 
Rect(Parcel in)25     private Rect(Parcel in) {
26         readFromParcel(in);
27     }
28 
writeToParcel(Parcel out)29     public void writeToParcel(Parcel out) {
30         out.writeInt(left);
31         out.writeInt(top);
32         out.writeInt(right);
33         out.writeInt(bottom);
34     }
35 
readFromParcel(Parcel in)36     public void readFromParcel(Parcel in) {
37         left = in.readInt();
38         top = in.readInt();
39         right = in.readInt();
40         bottom = in.readInt();
41     }
42 
describeContents()43     public int describeContents() {
44         // TODO Auto-generated method stub
45         return 0;
46     }
47 
writeToParcel(Parcel arg0, int arg1)48     public void writeToParcel(Parcel arg0, int arg1) {
49         // TODO Auto-generated method stub
50 
51     }
52 }
53