Created
June 7, 2022 04:19
-
-
Save flankerhqd/35a21b3f118e8a043589ea2c88374bc6 to your computer and use it in GitHub Desktop.
LSOItemData
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static { | |
LSOItemData.CREATOR = new Parcelable.Creator() { | |
public LSOItemData createFromParcel(Parcel source) { | |
try { | |
int v1_1 = source.dataPosition(); | |
int v2 = source.readByte(); | |
source.setDataPosition(v1_1); | |
return LSOItemCreator.createItem(((byte)v2), source); | |
} | |
catch(Exception e) { | |
Log.e("LSO_LSOItemData", "Exception in createFromParcel: " + e); | |
return null; | |
} | |
} | |
public LSOItemData[] newArray(int size) { | |
return null; | |
} | |
}; | |
} | |
public void readFromParcel(Parcel parcel) { | |
this.type = parcel.readByte(); | |
this.modifiedFields = parcel.readInt(); | |
this.itemId = this.readStringFromParcel(parcel, 1); | |
this.width = this.readIntFromParcel(parcel, 2, -99); | |
this.height = this.readIntFromParcel(parcel, 4, -99); | |
this.weight = this.readFloatFromParcel(parcel, 8, 0.0f); | |
this.bg_color = this.readIntFromParcel(parcel, 16, -1); | |
this.gravity = this.readIntFromParcel(parcel, 0x20, -1); | |
if(this.isFieldUpdated(0x40)) { | |
this.attrs = LSOAttributeSet.createFromParcel(parcel); | |
} | |
if(parcel.readInt() != 0) { | |
this.pfd = (ParcelFileDescriptor)ParcelFileDescriptor.CREATOR.createFromParcel(parcel); | |
return; | |
} | |
this.pfd = null; | |
} | |
@Override // android.os.Parcelable | |
public void writeToParcel(Parcel parcel, int flags) { | |
parcel.writeByte(this.type); | |
parcel.writeInt(this.modifiedFields); | |
this.writeToParcel(parcel, 1, this.itemId); | |
this.writeToParcel(parcel, 2, this.width); | |
this.writeToParcel(parcel, 4, this.height); | |
this.writeToParcel(parcel, 8, this.weight); | |
this.writeToParcel(parcel, 16, this.bg_color); | |
this.writeToParcel(parcel, 0x20, this.gravity); | |
if(this.isFieldUpdated(0x40)) { | |
this.attrs.writeToParcel(parcel, flags); | |
} | |
if(this.pfd != null) { | |
parcel.writeInt(1); | |
this.pfd.writeToParcel(parcel, flags); | |
return; | |
} | |
parcel.writeInt(0); | |
} | |
@Override // com.samsung.android.knox.lockscreen.LSOItemData | |
public void readFromParcel(Parcel parcel) { | |
super.readFromParcel(parcel); | |
this.text = this.readStringFromParcel(parcel, 0x80); | |
this.text_color = this.readIntFromParcel(parcel, 0x100, -1); | |
this.text_style = this.readIntFromParcel(parcel, 0x400, -1); | |
this.text_size = this.readFloatFromParcel(parcel, 0x200, LSOItemText.DEFAULT_TEXT_SIZE); | |
} | |
@Override // com.samsung.android.knox.lockscreen.LSOItemData | |
public void writeToParcel(Parcel parcel, int flags) { | |
super.writeToParcel(parcel, flags); | |
this.writeToParcel(parcel, 0x80, this.text); | |
this.writeToParcel(parcel, 0x100, this.text_color); | |
this.writeToParcel(parcel, 0x400, this.text_style); | |
this.writeToParcel(parcel, 0x200, this.text_size); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment