blob: 91e8c0f6f3c2417b7c8f08d05367704daeb2ee9c (
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
|
package com.mapbox.mapboxsdk.module.telemetry;
import android.annotation.SuppressLint;
import android.os.Parcel;
import com.mapbox.android.telemetry.Event;
/**
* Event that represents users' gestures on map, for the details of gestures,
* please refer to {@link com.mapbox.mapboxsdk.constants.TelemetryConstants}
*/
@SuppressLint("ParcelCreator")
class MapClickEvent extends Event {
private final String event = "map.click";
private final String created;
private final String gesture;
private final String cellularNetworkType;
private final String carrier;
private final String orientation;
private final double latitude;
private final double longitude;
private final double zoom;
private final int batteryLevel;
private final boolean pluggedIn;
private final boolean wifi;
MapClickEvent(PhoneState phoneState, MapState mapState) {
this.gesture = mapState.getGesture();
this.latitude = mapState.getLatitude();
this.longitude = mapState.getLongitude();
this.zoom = mapState.getZoom();
this.created = phoneState.getCreated();
this.batteryLevel = phoneState.getBatteryLevel();
this.pluggedIn = phoneState.isPluggedIn();
this.cellularNetworkType = phoneState.getCellularNetworkType();
this.orientation = phoneState.getOrientation();
this.carrier = phoneState.getCarrier();
this.wifi = phoneState.isWifi();
}
String getCreated() {
return created;
}
String getGesture() {
return gesture;
}
String getCellularNetworkType() {
return cellularNetworkType;
}
String getCarrier() {
return carrier;
}
String getOrientation() {
return orientation;
}
double getLatitude() {
return latitude;
}
double getLongitude() {
return longitude;
}
double getZoom() {
return zoom;
}
int getBatteryLevel() {
return batteryLevel;
}
boolean isPluggedIn() {
return pluggedIn;
}
boolean isWifi() {
return wifi;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
}
}
|