dl.java
3.42 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
import android.annotation.TargetApi;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.media.AudioManager;
import android.media.RemoteControlClient;
import android.media.RemoteControlClient.OnPlaybackPositionUpdateListener;
import android.os.SystemClock;
import android.support.annotation.RequiresApi;
import android.util.Log;
@TargetApi(18)
@RequiresApi(18)
public final class dl
{
private static boolean a = true;
public static int a(long paramLong)
{
int j = dk.a(paramLong);
int i = j;
if ((0x100 & paramLong) != 0L) {
i = j | 0x100;
}
return i;
}
public static Object a(dl.a parama)
{
return new dl.b(parama);
}
public static void a(Context paramContext, PendingIntent paramPendingIntent, ComponentName paramComponentName)
{
paramContext = (AudioManager)paramContext.getSystemService("audio");
if (a) {}
try
{
paramContext.registerMediaButtonEventReceiver(paramPendingIntent);
if (!a) {
paramContext.registerMediaButtonEventReceiver(paramComponentName);
}
return;
}
catch (NullPointerException paramPendingIntent)
{
for (;;)
{
Log.w("MediaSessionCompatApi18", "Unable to register media button event receiver with PendingIntent, falling back to ComponentName.");
a = false;
}
}
}
public static void a(Object paramObject, int paramInt, long paramLong1, float paramFloat, long paramLong2)
{
long l2 = 0L;
long l3 = SystemClock.elapsedRealtime();
long l1 = paramLong1;
if (paramInt == 3)
{
l1 = paramLong1;
if (paramLong1 > 0L)
{
l1 = l2;
if (paramLong2 > 0L)
{
paramLong2 = l3 - paramLong2;
l1 = paramLong2;
if (paramFloat > 0.0F)
{
l1 = paramLong2;
if (paramFloat != 1.0F) {
l1 = ((float)paramLong2 * paramFloat);
}
}
}
l1 = paramLong1 + l1;
}
}
paramInt = dk.a(paramInt);
((RemoteControlClient)paramObject).setPlaybackState(paramInt, l1, paramFloat);
}
public static void a(Object paramObject, long paramLong)
{
((RemoteControlClient)paramObject).setTransportControlFlags(a(paramLong));
}
public static void a(Object paramObject1, Object paramObject2)
{
((RemoteControlClient)paramObject1).setPlaybackPositionUpdateListener((RemoteControlClient.OnPlaybackPositionUpdateListener)paramObject2);
}
public static void b(Context paramContext, PendingIntent paramPendingIntent, ComponentName paramComponentName)
{
paramContext = (AudioManager)paramContext.getSystemService("audio");
if (a)
{
paramContext.unregisterMediaButtonEventReceiver(paramPendingIntent);
return;
}
paramContext.unregisterMediaButtonEventReceiver(paramComponentName);
}
public static abstract interface a
{
public abstract void b(long paramLong);
}
static final class b<T extends dl.a>
implements RemoteControlClient.OnPlaybackPositionUpdateListener
{
protected final T a;
public b(T paramT)
{
this.a = paramT;
}
public final void onPlaybackPositionUpdate(long paramLong)
{
this.a.b(paramLong);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/dl.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/