| /* |
| * This file is auto-generated. DO NOT MODIFY. |
| * Using: out/host/linux-x86/bin/aidl --lang=java --structured --version 5 --hash d111735ed2b89b6c32443aac9b162b1afbbea3f2 -t --stability vintf --min_sdk_version platform_apis -pout/soong/.intermediates/hardware/interfaces/common/fmq/aidl/android.hardware.common.fmq_interface/1/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl --ninja -d out/soong/.intermediates/hardware/interfaces/power/aidl/android.hardware.power-V5-java-source/gen/android/hardware/power/ChannelConfig.java.d -o out/soong/.intermediates/hardware/interfaces/power/aidl/android.hardware.power-V5-java-source/gen -Nhardware/interfaces/power/aidl/aidl_api/android.hardware.power/5 hardware/interfaces/power/aidl/aidl_api/android.hardware.power/5/android/hardware/power/ChannelConfig.aidl |
| */ |
| package android.hardware.power; |
| public class ChannelConfig implements android.os.Parcelable |
| { |
| public android.hardware.common.fmq.MQDescriptor<android.hardware.power.ChannelMessage,Byte> channelDescriptor; |
| public android.hardware.common.fmq.MQDescriptor<Byte,Byte> eventFlagDescriptor; |
| public int readFlagBitmask = 0; |
| public int writeFlagBitmask = 0; |
| @Override |
| public final int getStability() { return android.os.Parcelable.PARCELABLE_STABILITY_VINTF; } |
| public static final android.os.Parcelable.Creator<ChannelConfig> CREATOR = new android.os.Parcelable.Creator<ChannelConfig>() { |
| @Override |
| public ChannelConfig createFromParcel(android.os.Parcel _aidl_source) { |
| ChannelConfig _aidl_out = new ChannelConfig(); |
| _aidl_out.readFromParcel(_aidl_source); |
| return _aidl_out; |
| } |
| @Override |
| public ChannelConfig[] newArray(int _aidl_size) { |
| return new ChannelConfig[_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(channelDescriptor, _aidl_flag); |
| _aidl_parcel.writeTypedObject(eventFlagDescriptor, _aidl_flag); |
| _aidl_parcel.writeInt(readFlagBitmask); |
| _aidl_parcel.writeInt(writeFlagBitmask); |
| 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; |
| channelDescriptor = _aidl_parcel.readTypedObject(android.hardware.common.fmq.MQDescriptor.CREATOR); |
| if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return; |
| eventFlagDescriptor = _aidl_parcel.readTypedObject(android.hardware.common.fmq.MQDescriptor.CREATOR); |
| if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return; |
| readFlagBitmask = _aidl_parcel.readInt(); |
| if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return; |
| writeFlagBitmask = _aidl_parcel.readInt(); |
| } 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(channelDescriptor); |
| _mask |= describeContents(eventFlagDescriptor); |
| 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; |
| } |
| } |