d.java
3.11 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
package com.instabug.library.e.a;
import android.content.Context;
import com.instabug.library.e.a;
import com.instabug.library.e.a.a;
import com.instabug.library.e.c;
import com.instabug.library.e.c.a;
import com.instabug.library.e.c.b;
import com.instabug.library.e.c.c;
import com.instabug.library.e.c.d;
import com.instabug.library.model.e;
import com.instabug.library.model.e.a;
import com.instabug.library.util.InstabugSDKLogger;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import org.json.JSONException;
import rx.Observable;
import rx.Subscriber;
public class d
{
private static d a;
private a b = new a();
public static d a()
{
if (a == null) {
a = new d();
}
return a;
}
public void a(final Context paramContext, com.instabug.library.model.d paramd, final c.a<String, Throwable> parama)
throws JSONException, IOException
{
InstabugSDKLogger.d(this, "Reporting issue");
c localc = this.b.a(paramContext, c.b.a, c.d.b);
localc.a(paramd.c());
this.b.a(localc).subscribe(new Subscriber()
{
public final void onCompleted()
{
InstabugSDKLogger.d(this, "reportIssue request completed");
}
public final void onError(Throwable paramAnonymousThrowable)
{
InstabugSDKLogger.d(this, "reportIssue request got error: " + paramAnonymousThrowable.getMessage());
parama.a(paramAnonymousThrowable);
}
public final void onStart()
{
InstabugSDKLogger.d(this, "reportIssue request started");
}
});
}
public void b(Context paramContext, final com.instabug.library.model.d paramd, final c.a<Boolean, com.instabug.library.model.d> parama)
throws JSONException, FileNotFoundException
{
InstabugSDKLogger.d(this, "Uploading issue attachments");
Observable[] arrayOfObservable = new Observable[paramd.b().size()];
int i = 0;
while (i < arrayOfObservable.length)
{
e locale = (e)paramd.b().get(i);
c localc = this.b.a(paramContext, c.b.b, c.d.b, a.a.b);
localc.a("issue_occurrence_id", locale.c());
localc.a("file_type", locale.b().toString());
localc.a(new c.c("file", locale.d(), locale.e(), locale.a()));
arrayOfObservable[i] = this.b.a(localc);
i += 1;
}
Observable.merge(arrayOfObservable, 1).subscribe(new Subscriber()
{
public final void onCompleted()
{
InstabugSDKLogger.d(this, "uploadIssueAttachment request completed");
if (paramd.b().size() == 0) {
parama.b(Boolean.valueOf(true));
}
}
public final void onError(Throwable paramAnonymousThrowable)
{
InstabugSDKLogger.d(this, "uploadIssueAttachment request got error: " + paramAnonymousThrowable.getMessage());
parama.a(paramd);
}
public final void onStart()
{
InstabugSDKLogger.d(this, "uploadIssueAttachment request started");
}
});
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/e/a/d.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/