a.java
5.22 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
package com.instabug.library.internal.c;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
public class a
implements SensorEventListener
{
private a a;
private b[] b = new b[''];
private float c = 10.0F;
private int d = 2;
private int[][] e = { { 0, 0 }, { 0, 0 }, { 0, 0 } };
private int[] f = { 0, 0, 0 };
private int g = 0;
public void a(float paramFloat)
{
this.c = (100.0F * paramFloat);
}
public void a(a parama)
{
this.a = parama;
}
public boolean a(SensorManager paramSensorManager)
{
if (paramSensorManager != null) {
return paramSensorManager.registerListener(this, paramSensorManager.getDefaultSensor(1), 2);
}
return false;
}
public void b(SensorManager paramSensorManager)
{
if (paramSensorManager != null) {
paramSensorManager.unregisterListener(this);
}
}
public void onAccuracyChanged(Sensor paramSensor, int paramInt) {}
public void onSensorChanged(SensorEvent paramSensorEvent)
{
for (;;)
{
try
{
if ((this.b[0] != null) && (this.g > 0))
{
long l1 = paramSensorEvent.timestamp;
long l2 = this.b[(this.g - 1)].d;
if (l1 - l2 <= 500L) {
return;
}
}
Object localObject2 = this.b[this.g];
Object localObject1 = localObject2;
if (localObject2 == null) {
localObject1 = new b(paramSensorEvent.values[0], paramSensorEvent.values[1], paramSensorEvent.values[2], paramSensorEvent.timestamp);
}
((b)localObject1).a = paramSensorEvent.values[0];
((b)localObject1).b = paramSensorEvent.values[1];
((b)localObject1).c = paramSensorEvent.values[2];
((b)localObject1).d = paramSensorEvent.timestamp;
this.b[this.g] = localObject1;
this.g += 1;
if (this.g == this.b.length) {
this.g = 0;
}
this.e[0][0] = 0;
this.e[0][1] = 0;
this.e[1][0] = 0;
this.e[1][1] = 0;
this.e[2][0] = 0;
this.e[2][1] = 0;
paramSensorEvent = this.b;
int j = paramSensorEvent.length;
int i = 0;
if (i < j)
{
localObject1 = paramSensorEvent[i];
if (localObject1 != null)
{
if ((((b)localObject1).a > this.c) && (this.f[0] <= 0))
{
this.f[0] = 1;
localObject2 = this.e[0];
localObject2[0] += 1;
}
if ((((b)localObject1).a < -this.c) && (this.f[0] >= 0))
{
this.f[0] = -1;
localObject2 = this.e[0];
localObject2[1] += 1;
}
if ((((b)localObject1).b > this.c) && (this.f[1] <= 0))
{
this.f[1] = 1;
localObject2 = this.e[1];
localObject2[0] += 1;
}
if ((((b)localObject1).b < -this.c) && (this.f[1] >= 0))
{
this.f[1] = -1;
localObject2 = this.e[1];
localObject2[1] += 1;
}
if ((((b)localObject1).c > this.c) && (this.f[2] <= 0))
{
this.f[2] = 1;
localObject2 = this.e[2];
localObject2[0] += 1;
}
if ((((b)localObject1).c < -this.c) && (this.f[2] >= 0))
{
this.f[2] = -1;
localObject1 = this.e[2];
localObject1[1] += 1;
}
}
}
else
{
paramSensorEvent = this.e;
int n = paramSensorEvent.length;
i = 0;
j = 0;
if (i < n)
{
localObject1 = paramSensorEvent[i];
int i1 = localObject1.length;
int k = 0;
if (k < i1)
{
int m = j;
if (localObject1[k] >= this.d)
{
if (j != 0)
{
if (this.a != null) {
this.a.a();
}
this.b = new b[''];
this.g = 0;
m = j;
}
}
else
{
k += 1;
j = m;
continue;
}
m = 1;
continue;
}
i += 1;
continue;
}
continue;
}
i += 1;
}
finally {}
}
}
public static abstract interface a
{
public abstract void a();
}
final class b
{
float a;
float b;
float c;
long d;
public b(float paramFloat1, float paramFloat2, float paramFloat3, long paramLong)
{
this.a = paramFloat1;
this.b = paramFloat2;
this.c = paramFloat3;
this.d = paramLong;
}
public final String toString()
{
return "SensorBundle{mXAcc=" + this.a + ", mYAcc=" + this.b + ", mZAcc=" + this.c + ", mTimestamp=" + this.d + '}';
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/internal/c/a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/