VolumeProviderCompat.java
2.44 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
package android.support.v4.media;
import android.media.VolumeProvider;
import android.os.Build.VERSION;
import android.support.annotation.RestrictTo;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
public abstract class VolumeProviderCompat
{
public static final int VOLUME_CONTROL_ABSOLUTE = 2;
public static final int VOLUME_CONTROL_FIXED = 0;
public static final int VOLUME_CONTROL_RELATIVE = 1;
private final int a;
private final int b;
private int c;
private Callback d;
private Object e;
public VolumeProviderCompat(int paramInt1, int paramInt2, int paramInt3)
{
this.a = paramInt1;
this.b = paramInt2;
this.c = paramInt3;
}
public final int getCurrentVolume()
{
return this.c;
}
public final int getMaxVolume()
{
return this.b;
}
public final int getVolumeControl()
{
return this.a;
}
public Object getVolumeProvider()
{
if ((this.e != null) || (Build.VERSION.SDK_INT < 21)) {
return this.e;
}
this.e = new VolumeProviderCompatApi21.1(this.a, this.b, this.c, new VolumeProviderCompatApi21.Delegate()
{
public final void onAdjustVolume(int paramAnonymousInt)
{
VolumeProviderCompat.this.onAdjustVolume(paramAnonymousInt);
}
public final void onSetVolumeTo(int paramAnonymousInt)
{
VolumeProviderCompat.this.onSetVolumeTo(paramAnonymousInt);
}
});
return this.e;
}
public void onAdjustVolume(int paramInt) {}
public void onSetVolumeTo(int paramInt) {}
public void setCallback(Callback paramCallback)
{
this.d = paramCallback;
}
public final void setCurrentVolume(int paramInt)
{
this.c = paramInt;
Object localObject = getVolumeProvider();
if (localObject != null) {
((VolumeProvider)localObject).setCurrentVolume(paramInt);
}
if (this.d != null) {
this.d.onVolumeChanged(this);
}
}
public static abstract class Callback
{
public abstract void onVolumeChanged(VolumeProviderCompat paramVolumeProviderCompat);
}
@Retention(RetentionPolicy.SOURCE)
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public static @interface ControlType {}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/media/VolumeProviderCompat.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/