|
| 1 | +package android.hardware.boot.V1_0; |
| 2 | + |
| 3 | + |
| 4 | +public final class CommandResult { |
| 5 | + public boolean success = false; |
| 6 | + public String errMsg = new String(); |
| 7 | + |
| 8 | + @Override |
| 9 | + public final boolean equals(Object otherObject) { |
| 10 | + if (this == otherObject) { |
| 11 | + return true; |
| 12 | + } |
| 13 | + if (otherObject == null) { |
| 14 | + return false; |
| 15 | + } |
| 16 | + if (otherObject.getClass() != android.hardware.boot.V1_0.CommandResult.class) { |
| 17 | + return false; |
| 18 | + } |
| 19 | + android.hardware.boot.V1_0.CommandResult other = (android.hardware.boot.V1_0.CommandResult)otherObject; |
| 20 | + if (this.success != other.success) { |
| 21 | + return false; |
| 22 | + } |
| 23 | + if (!android.os.HidlSupport.deepEquals(this.errMsg, other.errMsg)) { |
| 24 | + return false; |
| 25 | + } |
| 26 | + return true; |
| 27 | + } |
| 28 | + |
| 29 | + @Override |
| 30 | + public final int hashCode() { |
| 31 | + return java.util.Objects.hash( |
| 32 | + android.os.HidlSupport.deepHashCode(this.success), |
| 33 | + android.os.HidlSupport.deepHashCode(this.errMsg)); |
| 34 | + } |
| 35 | + |
| 36 | + @Override |
| 37 | + public final String toString() { |
| 38 | + java.lang.StringBuilder builder = new java.lang.StringBuilder(); |
| 39 | + builder.append("{"); |
| 40 | + builder.append(".success = "); |
| 41 | + builder.append(this.success); |
| 42 | + builder.append(", .errMsg = "); |
| 43 | + builder.append(this.errMsg); |
| 44 | + builder.append("}"); |
| 45 | + return builder.toString(); |
| 46 | + } |
| 47 | + |
| 48 | + public final void readFromParcel(android.os.HwParcel parcel) { |
| 49 | + android.os.HwBlob blob = parcel.readBuffer(24 /* size */); |
| 50 | + readEmbeddedFromParcel(parcel, blob, 0 /* parentOffset */); |
| 51 | + } |
| 52 | + |
| 53 | + public static final java.util.ArrayList<CommandResult> readVectorFromParcel(android.os.HwParcel parcel) { |
| 54 | + java.util.ArrayList<CommandResult> _hidl_vec = new java.util.ArrayList(); |
| 55 | + android.os.HwBlob _hidl_blob = parcel.readBuffer(16 /* sizeof hidl_vec<T> */); |
| 56 | + |
| 57 | + { |
| 58 | + int _hidl_vec_size = _hidl_blob.getInt32(0 + 8 /* offsetof(hidl_vec<T>, mSize) */); |
| 59 | + android.os.HwBlob childBlob = parcel.readEmbeddedBuffer( |
| 60 | + _hidl_vec_size * 24,_hidl_blob.handle(), |
| 61 | + 0 + 0 /* offsetof(hidl_vec<T>, mBuffer) */,true /* nullable */); |
| 62 | + |
| 63 | + _hidl_vec.clear(); |
| 64 | + for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; ++_hidl_index_0) { |
| 65 | + android.hardware.boot.V1_0.CommandResult _hidl_vec_element = new android.hardware.boot.V1_0.CommandResult(); |
| 66 | + ((android.hardware.boot.V1_0.CommandResult) _hidl_vec_element).readEmbeddedFromParcel(parcel, childBlob, _hidl_index_0 * 24); |
| 67 | + _hidl_vec.add(_hidl_vec_element); |
| 68 | + } |
| 69 | + } |
| 70 | + |
| 71 | + return _hidl_vec; |
| 72 | + } |
| 73 | + |
| 74 | + public final void readEmbeddedFromParcel( |
| 75 | + android.os.HwParcel parcel, android.os.HwBlob _hidl_blob, long _hidl_offset) { |
| 76 | + success = _hidl_blob.getBool(_hidl_offset + 0); |
| 77 | + errMsg = _hidl_blob.getString(_hidl_offset + 8); |
| 78 | + |
| 79 | + parcel.readEmbeddedBuffer( |
| 80 | + ((String) errMsg).getBytes().length + 1, |
| 81 | + _hidl_blob.handle(), |
| 82 | + _hidl_offset + 8 + 0 /* offsetof(hidl_string, mBuffer) */,false /* nullable */); |
| 83 | + |
| 84 | + } |
| 85 | + |
| 86 | + public final void writeToParcel(android.os.HwParcel parcel) { |
| 87 | + android.os.HwBlob _hidl_blob = new android.os.HwBlob(24 /* size */); |
| 88 | + writeEmbeddedToBlob(_hidl_blob, 0 /* parentOffset */); |
| 89 | + parcel.writeBuffer(_hidl_blob); |
| 90 | + } |
| 91 | + |
| 92 | + public static final void writeVectorToParcel( |
| 93 | + android.os.HwParcel parcel, java.util.ArrayList<CommandResult> _hidl_vec) { |
| 94 | + android.os.HwBlob _hidl_blob = new android.os.HwBlob(16 /* sizeof(hidl_vec<T>) */); |
| 95 | + { |
| 96 | + int _hidl_vec_size = _hidl_vec.size(); |
| 97 | + _hidl_blob.putInt32(0 + 8 /* offsetof(hidl_vec<T>, mSize) */, _hidl_vec_size); |
| 98 | + _hidl_blob.putBool(0 + 12 /* offsetof(hidl_vec<T>, mOwnsBuffer) */, false); |
| 99 | + android.os.HwBlob childBlob = new android.os.HwBlob((int)(_hidl_vec_size * 24)); |
| 100 | + for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; ++_hidl_index_0) { |
| 101 | + _hidl_vec.get(_hidl_index_0).writeEmbeddedToBlob(childBlob, _hidl_index_0 * 24); |
| 102 | + } |
| 103 | + _hidl_blob.putBlob(0 + 0 /* offsetof(hidl_vec<T>, mBuffer) */, childBlob); |
| 104 | + } |
| 105 | + |
| 106 | + parcel.writeBuffer(_hidl_blob); |
| 107 | + } |
| 108 | + |
| 109 | + public final void writeEmbeddedToBlob( |
| 110 | + android.os.HwBlob _hidl_blob, long _hidl_offset) { |
| 111 | + _hidl_blob.putBool(_hidl_offset + 0, success); |
| 112 | + _hidl_blob.putString(_hidl_offset + 8, errMsg); |
| 113 | + } |
| 114 | +}; |
| 115 | + |
0 commit comments