MediaDescriptionCompat.java
9.25 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
package android.support.v4.media;
import android.graphics.Bitmap;
import android.media.MediaDescription;
import android.media.MediaDescription.Builder;
import android.net.Uri;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.text.TextUtils;
public final class MediaDescriptionCompat
implements Parcelable
{
public static final long BT_FOLDER_TYPE_ALBUMS = 2L;
public static final long BT_FOLDER_TYPE_ARTISTS = 3L;
public static final long BT_FOLDER_TYPE_GENRES = 4L;
public static final long BT_FOLDER_TYPE_MIXED = 0L;
public static final long BT_FOLDER_TYPE_PLAYLISTS = 5L;
public static final long BT_FOLDER_TYPE_TITLES = 1L;
public static final long BT_FOLDER_TYPE_YEARS = 6L;
public static final Parcelable.Creator<MediaDescriptionCompat> CREATOR = new Parcelable.Creator() {};
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public static final String DESCRIPTION_KEY_MEDIA_URI = "android.support.v4.media.description.MEDIA_URI";
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public static final String DESCRIPTION_KEY_NULL_BUNDLE_FLAG = "android.support.v4.media.description.NULL_BUNDLE_FLAG";
public static final String EXTRA_BT_FOLDER_TYPE = "android.media.extra.BT_FOLDER_TYPE";
private final String a;
private final CharSequence b;
private final CharSequence c;
private final CharSequence d;
private final Bitmap e;
private final Uri f;
private final Bundle g;
private final Uri h;
private Object i;
MediaDescriptionCompat(Parcel paramParcel)
{
this.a = paramParcel.readString();
this.b = ((CharSequence)TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(paramParcel));
this.c = ((CharSequence)TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(paramParcel));
this.d = ((CharSequence)TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(paramParcel));
this.e = ((Bitmap)paramParcel.readParcelable(null));
this.f = ((Uri)paramParcel.readParcelable(null));
this.g = paramParcel.readBundle();
this.h = ((Uri)paramParcel.readParcelable(null));
}
MediaDescriptionCompat(String paramString, CharSequence paramCharSequence1, CharSequence paramCharSequence2, CharSequence paramCharSequence3, Bitmap paramBitmap, Uri paramUri1, Bundle paramBundle, Uri paramUri2)
{
this.a = paramString;
this.b = paramCharSequence1;
this.c = paramCharSequence2;
this.d = paramCharSequence3;
this.e = paramBitmap;
this.f = paramUri1;
this.g = paramBundle;
this.h = paramUri2;
}
public static MediaDescriptionCompat fromMediaDescription(Object paramObject)
{
if ((paramObject == null) || (Build.VERSION.SDK_INT < 21)) {
return null;
}
Builder localBuilder = new Builder();
localBuilder.setMediaId(((MediaDescription)paramObject).getMediaId());
localBuilder.setTitle(((MediaDescription)paramObject).getTitle());
localBuilder.setSubtitle(((MediaDescription)paramObject).getSubtitle());
localBuilder.setDescription(((MediaDescription)paramObject).getDescription());
localBuilder.setIconBitmap(((MediaDescription)paramObject).getIconBitmap());
localBuilder.setIconUri(((MediaDescription)paramObject).getIconUri());
Bundle localBundle = ((MediaDescription)paramObject).getExtras();
Object localObject;
if (localBundle == null)
{
localObject = null;
if (localObject == null) {
break label184;
}
if ((!localBundle.containsKey("android.support.v4.media.description.NULL_BUNDLE_FLAG")) || (localBundle.size() != 2)) {
break label172;
}
localBundle = null;
label131:
localBuilder.setExtras(localBundle);
if (localObject == null) {
break label187;
}
localBuilder.setMediaUri((Uri)localObject);
}
for (;;)
{
localObject = localBuilder.build();
((MediaDescriptionCompat)localObject).i = paramObject;
return (MediaDescriptionCompat)localObject;
localObject = (Uri)localBundle.getParcelable("android.support.v4.media.description.MEDIA_URI");
break;
label172:
localBundle.remove("android.support.v4.media.description.MEDIA_URI");
localBundle.remove("android.support.v4.media.description.NULL_BUNDLE_FLAG");
label184:
break label131;
label187:
if (Build.VERSION.SDK_INT >= 23) {
localBuilder.setMediaUri(((MediaDescription)paramObject).getMediaUri());
}
}
}
public final int describeContents()
{
return 0;
}
@Nullable
public final CharSequence getDescription()
{
return this.d;
}
@Nullable
public final Bundle getExtras()
{
return this.g;
}
@Nullable
public final Bitmap getIconBitmap()
{
return this.e;
}
@Nullable
public final Uri getIconUri()
{
return this.f;
}
public final Object getMediaDescription()
{
if ((this.i != null) || (Build.VERSION.SDK_INT < 21)) {
return this.i;
}
MediaDescription.Builder localBuilder = new MediaDescription.Builder();
Object localObject = this.a;
((MediaDescription.Builder)localBuilder).setMediaId((String)localObject);
localObject = this.b;
((MediaDescription.Builder)localBuilder).setTitle((CharSequence)localObject);
localObject = this.c;
((MediaDescription.Builder)localBuilder).setSubtitle((CharSequence)localObject);
localObject = this.d;
((MediaDescription.Builder)localBuilder).setDescription((CharSequence)localObject);
localObject = this.e;
((MediaDescription.Builder)localBuilder).setIconBitmap((Bitmap)localObject);
localObject = this.f;
((MediaDescription.Builder)localBuilder).setIconUri((Uri)localObject);
Bundle localBundle = this.g;
if ((Build.VERSION.SDK_INT < 23) && (this.h != null))
{
localObject = localBundle;
if (localBundle == null)
{
localObject = new Bundle();
((Bundle)localObject).putBoolean("android.support.v4.media.description.NULL_BUNDLE_FLAG", true);
}
((Bundle)localObject).putParcelable("android.support.v4.media.description.MEDIA_URI", this.h);
}
for (;;)
{
((MediaDescription.Builder)localBuilder).setExtras((Bundle)localObject);
if (Build.VERSION.SDK_INT >= 23)
{
localObject = this.h;
((MediaDescription.Builder)localBuilder).setMediaUri((Uri)localObject);
}
this.i = ((MediaDescription.Builder)localBuilder).build();
return this.i;
localObject = localBundle;
}
}
@Nullable
public final String getMediaId()
{
return this.a;
}
@Nullable
public final Uri getMediaUri()
{
return this.h;
}
@Nullable
public final CharSequence getSubtitle()
{
return this.c;
}
@Nullable
public final CharSequence getTitle()
{
return this.b;
}
public final String toString()
{
return this.b + ", " + this.c + ", " + this.d;
}
public final void writeToParcel(Parcel paramParcel, int paramInt)
{
if (Build.VERSION.SDK_INT < 21)
{
paramParcel.writeString(this.a);
TextUtils.writeToParcel(this.b, paramParcel, paramInt);
TextUtils.writeToParcel(this.c, paramParcel, paramInt);
TextUtils.writeToParcel(this.d, paramParcel, paramInt);
paramParcel.writeParcelable(this.e, paramInt);
paramParcel.writeParcelable(this.f, paramInt);
paramParcel.writeBundle(this.g);
paramParcel.writeParcelable(this.h, paramInt);
return;
}
((MediaDescription)getMediaDescription()).writeToParcel(paramParcel, paramInt);
}
public static final class Builder
{
private String a;
private CharSequence b;
private CharSequence c;
private CharSequence d;
private Bitmap e;
private Uri f;
private Bundle g;
private Uri h;
public final MediaDescriptionCompat build()
{
return new MediaDescriptionCompat(this.a, this.b, this.c, this.d, this.e, this.f, this.g, this.h);
}
public final Builder setDescription(@Nullable CharSequence paramCharSequence)
{
this.d = paramCharSequence;
return this;
}
public final Builder setExtras(@Nullable Bundle paramBundle)
{
this.g = paramBundle;
return this;
}
public final Builder setIconBitmap(@Nullable Bitmap paramBitmap)
{
this.e = paramBitmap;
return this;
}
public final Builder setIconUri(@Nullable Uri paramUri)
{
this.f = paramUri;
return this;
}
public final Builder setMediaId(@Nullable String paramString)
{
this.a = paramString;
return this;
}
public final Builder setMediaUri(@Nullable Uri paramUri)
{
this.h = paramUri;
return this;
}
public final Builder setSubtitle(@Nullable CharSequence paramCharSequence)
{
this.c = paramCharSequence;
return this;
}
public final Builder setTitle(@Nullable CharSequence paramCharSequence)
{
this.b = paramCharSequence;
return this;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/media/MediaDescriptionCompat.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/