66 lines
3.0 KiB
Java
66 lines
3.0 KiB
Java
![]() |
/*
|
||
|
* This file is auto-generated. DO NOT MODIFY.
|
||
|
* Using: out/host/linux-x86/bin/aidl --lang=java --structured --version 2 --hash c32ddfdeb69c6e4a8a45519e6f9a39c4b66fd99f --stability vintf --min_sdk_version current --ninja -d out/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common-V2-java-source/gen/android/hardware/common/Ashmem.java.d -o out/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common-V2-java-source/gen -Nhardware/interfaces/common/aidl/aidl_api/android.hardware.common/2 hardware/interfaces/common/aidl/aidl_api/android.hardware.common/2/android/hardware/common/Ashmem.aidl
|
||
|
*/
|
||
|
package android.hardware.common;
|
||
|
public class Ashmem implements android.os.Parcelable
|
||
|
{
|
||
|
public android.os.ParcelFileDescriptor fd;
|
||
|
public long size = 0L;
|
||
|
@Override
|
||
|
public final int getStability() { return android.os.Parcelable.PARCELABLE_STABILITY_VINTF; }
|
||
|
public static final android.os.Parcelable.Creator<Ashmem> CREATOR = new android.os.Parcelable.Creator<Ashmem>() {
|
||
|
@Override
|
||
|
public Ashmem createFromParcel(android.os.Parcel _aidl_source) {
|
||
|
Ashmem _aidl_out = new Ashmem();
|
||
|
_aidl_out.readFromParcel(_aidl_source);
|
||
|
return _aidl_out;
|
||
|
}
|
||
|
@Override
|
||
|
public Ashmem[] newArray(int _aidl_size) {
|
||
|
return new Ashmem[_aidl_size];
|
||
|
}
|
||
|
};
|
||
|
@Override public final void writeToParcel(android.os.Parcel _aidl_parcel, int _aidl_flag)
|
||
|
{
|
||
|
int _aidl_start_pos = _aidl_parcel.dataPosition();
|
||
|
_aidl_parcel.writeInt(0);
|
||
|
_aidl_parcel.writeTypedObject(fd, _aidl_flag);
|
||
|
_aidl_parcel.writeLong(size);
|
||
|
int _aidl_end_pos = _aidl_parcel.dataPosition();
|
||
|
_aidl_parcel.setDataPosition(_aidl_start_pos);
|
||
|
_aidl_parcel.writeInt(_aidl_end_pos - _aidl_start_pos);
|
||
|
_aidl_parcel.setDataPosition(_aidl_end_pos);
|
||
|
}
|
||
|
public final void readFromParcel(android.os.Parcel _aidl_parcel)
|
||
|
{
|
||
|
int _aidl_start_pos = _aidl_parcel.dataPosition();
|
||
|
int _aidl_parcelable_size = _aidl_parcel.readInt();
|
||
|
try {
|
||
|
if (_aidl_parcelable_size < 4) throw new android.os.BadParcelableException("Parcelable too small");;
|
||
|
if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return;
|
||
|
fd = _aidl_parcel.readTypedObject(android.os.ParcelFileDescriptor.CREATOR);
|
||
|
if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return;
|
||
|
size = _aidl_parcel.readLong();
|
||
|
} finally {
|
||
|
if (_aidl_start_pos > (Integer.MAX_VALUE - _aidl_parcelable_size)) {
|
||
|
throw new android.os.BadParcelableException("Overflow in the size of parcelable");
|
||
|
}
|
||
|
_aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
|
||
|
}
|
||
|
}
|
||
|
@Override
|
||
|
public int describeContents() {
|
||
|
int _mask = 0;
|
||
|
_mask |= describeContents(fd);
|
||
|
return _mask;
|
||
|
}
|
||
|
private int describeContents(Object _v) {
|
||
|
if (_v == null) return 0;
|
||
|
if (_v instanceof android.os.Parcelable) {
|
||
|
return ((android.os.Parcelable) _v).describeContents();
|
||
|
}
|
||
|
return 0;
|
||
|
}
|
||
|
}
|