blob: 71d59eb3bbdb006bd767c1c9f4a2dc22ddad0f8b (
plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
package com.mapbox.mapboxsdk.module.telemetry;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;
import com.mapbox.android.telemetry.Event;
import com.mapbox.android.telemetry.TelemetryUtils;
public class OfflineDownloadEndEvent extends Event implements Parcelable {
private static final String OFFLINE_DOWNLOAD_COMPLETE = "map.offlineDownload.end";
@SerializedName("event")
private final String event;
@SerializedName("created")
private final String created;
@SerializedName("minZoom")
private final Double minZoom;
@SerializedName("maxZoom")
private final Double maxZoom;
@SerializedName("shapeForOfflineRegion")
private final String shapeForOfflineRegion;
@SerializedName("styleURL")
private String styleURL;
@SerializedName("sizeOfResourcesCompleted")
private Long sizeOfResourcesCompleted;
@SerializedName("numberOfTilesCompleted")
private Long numberOfTilesCompleted;
@SerializedName("state")
private String state;
public void setStyleURL(String styleURL) {
this.styleURL = styleURL;
}
public void setSizeOfResourcesCompleted(Long sizeOfResourcesCompleted) {
this.sizeOfResourcesCompleted = sizeOfResourcesCompleted;
}
public void setNumberOfTilesCompleted(Long numberOfTilesCompleted) {
this.numberOfTilesCompleted = numberOfTilesCompleted;
}
public void setState(String state) {
this.state = state;
}
OfflineDownloadEndEvent(String shapeForOfflineRegion, Double minZoom, Double maxZoom) {
this.event = OFFLINE_DOWNLOAD_COMPLETE;
this.created = TelemetryUtils.obtainCurrentDate();
this.shapeForOfflineRegion = shapeForOfflineRegion;
this.minZoom = minZoom;
this.maxZoom = maxZoom;
}
private OfflineDownloadEndEvent(Parcel in) {
event = in.readString();
created = in.readString();
shapeForOfflineRegion = in.readString();
minZoom = in.readDouble();
maxZoom = in.readDouble();
styleURL = in.readString();
sizeOfResourcesCompleted = in.readLong();
numberOfTilesCompleted = in.readLong();
state = in.readString();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(event);
dest.writeString(created);
dest.writeString(shapeForOfflineRegion);
dest.writeDouble(minZoom);
dest.writeDouble(maxZoom);
dest.writeString(styleURL);
dest.writeLong(sizeOfResourcesCompleted);
dest.writeLong(numberOfTilesCompleted);
dest.writeString(state);
}
public static final Creator<OfflineDownloadEndEvent> CREATOR = new Creator<OfflineDownloadEndEvent>() {
@Override
public OfflineDownloadEndEvent createFromParcel(Parcel in) {
return new OfflineDownloadEndEvent(in);
}
@Override
public OfflineDownloadEndEvent[] newArray(int size) {
return new OfflineDownloadEndEvent[size];
}
};
}
|