AppCompatActivity.java
9.02 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
336
337
338
339
340
341
342
343
344
package android.support.v7.app;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.IdRes;
import android.support.annotation.LayoutRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StyleRes;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.NavUtils;
import android.support.v4.app.TaskStackBuilder;
import android.support.v4.app.TaskStackBuilder.SupportParentable;
import android.support.v4.view.KeyEventCompat;
import android.support.v7.view.ActionMode;
import android.support.v7.view.ActionMode.Callback;
import android.support.v7.widget.Toolbar;
import android.support.v7.widget.VectorEnabledTintResources;
import android.util.DisplayMetrics;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
public class AppCompatActivity
extends FragmentActivity
implements TaskStackBuilder.SupportParentable, ActionBarDrawerToggle.DelegateProvider, AppCompatCallback
{
private AppCompatDelegate n;
private int o = 0;
private boolean p;
private Resources q;
public void addContentView(View paramView, ViewGroup.LayoutParams paramLayoutParams)
{
getDelegate().addContentView(paramView, paramLayoutParams);
}
public boolean dispatchKeyEvent(KeyEvent paramKeyEvent)
{
if ((KeyEventCompat.isCtrlPressed(paramKeyEvent)) && (paramKeyEvent.getUnicodeChar(paramKeyEvent.getMetaState() & 0x8FFF) == 60))
{
int i = paramKeyEvent.getAction();
if (i == 0)
{
ActionBar localActionBar = getSupportActionBar();
if ((localActionBar != null) && (localActionBar.isShowing()) && (localActionBar.requestFocus()))
{
this.p = true;
return true;
}
}
else if ((i == 1) && (this.p))
{
this.p = false;
return true;
}
}
return super.dispatchKeyEvent(paramKeyEvent);
}
public View findViewById(@IdRes int paramInt)
{
return getDelegate().findViewById(paramInt);
}
@NonNull
public AppCompatDelegate getDelegate()
{
if (this.n == null) {
this.n = AppCompatDelegate.create(this, this);
}
return this.n;
}
@Nullable
public ActionBarDrawerToggle.Delegate getDrawerToggleDelegate()
{
return getDelegate().getDrawerToggleDelegate();
}
public MenuInflater getMenuInflater()
{
return getDelegate().getMenuInflater();
}
public Resources getResources()
{
if ((this.q == null) && (VectorEnabledTintResources.shouldBeUsed())) {
this.q = new VectorEnabledTintResources(this, super.getResources());
}
if (this.q == null) {
return super.getResources();
}
return this.q;
}
@Nullable
public ActionBar getSupportActionBar()
{
return getDelegate().getSupportActionBar();
}
@Nullable
public Intent getSupportParentActivityIntent()
{
return NavUtils.getParentActivityIntent(this);
}
public void invalidateOptionsMenu()
{
getDelegate().invalidateOptionsMenu();
}
public void onConfigurationChanged(Configuration paramConfiguration)
{
super.onConfigurationChanged(paramConfiguration);
getDelegate().onConfigurationChanged(paramConfiguration);
if (this.q != null)
{
DisplayMetrics localDisplayMetrics = super.getResources().getDisplayMetrics();
this.q.updateConfiguration(paramConfiguration, localDisplayMetrics);
}
}
public void onContentChanged()
{
onSupportContentChanged();
}
public void onCreate(@Nullable Bundle paramBundle)
{
AppCompatDelegate localAppCompatDelegate = getDelegate();
localAppCompatDelegate.installViewFactory();
localAppCompatDelegate.onCreate(paramBundle);
if ((localAppCompatDelegate.applyDayNight()) && (this.o != 0))
{
if (Build.VERSION.SDK_INT < 23) {
break label55;
}
onApplyThemeResource(getTheme(), this.o, false);
}
for (;;)
{
super.onCreate(paramBundle);
return;
label55:
setTheme(this.o);
}
}
public void onCreateSupportNavigateUpTaskStack(@NonNull TaskStackBuilder paramTaskStackBuilder)
{
paramTaskStackBuilder.addParentStack(this);
}
public void onDestroy()
{
super.onDestroy();
getDelegate().onDestroy();
}
public final boolean onMenuItemSelected(int paramInt, MenuItem paramMenuItem)
{
if (super.onMenuItemSelected(paramInt, paramMenuItem)) {
return true;
}
ActionBar localActionBar = getSupportActionBar();
if ((paramMenuItem.getItemId() == 16908332) && (localActionBar != null) && ((localActionBar.getDisplayOptions() & 0x4) != 0)) {
return onSupportNavigateUp();
}
return false;
}
public boolean onMenuOpened(int paramInt, Menu paramMenu)
{
return super.onMenuOpened(paramInt, paramMenu);
}
public void onPanelClosed(int paramInt, Menu paramMenu)
{
super.onPanelClosed(paramInt, paramMenu);
}
protected void onPostCreate(@Nullable Bundle paramBundle)
{
super.onPostCreate(paramBundle);
getDelegate().onPostCreate(paramBundle);
}
protected void onPostResume()
{
super.onPostResume();
getDelegate().onPostResume();
}
public void onPrepareSupportNavigateUpTaskStack(@NonNull TaskStackBuilder paramTaskStackBuilder) {}
public void onSaveInstanceState(Bundle paramBundle)
{
super.onSaveInstanceState(paramBundle);
getDelegate().onSaveInstanceState(paramBundle);
}
public void onStart()
{
super.onStart();
getDelegate().onStart();
}
public void onStop()
{
super.onStop();
getDelegate().onStop();
}
@CallSuper
public void onSupportActionModeFinished(@NonNull ActionMode paramActionMode) {}
@CallSuper
public void onSupportActionModeStarted(@NonNull ActionMode paramActionMode) {}
@Deprecated
public void onSupportContentChanged() {}
public boolean onSupportNavigateUp()
{
Object localObject = getSupportParentActivityIntent();
if (localObject != null)
{
if (supportShouldUpRecreateTask((Intent)localObject))
{
localObject = TaskStackBuilder.create(this);
onCreateSupportNavigateUpTaskStack((TaskStackBuilder)localObject);
onPrepareSupportNavigateUpTaskStack((TaskStackBuilder)localObject);
((TaskStackBuilder)localObject).startActivities();
}
for (;;)
{
try
{
ActivityCompat.finishAffinity(this);
return true;
}
catch (IllegalStateException localIllegalStateException)
{
finish();
continue;
}
supportNavigateUpTo(localIllegalStateException);
}
}
return false;
}
protected void onTitleChanged(CharSequence paramCharSequence, int paramInt)
{
super.onTitleChanged(paramCharSequence, paramInt);
getDelegate().setTitle(paramCharSequence);
}
@Nullable
public ActionMode onWindowStartingSupportActionMode(@NonNull ActionMode.Callback paramCallback)
{
return null;
}
public void setContentView(@LayoutRes int paramInt)
{
getDelegate().setContentView(paramInt);
}
public void setContentView(View paramView)
{
getDelegate().setContentView(paramView);
}
public void setContentView(View paramView, ViewGroup.LayoutParams paramLayoutParams)
{
getDelegate().setContentView(paramView, paramLayoutParams);
}
public void setSupportActionBar(@Nullable Toolbar paramToolbar)
{
getDelegate().setSupportActionBar(paramToolbar);
}
@Deprecated
public void setSupportProgress(int paramInt) {}
@Deprecated
public void setSupportProgressBarIndeterminate(boolean paramBoolean) {}
@Deprecated
public void setSupportProgressBarIndeterminateVisibility(boolean paramBoolean) {}
@Deprecated
public void setSupportProgressBarVisibility(boolean paramBoolean) {}
public void setTheme(@StyleRes int paramInt)
{
super.setTheme(paramInt);
this.o = paramInt;
}
@Nullable
public ActionMode startSupportActionMode(@NonNull ActionMode.Callback paramCallback)
{
return getDelegate().startSupportActionMode(paramCallback);
}
public void supportInvalidateOptionsMenu()
{
getDelegate().invalidateOptionsMenu();
}
public void supportNavigateUpTo(@NonNull Intent paramIntent)
{
NavUtils.navigateUpTo(this, paramIntent);
}
public boolean supportRequestWindowFeature(int paramInt)
{
return getDelegate().requestWindowFeature(paramInt);
}
public boolean supportShouldUpRecreateTask(@NonNull Intent paramIntent)
{
return NavUtils.shouldUpRecreateTask(this, paramIntent);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v7/app/AppCompatActivity.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/