MediaBrowserServiceCompatApi21.java
3.54 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
package android.support.v4.media;
import android.annotation.TargetApi;
import android.content.Context;
import android.media.browse.MediaBrowser.MediaItem;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.service.media.MediaBrowserService;
import android.service.media.MediaBrowserService.BrowserRoot;
import android.service.media.MediaBrowserService.Result;
import android.support.annotation.RequiresApi;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@TargetApi(21)
@RequiresApi(21)
final class MediaBrowserServiceCompatApi21
{
public static void a(Object paramObject, String paramString)
{
((MediaBrowserService)paramObject).notifyChildrenChanged(paramString);
}
public static abstract interface ServiceCompatProxy
{
public abstract MediaBrowserServiceCompatApi21.a onGetRoot(String paramString, int paramInt, Bundle paramBundle);
public abstract void onLoadChildren(String paramString, MediaBrowserServiceCompatApi21.c<List<Parcel>> paramc);
}
static final class a
{
final String a;
final Bundle b;
a(String paramString, Bundle paramBundle)
{
this.a = paramString;
this.b = paramBundle;
}
}
static class b
extends MediaBrowserService
{
final MediaBrowserServiceCompatApi21.ServiceCompatProxy a;
b(Context paramContext, MediaBrowserServiceCompatApi21.ServiceCompatProxy paramServiceCompatProxy)
{
attachBaseContext(paramContext);
this.a = paramServiceCompatProxy;
}
public MediaBrowserService.BrowserRoot onGetRoot(String paramString, int paramInt, Bundle paramBundle)
{
paramString = this.a.onGetRoot(paramString, paramInt, paramBundle);
if (paramString == null) {
return null;
}
return new MediaBrowserService.BrowserRoot(paramString.a, paramString.b);
}
public void onLoadChildren(String paramString, MediaBrowserService.Result<List<MediaBrowser.MediaItem>> paramResult)
{
this.a.onLoadChildren(paramString, new MediaBrowserServiceCompatApi21.c(paramResult));
}
}
static final class c<T>
{
MediaBrowserService.Result a;
c(MediaBrowserService.Result paramResult)
{
this.a = paramResult;
}
public final void a(T paramT)
{
Iterator localIterator = null;
if ((paramT instanceof List))
{
MediaBrowserService.Result localResult = this.a;
Object localObject = (List)paramT;
if (localObject == null) {
paramT = localIterator;
}
for (;;)
{
localResult.sendResult(paramT);
return;
paramT = new ArrayList();
localIterator = ((List)localObject).iterator();
while (localIterator.hasNext())
{
localObject = (Parcel)localIterator.next();
((Parcel)localObject).setDataPosition(0);
paramT.add(MediaBrowser.MediaItem.CREATOR.createFromParcel((Parcel)localObject));
((Parcel)localObject).recycle();
}
}
}
if ((paramT instanceof Parcel))
{
paramT = (Parcel)paramT;
paramT.setDataPosition(0);
this.a.sendResult(MediaBrowser.MediaItem.CREATOR.createFromParcel(paramT));
paramT.recycle();
return;
}
this.a.sendResult(null);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/media/MediaBrowserServiceCompatApi21.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/