lmw
2024-09-25 92778728b83ce1a34ba21bcdb061afdeca16cce5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.ypx.imagepicker.bean;
 
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
 
import java.io.Serializable;
 
public class UriPathInfo implements Serializable, Parcelable {
    public Uri uri;
    public String absolutePath;
 
    public UriPathInfo(Uri uri, String absolutePath) {
        this.uri = uri;
        this.absolutePath = absolutePath;
    }
 
    protected UriPathInfo(Parcel in) {
        uri = in.readParcelable(Uri.class.getClassLoader());
        absolutePath = in.readString();
    }
 
    public static final Creator<UriPathInfo> CREATOR = new Creator<UriPathInfo>() {
        @Override
        public UriPathInfo createFromParcel(Parcel in) {
            return new UriPathInfo(in);
        }
 
        @Override
        public UriPathInfo[] newArray(int size) {
            return new UriPathInfo[size];
        }
    };
 
    /**
     * Describe the kinds of special objects contained in this Parcelable
     * instance's marshaled representation. For example, if the object will
     * include a file descriptor in the output of {@link #writeToParcel(Parcel, int)},
     * the return value of this method must include the
     * {@link #CONTENTS_FILE_DESCRIPTOR} bit.
     *
     * @return a bitmask indicating the set of special object types marshaled
     * by this Parcelable object instance.
     */
    @Override
    public int describeContents() {
        return 0;
    }
 
    /**
     * Flatten this object in to a Parcel.
     *
     * @param dest  The Parcel in which the object should be written.
     * @param flags Additional flags about how the object should be written.
     *              May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.
     */
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(uri, flags);
        dest.writeString(absolutePath);
    }
}