TextUtilsCompat.java
2.74 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.text;
import android.os.Build.VERSION;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import java.util.Locale;
public final class TextUtilsCompat
{
public static final Locale ROOT;
static String a;
static String b;
private static final a c;
static
{
if (Build.VERSION.SDK_INT >= 17) {}
for (c = new b();; c = new a())
{
ROOT = new Locale("", "");
a = "Arab";
b = "Hebr";
return;
}
}
public static int getLayoutDirectionFromLocale(@Nullable Locale paramLocale)
{
return c.a(paramLocale);
}
@NonNull
public static String htmlEncode(@NonNull String paramString)
{
return c.a(paramString);
}
static class a
{
public int a(@Nullable Locale paramLocale)
{
int j = 1;
if ((paramLocale != null) && (!paramLocale.equals(TextUtilsCompat.ROOT)))
{
String str = ICUCompat.maximizeAndGetScript(paramLocale);
int i;
if (str == null)
{
i = j;
switch (Character.getDirectionality(paramLocale.getDisplayName(paramLocale).charAt(0)))
{
default:
i = 0;
}
}
do
{
do
{
return i;
i = j;
} while (str.equalsIgnoreCase(TextUtilsCompat.a));
i = j;
} while (str.equalsIgnoreCase(TextUtilsCompat.b));
}
return 0;
}
@NonNull
public String a(@NonNull String paramString)
{
StringBuilder localStringBuilder = new StringBuilder();
int i = 0;
if (i < paramString.length())
{
char c = paramString.charAt(i);
switch (c)
{
default:
localStringBuilder.append(c);
}
for (;;)
{
i += 1;
break;
localStringBuilder.append("<");
continue;
localStringBuilder.append(">");
continue;
localStringBuilder.append("&");
continue;
localStringBuilder.append("'");
continue;
localStringBuilder.append(""");
}
}
return localStringBuilder.toString();
}
}
static final class b
extends TextUtilsCompat.a
{
public final int a(@Nullable Locale paramLocale)
{
return TextUtils.getLayoutDirectionFromLocale(paramLocale);
}
@NonNull
public final String a(@NonNull String paramString)
{
return TextUtils.htmlEncode(paramString);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/text/TextUtilsCompat.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/