fd.java
9.25 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources.NotFoundException;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarDrawerToggle.Delegate;
import android.support.v7.app.AppCompatCallback;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.appcompat.R.attr;
import android.support.v7.view.ActionMode;
import android.support.v7.view.ActionMode.Callback;
import android.support.v7.view.SupportMenuInflater;
import android.support.v7.view.WindowCallbackWrapper;
import android.support.v7.view.menu.MenuBuilder;
import android.support.v7.widget.TintTypedArray;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.Window;
import android.view.Window.Callback;
@TargetApi(9)
@RequiresApi(9)
public abstract class fd
extends AppCompatDelegate
{
private static boolean o;
private static final boolean p;
private static final int[] q;
protected final Context a;
public final Window b;
protected final Window.Callback c;
protected final Window.Callback d;
public final AppCompatCallback e;
protected ActionBar f;
protected MenuInflater g;
public boolean h;
protected boolean i;
protected boolean j;
protected boolean k;
protected boolean l;
protected CharSequence m;
public boolean n;
private boolean r;
static
{
if (Build.VERSION.SDK_INT < 21) {}
for (boolean bool = true;; bool = false)
{
p = bool;
if ((bool) && (!o))
{
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler()
{
public final void uncaughtException(Thread paramAnonymousThread, Throwable paramAnonymousThrowable)
{
int j = 0;
int i = j;
Object localObject;
if ((paramAnonymousThrowable instanceof Resources.NotFoundException))
{
localObject = paramAnonymousThrowable.getMessage();
i = j;
if (localObject != null) {
if (!((String)localObject).contains("drawable"))
{
i = j;
if (!((String)localObject).contains("Drawable")) {}
}
else
{
i = 1;
}
}
}
if (i != 0)
{
localObject = new Resources.NotFoundException(paramAnonymousThrowable.getMessage() + ". If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info.");
((Throwable)localObject).initCause(paramAnonymousThrowable.getCause());
((Throwable)localObject).setStackTrace(paramAnonymousThrowable.getStackTrace());
this.a.uncaughtException(paramAnonymousThread, (Throwable)localObject);
return;
}
this.a.uncaughtException(paramAnonymousThread, paramAnonymousThrowable);
}
});
o = true;
}
q = new int[] { 16842836 };
return;
}
}
protected fd(Context paramContext, Window paramWindow, AppCompatCallback paramAppCompatCallback)
{
this.a = paramContext;
this.b = paramWindow;
this.e = paramAppCompatCallback;
this.c = this.b.getCallback();
if ((this.c instanceof fd.b)) {
throw new IllegalStateException("AppCompat has already installed itself into the Window");
}
this.d = a(this.c);
this.b.setCallback(this.d);
paramContext = TintTypedArray.obtainStyledAttributes(paramContext, null, q);
paramWindow = paramContext.getDrawableIfKnown(0);
if (paramWindow != null) {
this.b.setBackgroundDrawable(paramWindow);
}
paramContext.recycle();
}
public abstract ActionMode a(ActionMode.Callback paramCallback);
Window.Callback a(Window.Callback paramCallback)
{
return new fd.b(paramCallback);
}
public abstract void a();
public abstract void a(int paramInt);
public abstract void a(CharSequence paramCharSequence);
public abstract boolean a(int paramInt, KeyEvent paramKeyEvent);
public abstract boolean a(KeyEvent paramKeyEvent);
public boolean applyDayNight()
{
return false;
}
protected final Context b()
{
Context localContext = null;
Object localObject = getSupportActionBar();
if (localObject != null) {
localContext = ((ActionBar)localObject).getThemedContext();
}
localObject = localContext;
if (localContext == null) {
localObject = this.a;
}
return (Context)localObject;
}
public abstract boolean b(int paramInt);
public final ActionBarDrawerToggle.Delegate getDrawerToggleDelegate()
{
return new fd.a();
}
public MenuInflater getMenuInflater()
{
if (this.g == null)
{
a();
if (this.f == null) {
break label43;
}
}
label43:
for (Context localContext = this.f.getThemedContext();; localContext = this.a)
{
this.g = new SupportMenuInflater(localContext);
return this.g;
}
}
public ActionBar getSupportActionBar()
{
a();
return this.f;
}
public boolean isHandleNativeActionModesEnabled()
{
return false;
}
public void onDestroy()
{
this.n = true;
}
public void onSaveInstanceState(Bundle paramBundle) {}
public void onStart()
{
this.r = true;
}
public void onStop()
{
this.r = false;
}
public void setHandleNativeActionModesEnabled(boolean paramBoolean) {}
public void setLocalNightMode(int paramInt) {}
public final void setTitle(CharSequence paramCharSequence)
{
this.m = paramCharSequence;
a(paramCharSequence);
}
final class a
implements ActionBarDrawerToggle.Delegate
{
a() {}
public final Context getActionBarThemedContext()
{
return fd.this.b();
}
public final Drawable getThemeUpIndicator()
{
TintTypedArray localTintTypedArray = TintTypedArray.obtainStyledAttributes(getActionBarThemedContext(), null, new int[] { R.attr.homeAsUpIndicator });
Drawable localDrawable = localTintTypedArray.getDrawable(0);
localTintTypedArray.recycle();
return localDrawable;
}
public final boolean isNavigationVisible()
{
ActionBar localActionBar = fd.this.getSupportActionBar();
return (localActionBar != null) && ((localActionBar.getDisplayOptions() & 0x4) != 0);
}
public final void setActionBarDescription(int paramInt)
{
ActionBar localActionBar = fd.this.getSupportActionBar();
if (localActionBar != null) {
localActionBar.setHomeActionContentDescription(paramInt);
}
}
public final void setActionBarUpIndicator(Drawable paramDrawable, int paramInt)
{
ActionBar localActionBar = fd.this.getSupportActionBar();
if (localActionBar != null)
{
localActionBar.setHomeAsUpIndicator(paramDrawable);
localActionBar.setHomeActionContentDescription(paramInt);
}
}
}
class b
extends WindowCallbackWrapper
{
b(Window.Callback paramCallback)
{
super();
}
public boolean dispatchKeyEvent(KeyEvent paramKeyEvent)
{
return (fd.this.a(paramKeyEvent)) || (super.dispatchKeyEvent(paramKeyEvent));
}
public boolean dispatchKeyShortcutEvent(KeyEvent paramKeyEvent)
{
return (super.dispatchKeyShortcutEvent(paramKeyEvent)) || (fd.this.a(paramKeyEvent.getKeyCode(), paramKeyEvent));
}
public void onContentChanged() {}
public boolean onCreatePanelMenu(int paramInt, Menu paramMenu)
{
if ((paramInt == 0) && (!(paramMenu instanceof MenuBuilder))) {
return false;
}
return super.onCreatePanelMenu(paramInt, paramMenu);
}
public boolean onMenuOpened(int paramInt, Menu paramMenu)
{
super.onMenuOpened(paramInt, paramMenu);
fd.this.b(paramInt);
return true;
}
public void onPanelClosed(int paramInt, Menu paramMenu)
{
super.onPanelClosed(paramInt, paramMenu);
fd.this.a(paramInt);
}
public boolean onPreparePanel(int paramInt, View paramView, Menu paramMenu)
{
MenuBuilder localMenuBuilder;
boolean bool1;
if ((paramMenu instanceof MenuBuilder))
{
localMenuBuilder = (MenuBuilder)paramMenu;
if ((paramInt != 0) || (localMenuBuilder != null)) {
break label34;
}
bool1 = false;
}
label34:
boolean bool2;
do
{
return bool1;
localMenuBuilder = null;
break;
if (localMenuBuilder != null) {
localMenuBuilder.setOverrideVisibleItems(true);
}
bool2 = super.onPreparePanel(paramInt, paramView, paramMenu);
bool1 = bool2;
} while (localMenuBuilder == null);
localMenuBuilder.setOverrideVisibleItems(false);
return bool2;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/fd.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/