a.java
2.79 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
package com.instabug.library.d.a;
import android.content.Context;
import android.content.IntentFilter;
import android.os.Handler;
import android.support.v4.content.LocalBroadcastManager;
import com.instabug.library.a.c;
import com.instabug.library.a.c.b;
import com.instabug.library.e.d;
import com.instabug.library.u;
import com.instabug.library.util.InstabugSDKLogger;
import java.util.List;
import rx.functions.Action1;
public class a
implements com.instabug.library.a.a.a, com.instabug.library.a.c.a
{
private static a b = null;
com.instabug.library.internal.module.a a;
private Context c;
private Handler d;
private a e;
private LocalBroadcastManager f;
private com.instabug.library.a.a g;
private c h;
private boolean i = false;
private boolean j = false;
private boolean k = false;
private a(Context paramContext)
{
this.c = paramContext;
this.a = new com.instabug.library.internal.module.a();
this.f = LocalBroadcastManager.getInstance(this.c);
}
public static a a(Context paramContext)
{
if (b == null) {
b = new a(paramContext);
}
return b;
}
private void e()
{
this.i = false;
if ((this.d != null) && (this.e != null)) {
this.d.removeCallbacks(this.e);
}
}
private void f()
{
this.h = new c(this);
this.f.registerReceiver(this.h, new IntentFilter("Session state changed"));
}
public void a()
{
InstabugSDKLogger.v(this, "initializing SynchronizationManager");
this.d = new Handler();
this.e = new a((byte)0);
if (u.a().s() != 0L)
{
f();
this.k = true;
}
this.g = new com.instabug.library.a.a(this);
this.f.registerReceiver(this.g, new IntentFilter("User last contact at changed"));
}
public void a(c.b paramb)
{
InstabugSDKLogger.d(this, "SessionStateChanged: " + paramb);
if (paramb == c.b.c) {
e();
}
while (this.j) {
return;
}
b();
}
public void b()
{
this.i = true;
this.d.post(this.e);
}
public void c()
{
InstabugSDKLogger.d(this, "LastContactedAtChanged");
if (!this.k)
{
InstabugSDKLogger.d(this, "Register session state receivers");
this.k = true;
f();
}
if ((u.a().t()) && (!this.j))
{
e();
b();
}
}
public void d()
{
e();
this.d = null;
this.e = null;
this.f.unregisterReceiver(this.g);
this.g = null;
this.f.unregisterReceiver(this.h);
this.h = null;
this.k = false;
}
final class a
implements Runnable
{
private a() {}
public final void run()
{
a.a(a.this, new Action1() {});
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/d/a/a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/