Java Code Examples for android.os.Parcel.appendFrom()

The following are Jave code examples for showing how to use appendFrom() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: aos-MediaLib   File: MediaMetadata.java   View Source Code Vote up 5 votes
public MediaMetadata createFromParcel(Parcel p) {
    MediaMetadata metadata = new MediaMetadata();
    Parcel data = Parcel.obtain();

    data.appendFrom(p, p.dataPosition(), p.dataAvail());
    data.setDataPosition(0);
    if (metadata.parse(data))
        return metadata;
    else
        return null;
}
 
Example 2
Project: aos-MediaLib   File: MediaMetadata.java   View Source Code Vote up 4 votes
public void writeToParcel(Parcel dest, int flags) {
    mParcel.setDataPosition(mBegin);
    dest.appendFrom(mParcel, 0, mParcel.dataAvail());
}