ResultReceiver.java
2.41 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
package android.support.v4.os;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import android.os.RemoteException;
import android.support.annotation.RestrictTo;
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public class ResultReceiver
implements Parcelable
{
public static final Parcelable.Creator<ResultReceiver> CREATOR = new Parcelable.Creator() {};
final boolean a;
final Handler b;
IResultReceiver c;
public ResultReceiver(Handler paramHandler)
{
this.a = true;
this.b = paramHandler;
}
ResultReceiver(Parcel paramParcel)
{
this.a = false;
this.b = null;
this.c = IResultReceiver.Stub.asInterface(paramParcel.readStrongBinder());
}
public int describeContents()
{
return 0;
}
public void onReceiveResult(int paramInt, Bundle paramBundle) {}
public void send(int paramInt, Bundle paramBundle)
{
if (this.a) {
if (this.b != null) {
this.b.post(new b(paramInt, paramBundle));
}
}
while (this.c == null)
{
return;
onReceiveResult(paramInt, paramBundle);
return;
}
try
{
this.c.send(paramInt, paramBundle);
return;
}
catch (RemoteException paramBundle) {}
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
try
{
if (this.c == null) {
this.c = new a();
}
paramParcel.writeStrongBinder(this.c.asBinder());
return;
}
finally {}
}
final class a
extends IResultReceiver.Stub
{
a() {}
public final void send(int paramInt, Bundle paramBundle)
{
if (ResultReceiver.this.b != null)
{
ResultReceiver.this.b.post(new ResultReceiver.b(ResultReceiver.this, paramInt, paramBundle));
return;
}
ResultReceiver.this.onReceiveResult(paramInt, paramBundle);
}
}
final class b
implements Runnable
{
final int a;
final Bundle b;
b(int paramInt, Bundle paramBundle)
{
this.a = paramInt;
this.b = paramBundle;
}
public final void run()
{
ResultReceiver.this.onReceiveResult(this.a, this.b);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/os/ResultReceiver.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/