RemoteInput.java
5.21 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
204
205
package android.support.v4.app;
import android.content.ClipData;
import android.content.ClipData.Item;
import android.content.ClipDescription;
import android.content.Intent;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.support.annotation.RestrictTo;
import android.util.Log;
import cv;
import cw;
public final class RemoteInput
extends RemoteInputCompatBase.RemoteInput
{
public static final String EXTRA_RESULTS_DATA = "android.remoteinput.resultsData";
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public static final RemoteInputCompatBase.RemoteInput.Factory FACTORY;
public static final String RESULTS_CLIP_LABEL = "android.remoteinput.results";
private static final a f;
private final String a;
private final CharSequence b;
private final CharSequence[] c;
private final boolean d;
private final Bundle e;
static
{
if (Build.VERSION.SDK_INT >= 20) {
f = new b();
}
for (;;)
{
FACTORY = new RemoteInputCompatBase.RemoteInput.Factory() {};
return;
if (Build.VERSION.SDK_INT >= 16) {
f = new d();
} else {
f = new c();
}
}
}
RemoteInput(String paramString, CharSequence paramCharSequence, CharSequence[] paramArrayOfCharSequence, boolean paramBoolean, Bundle paramBundle)
{
this.a = paramString;
this.b = paramCharSequence;
this.c = paramArrayOfCharSequence;
this.d = paramBoolean;
this.e = paramBundle;
}
public static void addResultsToIntent(RemoteInput[] paramArrayOfRemoteInput, Intent paramIntent, Bundle paramBundle)
{
f.a(paramArrayOfRemoteInput, paramIntent, paramBundle);
}
public static Bundle getResultsFromIntent(Intent paramIntent)
{
return f.a(paramIntent);
}
public final boolean getAllowFreeFormInput()
{
return this.d;
}
public final CharSequence[] getChoices()
{
return this.c;
}
public final Bundle getExtras()
{
return this.e;
}
public final CharSequence getLabel()
{
return this.b;
}
public final String getResultKey()
{
return this.a;
}
public static final class Builder
{
private final String a;
private CharSequence b;
private CharSequence[] c;
private boolean d = true;
private Bundle e = new Bundle();
public Builder(String paramString)
{
if (paramString == null) {
throw new IllegalArgumentException("Result key can't be null");
}
this.a = paramString;
}
public final Builder addExtras(Bundle paramBundle)
{
if (paramBundle != null) {
this.e.putAll(paramBundle);
}
return this;
}
public final RemoteInput build()
{
return new RemoteInput(this.a, this.b, this.c, this.d, this.e);
}
public final Bundle getExtras()
{
return this.e;
}
public final Builder setAllowFreeFormInput(boolean paramBoolean)
{
this.d = paramBoolean;
return this;
}
public final Builder setChoices(CharSequence[] paramArrayOfCharSequence)
{
this.c = paramArrayOfCharSequence;
return this;
}
public final Builder setLabel(CharSequence paramCharSequence)
{
this.b = paramCharSequence;
return this;
}
}
static abstract interface a
{
public abstract Bundle a(Intent paramIntent);
public abstract void a(RemoteInput[] paramArrayOfRemoteInput, Intent paramIntent, Bundle paramBundle);
}
static final class b
implements RemoteInput.a
{
public final Bundle a(Intent paramIntent)
{
return android.app.RemoteInput.getResultsFromIntent(paramIntent);
}
public final void a(RemoteInput[] paramArrayOfRemoteInput, Intent paramIntent, Bundle paramBundle)
{
android.app.RemoteInput.addResultsToIntent(cv.a(paramArrayOfRemoteInput), paramIntent, paramBundle);
}
}
static final class c
implements RemoteInput.a
{
public final Bundle a(Intent paramIntent)
{
Log.w("RemoteInput", "RemoteInput is only supported from API Level 16");
return null;
}
public final void a(RemoteInput[] paramArrayOfRemoteInput, Intent paramIntent, Bundle paramBundle)
{
Log.w("RemoteInput", "RemoteInput is only supported from API Level 16");
}
}
static final class d
implements RemoteInput.a
{
public final Bundle a(Intent paramIntent)
{
paramIntent = paramIntent.getClipData();
if (paramIntent != null)
{
ClipDescription localClipDescription = paramIntent.getDescription();
if ((localClipDescription.hasMimeType("text/vnd.android.intent")) && (localClipDescription.getLabel().equals("android.remoteinput.results"))) {
return (Bundle)paramIntent.getItemAt(0).getIntent().getExtras().getParcelable("android.remoteinput.resultsData");
}
}
return null;
}
public final void a(RemoteInput[] paramArrayOfRemoteInput, Intent paramIntent, Bundle paramBundle)
{
cw.a(paramArrayOfRemoteInput, paramIntent, paramBundle);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/app/RemoteInput.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/