Created
June 28, 2020 22:08
-
-
Save NewtronLabs/0eecd78cd513c32a88cdd0682b68f70e to your computer and use it in GitHub Desktop.
IpcEventBus-conclusion.java
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
public class EventExample extends EventIpcSimple { | |
private IData mData; | |
public EventExample(IData data) { | |
mData = data; | |
} | |
EventExample(Parcel in) { | |
readFromParcel(in); | |
} | |
@Override | |
public void readFromParcel(Parcel parcel) { | |
// Must be done for every object in the event. | |
mData = (IData) ParcelHelper.getInstance().createFromParcel(parcel, IData.class); | |
} | |
@Override | |
public void writeToParcel(Parcel dest, int flags) { | |
// Must be done for every object in the event. | |
ParcelHelper.getInstance().writeToParcel(dest, flags, mData); | |
} | |
public IData getData() { | |
return mData; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment