1 /* 2 * This file is auto-generated. DO NOT MODIFY. 3 */ 4 package android.aidl.loggable; 5 public class Data implements android.os.Parcelable 6 { 7 public int num = 0; 8 public java.lang.String str; 9 public android.aidl.loggable.Union nestedUnion; 10 public byte nestedEnum = android.aidl.loggable.Enum.FOO; 11 public static final android.os.Parcelable.Creator<Data> CREATOR = new android.os.Parcelable.Creator<Data>() { 12 @Override 13 public Data createFromParcel(android.os.Parcel _aidl_source) { 14 Data _aidl_out = new Data(); 15 _aidl_out.readFromParcel(_aidl_source); 16 return _aidl_out; 17 } 18 @Override 19 public Data[] newArray(int _aidl_size) { 20 return new Data[_aidl_size]; 21 } 22 }; writeToParcel(android.os.Parcel _aidl_parcel, int _aidl_flag)23 @Override public final void writeToParcel(android.os.Parcel _aidl_parcel, int _aidl_flag) 24 { 25 int _aidl_start_pos = _aidl_parcel.dataPosition(); 26 _aidl_parcel.writeInt(0); 27 _aidl_parcel.writeInt(num); 28 _aidl_parcel.writeString(str); 29 if ((nestedUnion!=null)) { 30 _aidl_parcel.writeInt(1); 31 nestedUnion.writeToParcel(_aidl_parcel, 0); 32 } 33 else { 34 _aidl_parcel.writeInt(0); 35 } 36 _aidl_parcel.writeByte(nestedEnum); 37 int _aidl_end_pos = _aidl_parcel.dataPosition(); 38 _aidl_parcel.setDataPosition(_aidl_start_pos); 39 _aidl_parcel.writeInt(_aidl_end_pos - _aidl_start_pos); 40 _aidl_parcel.setDataPosition(_aidl_end_pos); 41 } readFromParcel(android.os.Parcel _aidl_parcel)42 public final void readFromParcel(android.os.Parcel _aidl_parcel) 43 { 44 int _aidl_start_pos = _aidl_parcel.dataPosition(); 45 int _aidl_parcelable_size = _aidl_parcel.readInt(); 46 try { 47 if (_aidl_parcelable_size < 0) return; 48 if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return; 49 num = _aidl_parcel.readInt(); 50 if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return; 51 str = _aidl_parcel.readString(); 52 if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return; 53 if ((0!=_aidl_parcel.readInt())) { 54 nestedUnion = android.aidl.loggable.Union.CREATOR.createFromParcel(_aidl_parcel); 55 } 56 else { 57 nestedUnion = null; 58 } 59 if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return; 60 nestedEnum = _aidl_parcel.readByte(); 61 } finally { 62 if (_aidl_start_pos > (Integer.MAX_VALUE - _aidl_parcelable_size)) { 63 throw new android.os.BadParcelableException("Overflow in the size of parcelable"); 64 } 65 _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size); 66 } 67 } 68 @Override describeContents()69 public int describeContents() { 70 int _mask = 0; 71 _mask |= describeContents(nestedUnion); 72 return _mask; 73 } describeContents(Object _v)74 private int describeContents(Object _v) { 75 if (_v == null) return 0; 76 if (_v instanceof android.os.Parcelable) { 77 return ((android.os.Parcelable) _v).describeContents(); 78 } 79 return 0; 80 } 81 } 82