MediaBrowserServiceCompatApi24.java
3.06 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
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.Result;
import android.support.annotation.RequiresApi;
import android.util.Log;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@TargetApi(24)
@RequiresApi(24)
final class MediaBrowserServiceCompatApi24
{
private static Field a;
static
{
try
{
Field localField = MediaBrowserService.Result.class.getDeclaredField("mFlags");
a = localField;
localField.setAccessible(true);
return;
}
catch (NoSuchFieldException localNoSuchFieldException)
{
Log.w("MBSCompatApi24", localNoSuchFieldException);
}
}
public static Bundle a(Object paramObject)
{
return ((MediaBrowserService)paramObject).getBrowserRootHints();
}
public static Object a(Context paramContext, ServiceCompatProxy paramServiceCompatProxy)
{
return new a(paramContext, paramServiceCompatProxy);
}
public static void a(Object paramObject, String paramString, Bundle paramBundle)
{
((MediaBrowserService)paramObject).notifyChildrenChanged(paramString, paramBundle);
}
public static abstract interface ServiceCompatProxy
extends MediaBrowserServiceCompatApi23.ServiceCompatProxy
{
public abstract void onLoadChildren(String paramString, MediaBrowserServiceCompatApi24.b paramb, Bundle paramBundle);
}
static final class a
extends MediaBrowserServiceCompatApi23.a
{
a(Context paramContext, MediaBrowserServiceCompatApi24.ServiceCompatProxy paramServiceCompatProxy)
{
super(paramServiceCompatProxy);
}
public final void onLoadChildren(String paramString, MediaBrowserService.Result<List<MediaBrowser.MediaItem>> paramResult, Bundle paramBundle)
{
((MediaBrowserServiceCompatApi24.ServiceCompatProxy)this.a).onLoadChildren(paramString, new MediaBrowserServiceCompatApi24.b(paramResult), paramBundle);
}
}
static final class b
{
MediaBrowserService.Result a;
b(MediaBrowserService.Result paramResult)
{
this.a = paramResult;
}
static List<MediaBrowser.MediaItem> a(List<Parcel> paramList)
{
if (paramList == null) {
return null;
}
ArrayList localArrayList = new ArrayList();
paramList = paramList.iterator();
while (paramList.hasNext())
{
Parcel localParcel = (Parcel)paramList.next();
localParcel.setDataPosition(0);
localArrayList.add(MediaBrowser.MediaItem.CREATOR.createFromParcel(localParcel));
localParcel.recycle();
}
return localArrayList;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/media/MediaBrowserServiceCompatApi24.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/