-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocationrequest.go
More file actions
125 lines (119 loc) · 2.59 KB
/
locationrequest.go
File metadata and controls
125 lines (119 loc) · 2.59 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package location
import (
types "github.com/AndroidGoLab/binder/android/os/types"
"github.com/AndroidGoLab/binder/parcel"
)
// Code generated by aidlgen. DO NOT EDIT.
type LocationRequest struct {
Provider string
IntervalMillis int64
Quality int32
ExpireAtRealtimeMillis int64
DurationMillis int64
MaxUpdates int32
MinUpdateIntervalMillis int64
MinUpdateDistanceMeters float32
MaxUpdateDelayMillis int64
HideFromAppOps bool
AdasGnssBypass bool
Bypass bool
LowPower bool
WorkSource *types.WorkSource
}
var _ parcel.Parcelable = (*LocationRequest)(nil)
func (s *LocationRequest) MarshalParcel(
p *parcel.Parcel,
) error {
p.WriteString16(s.Provider)
p.WriteInt64(s.IntervalMillis)
p.WriteInt32(s.Quality)
p.WriteInt64(s.ExpireAtRealtimeMillis)
p.WriteInt64(s.DurationMillis)
p.WriteInt32(s.MaxUpdates)
p.WriteInt64(s.MinUpdateIntervalMillis)
p.WriteFloat32(s.MinUpdateDistanceMeters)
p.WriteInt64(s.MaxUpdateDelayMillis)
p.WriteBool(s.HideFromAppOps)
p.WriteBool(s.AdasGnssBypass)
p.WriteBool(s.Bypass)
p.WriteBool(s.LowPower)
if s.WorkSource != nil {
p.WriteInt32(1)
if _err := s.WorkSource.MarshalParcel(p); _err != nil {
return _err
}
} else {
p.WriteInt32(0)
}
return nil
}
func (s *LocationRequest) UnmarshalParcel(
p *parcel.Parcel,
) error {
var _err error
s.Provider, _err = p.ReadString16()
if _err != nil {
return _err
}
s.IntervalMillis, _err = p.ReadInt64()
if _err != nil {
return _err
}
s.Quality, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.ExpireAtRealtimeMillis, _err = p.ReadInt64()
if _err != nil {
return _err
}
s.DurationMillis, _err = p.ReadInt64()
if _err != nil {
return _err
}
s.MaxUpdates, _err = p.ReadInt32()
if _err != nil {
return _err
}
s.MinUpdateIntervalMillis, _err = p.ReadInt64()
if _err != nil {
return _err
}
s.MinUpdateDistanceMeters, _err = p.ReadFloat32()
if _err != nil {
return _err
}
s.MaxUpdateDelayMillis, _err = p.ReadInt64()
if _err != nil {
return _err
}
s.HideFromAppOps, _err = p.ReadBool()
if _err != nil {
return _err
}
s.AdasGnssBypass, _err = p.ReadBool()
if _err != nil {
return _err
}
s.Bypass, _err = p.ReadBool()
if _err != nil {
return _err
}
s.LowPower, _err = p.ReadBool()
if _err != nil {
return _err
}
{
_flag, _err := p.ReadInt32()
if _err != nil {
return _err
}
if _flag != 0 {
s.WorkSource = &types.WorkSource{}
if _err = s.WorkSource.UnmarshalParcel(p); _err != nil {
return _err
}
}
}
return nil
}