ConfigurationHelper.java
2.62 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
package android.support.v4.content.res;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build.VERSION;
import android.support.annotation.NonNull;
import android.util.DisplayMetrics;
import cy;
public final class ConfigurationHelper
{
private static final a a = new b();
static
{
int i = Build.VERSION.SDK_INT;
if (i >= 17)
{
a = new d();
return;
}
if (i >= 13)
{
a = new c();
return;
}
}
public static int getDensityDpi(@NonNull Resources paramResources)
{
return a.d(paramResources);
}
public static int getScreenHeightDp(@NonNull Resources paramResources)
{
return a.a(paramResources);
}
public static int getScreenWidthDp(@NonNull Resources paramResources)
{
return a.b(paramResources);
}
public static int getSmallestScreenWidthDp(@NonNull Resources paramResources)
{
return a.c(paramResources);
}
static abstract interface a
{
public abstract int a(@NonNull Resources paramResources);
public abstract int b(@NonNull Resources paramResources);
public abstract int c(@NonNull Resources paramResources);
public abstract int d(@NonNull Resources paramResources);
}
static class b
implements ConfigurationHelper.a
{
public int a(@NonNull Resources paramResources)
{
return cy.a(paramResources);
}
public int b(@NonNull Resources paramResources)
{
return cy.b(paramResources);
}
public int c(@NonNull Resources paramResources)
{
return Math.min(cy.b(paramResources), cy.a(paramResources));
}
public int d(@NonNull Resources paramResources)
{
return paramResources.getDisplayMetrics().densityDpi;
}
}
static class c
extends ConfigurationHelper.b
{
public final int a(@NonNull Resources paramResources)
{
return paramResources.getConfiguration().screenHeightDp;
}
public final int b(@NonNull Resources paramResources)
{
return paramResources.getConfiguration().screenWidthDp;
}
public final int c(@NonNull Resources paramResources)
{
return paramResources.getConfiguration().smallestScreenWidthDp;
}
}
static final class d
extends ConfigurationHelper.c
{
public final int d(@NonNull Resources paramResources)
{
return paramResources.getConfiguration().densityDpi;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/content/res/ConfigurationHelper.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/