现在的位置: 首页 > 移动开发> 正文
AIR for Android 之源码和实现原理分析
2011年07月02日 移动开发 评论数 11 ⁄ 被围观 16,951+

airbootstap.jar 的实现机制简单来说其实就是: 

 通过继承Android的Activity来实现一个新的Activity(AppEntry),它通过“com.adobe.air.AndroidActivityWrapper” 封装实现了Android中Activity本身的方法,例如onResume,onPause等等,废话不说,直接上源码,相信大家浏览过一遍 就基本清楚了。

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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
package air.app;
 
import java.lang.reflect.Method;
import java.net.URISyntaxException;
 
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Process;
import android.util.AttributeSet;
import android.view.ContextMenu;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import dalvik.system.DexClassLoader;
 
public class AppEntry extends Activity {
 private static final String LOG_TAG = "AppEntry";
 private static String RUNTIME_PACKAGE_ID = "com.adobe.air";
 private static Object sAndroidActivityWrapper = null;
 private static Class<?> sAndroidActivityWrapperClass;
 private static boolean sDexLoaded = false;
 private static DexClassLoader sDloader;
 
 /**
  * Activity 的 启动函数,用来初始化Adobe AIR的环境
  * */
 public void onCreate(Bundle paramBundle) {
  super.onCreate(paramBundle);
  if (!isRuntimeInstalled()) {
   showDialog();
  } else {
   loadDexAndCreateActivityWrapper();
   if (!sDexLoaded) {
    launchAIRService();
   } else {
    InvokeWrapperOnCreate();
   }
  }
 }
 
 /**
  * 执行指定的方法:paramMethod为方法名,paramArrayOfObject为方法的参数
  *
  * */
 private Object InvokeMethod(Method paramMethod, Object[] paramArrayOfObject) {
  Object localObject1 = null;
  if (!sDexLoaded) {
   return localObject1;
  }
 
  try {
   if (paramArrayOfObject != null) {
    localObject1 = paramMethod.invoke(sAndroidActivityWrapper,
      paramArrayOfObject);
   } else {
    Object[] arrayOfObject = new Object[0];
    localObject1 = paramMethod.invoke(sAndroidActivityWrapper,
      arrayOfObject);
   }
  } catch (Exception localException) {
  }
  return localObject1;
 }
 
 /**
  * 主要用来初始化Activity的包装类 sAndroidActivityWrapperClass, 后续的方法调用都是通过它来的
  * */
 private void InvokeWrapperOnCreate() {
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Activity.class;
   arrayOfClass[1] = String[].class;
   Method localMethod = localClass.getMethod("onCreate", arrayOfClass);
   Boolean localBoolean1 = new Boolean(false);
   Boolean localBoolean2 = new Boolean(true);
   String[] arrayOfString = new String[5];
   arrayOfString[0] = "";
   arrayOfString[1] = "";
   arrayOfString[2] = "-nodebug";
   arrayOfString[3] = localBoolean1.toString();
   arrayOfString[4] = localBoolean2.toString();
 
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = this;
   arrayOfObject[1] = arrayOfString;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 private static void KillSelf() {
  Process.killProcess(Process.myPid());
 }
 
 /**
  * 用来启动Adobe AIR service服务
  * */
 private void launchAIRService() {
  try {
   Intent localIntent1 = new Intent("com.adobe.air.AIRServiceAction");
   localIntent1.setClassName(RUNTIME_PACKAGE_ID,
     "com.adobe.air.AIRService");
 
   bindService(localIntent1, new ServiceConnection() {
 
    @Override
    public void onServiceConnected(ComponentName arg0, IBinder arg1) {
     unbindService(this);
     loadDexAndCreateActivityWrapper();
     if (AppEntry.sDexLoaded) {
      InvokeWrapperOnCreate();
     } else {
      AppEntry.KillSelf();
     }
    }
 
    @Override
    public void onServiceDisconnected(ComponentName arg0) {
    }
 
   }, 1);
  } catch (Exception localException) {
  }
 }
 
 /**
  * 启动Android Market 来下载 Adobe AIR for Android 的apk程序
  * */
 private void launchMarketPlaceForAIR() {
  String str2 = null;
  try {
   PackageManager localPackageManager = getPackageManager();
   ComponentName localComponentName = getComponentName();
   Bundle localBundle = localPackageManager.getActivityInfo(
     localComponentName, 128).metaData;
   if (localBundle != null) {
    str2 = (String) localBundle.get("airDownloadURL");
   }
  } catch (android.content.pm.PackageManager.NameNotFoundException namenotfoundexception) {
  }
 
  if (str2 == null) {
   StringBuilder localStringBuilder = new StringBuilder()
     .append("market://details?id=");
   str2 = localStringBuilder.append(RUNTIME_PACKAGE_ID).toString();
  }
  BroadcastIntent("android.intent.action.VIEW", str2);
 }
 
 /**
  * 创建 DexClassLoader, sAndroidActivityWrapperClass 和 初始化
  * sAndroidActivityWrapper(通过调用方法CreateAndroidActivityWrapper)
  * */
 private void loadDexAndCreateActivityWrapper() {
  try {
   if (!sDexLoaded) {
    Context localContext = createPackageContext(RUNTIME_PACKAGE_ID,
      3);
    String str2 = RUNTIME_PACKAGE_ID;
    String str3 = getFilesDir().getAbsolutePath();
    ClassLoader localClassLoader = localContext.getClassLoader();
    sDloader = new DexClassLoader(str2, str3, null,
      localClassLoader);
    sAndroidActivityWrapperClass = sDloader
      .loadClass("com.adobe.air.AndroidActivityWrapper");
    if (sAndroidActivityWrapperClass != null) {
     sDexLoaded = true;
    }
   }
 
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Activity.class;
   Method localMethod = localClass.getMethod(
     "CreateAndroidActivityWrapper", arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = this;
   sAndroidActivityWrapper = localMethod.invoke(null, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 /**
  * 用来启动 Activity
  * */
 public void BroadcastIntent(String paramString1, String paramString2) {
  try {
   Intent localIntent = Intent.parseUri(paramString2, 0)
     .setAction(paramString1).addFlags(268435456);
   startActivity(localIntent);
  } catch (ActivityNotFoundException localActivityNotFoundException) {
  } catch (URISyntaxException localURISyntaxException) {
  }
 }
 
 public void finishActivityFromChild(Activity paramActivity, int paramInt) {
  super.finishActivityFromChild(paramActivity, paramInt);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Activity.class;
   arrayOfClass[1] = Integer.TYPE;
   Method localMethod = localClass1.getMethod(
     "finishActivityFromChild", arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramActivity;
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[1] = localInteger;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void finishFromChild(Activity paramActivity) {
  super.finishFromChild(paramActivity);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Activity.class;
   Method localMethod = localClass.getMethod("finishFromChild",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramActivity;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 /**
  * 通过 getPackageInfo 的方法来测试 Adobe AIR 环境是否ready,如果抛出异常, 说明Adobe
  * AIR的相关软件还没有安装
  * */
 public boolean isRuntimeInstalled() {
  PackageManager localPackageManager = getPackageManager();
  int i;
  try {
   PackageInfo localPackageInfo = localPackageManager.getPackageInfo(
     RUNTIME_PACKAGE_ID, 256);
   i = 1;
  } catch (PackageManager.NameNotFoundException localNameNotFoundException) {
   i = 0;
  }
 
  return i == 1;
 }
 
 protected void onActivityResult(int paramInt1, int paramInt2,
   Intent paramIntent) {
  try {
   if (sDexLoaded) {
    Class localClass1 = sAndroidActivityWrapperClass;
    Class[] arrayOfClass = new Class[3];
    arrayOfClass[0] = Integer.TYPE;
    arrayOfClass[1] = Integer.TYPE;
    arrayOfClass[2] = Intent.class;
    Method localMethod = localClass1.getMethod("onActivityResult",
      arrayOfClass);
    Object[] arrayOfObject = new Object[3];
    Integer localInteger1 = Integer.valueOf(paramInt1);
    arrayOfObject[0] = localInteger1;
    Integer localInteger2 = Integer.valueOf(paramInt2);
    arrayOfObject[1] = localInteger2;
    arrayOfObject[2] = paramIntent;
    InvokeMethod(localMethod, arrayOfObject);
   }
  } catch (Exception localException) {
  }
 }
 
 protected void onApplyThemeResource(Resources.Theme paramTheme,
   int paramInt, boolean paramBoolean) {
  super.onApplyThemeResource(paramTheme, paramInt, paramBoolean);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Resources.Theme.class;
   arrayOfClass[1] = Integer.TYPE;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onApplyThemeResource",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   arrayOfObject[0] = paramTheme;
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[1] = localInteger;
   Boolean localBoolean = Boolean.valueOf(paramBoolean);
   arrayOfObject[2] = localBoolean;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onAttachedToWindow() {
  super.onAttachedToWindow();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onAttachedToWindow",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onBackPressed() {
  super.onBackPressed();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onBackPressed",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 protected void onChildTitleChanged(Activity paramActivity,
   CharSequence paramCharSequence) {
  super.onChildTitleChanged(paramActivity, paramCharSequence);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Activity.class;
   arrayOfClass[1] = CharSequence.class;
   Method localMethod = localClass.getMethod("onChildTitleChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramActivity;
   arrayOfObject[1] = paramCharSequence;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onConfigurationChanged(Configuration paramConfiguration) {
  super.onConfigurationChanged(paramConfiguration);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Configuration.class;
   Method localMethod = localClass.getMethod("onConfigurationChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramConfiguration;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onContentChanged() {
  super.onContentChanged();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onContentChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public boolean onContextItemSelected(MenuItem paramMenuItem) {
  boolean bool1 = super.onContextItemSelected(paramMenuItem);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = MenuItem.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onContextItemSelected",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMenuItem;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public void onContextMenuClosed(Menu paramMenu) {
  super.onContextMenuClosed(paramMenu);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Menu.class;
   Method localMethod = localClass.getMethod("onContextMenuClosed",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramMenu;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onCreateContextMenu(ContextMenu paramContextMenu,
   View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo) {
  super.onCreateContextMenu(paramContextMenu, paramView,
    paramContextMenuInfo);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = ContextMenu.class;
   arrayOfClass[1] = View.class;
   arrayOfClass[2] = ContextMenu.ContextMenuInfo.class;
   Method localMethod = localClass.getMethod("onCreateContextMenu",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   arrayOfObject[0] = paramContextMenu;
   arrayOfObject[1] = paramView;
   arrayOfObject[2] = paramContextMenuInfo;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public CharSequence onCreateDescription() {
  CharSequence localCharSequence = super.onCreateDescription();
  Object localObject;
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = CharSequence.class;
   Method localMethod = localClass.getMethod("onCreateDescription",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = localCharSequence;
   localObject = (CharSequence) InvokeMethod(localMethod,
     arrayOfObject);
  } catch (Exception localException) {
   localObject = localCharSequence;
  }
  return (CharSequence) localObject;
 }
 
 protected Dialog onCreateDialog(int paramInt) {
  Dialog localDialog = super.onCreateDialog(paramInt);
  Object localObject;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Dialog.class;
   Method localMethod = localClass1.getMethod("onCreateDialog",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = localDialog;
   localObject = (Dialog) InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject = localDialog;
  }
  return (Dialog) localObject;
 }
 
 protected Dialog onCreateDialog(int paramInt, Bundle paramBundle) {
  Dialog localDialog = super.onCreateDialog(paramInt, paramBundle);
  Object localObject;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Bundle.class;
   arrayOfClass[2] = Dialog.class;
   Method localMethod = localClass1.getMethod("onCreateDialog",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramBundle;
   arrayOfObject[2] = localDialog;
   localObject = (Dialog) InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject = localDialog;
  }
 
  return (Dialog) localObject;
 }
 
 public boolean onCreateOptionsMenu(Menu paramMenu) {
  boolean bool1 = super.onCreateOptionsMenu(paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Menu.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onCreateOptionsMenu",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public boolean onCreatePanelMenu(int paramInt, Menu paramMenu) {
  boolean bool1 = super.onCreatePanelMenu(paramInt, paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Menu.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onCreatePanelMenu",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public View onCreatePanelView(int paramInt) {
  View localView = super.onCreatePanelView(paramInt);
  Object localObject;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = View.class;
   Method localMethod = localClass1.getMethod("onCreatePanelView",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = localView;
   localObject = (View) InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject = localView;
  }
  return (View) localObject;
 }
 
 public boolean onCreateThumbnail(Bitmap paramBitmap, Canvas paramCanvas) {
  boolean bool1 = super.onCreateThumbnail(paramBitmap, paramCanvas);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Bitmap.class;
   arrayOfClass[1] = Canvas.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onCreateThumbnail",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   arrayOfObject[0] = paramBitmap;
   arrayOfObject[1] = paramCanvas;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public View onCreateView(String paramString, Context paramContext,
   AttributeSet paramAttributeSet) {
  View localView = super.onCreateView(paramString, paramContext,
    paramAttributeSet);
  Object localObject;
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[4];
   arrayOfClass[0] = String.class;
   arrayOfClass[1] = Context.class;
   arrayOfClass[2] = AttributeSet.class;
   arrayOfClass[3] = View.class;
   Method localMethod = localClass.getMethod("onCreateView",
     arrayOfClass);
   Object[] arrayOfObject = new Object[4];
   arrayOfObject[0] = paramString;
   arrayOfObject[1] = paramContext;
   arrayOfObject[2] = paramAttributeSet;
   arrayOfObject[3] = localView;
   localObject = (View) InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject = localView;
  }
  return (View) localObject;
 }
 
 public void onDestroy() {
  super.onDestroy();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass
     .getMethod("onDestroy", arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onDetachedFromWindow() {
  super.onDetachedFromWindow();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onDetachedFromWindow",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent) {
  boolean bool1 = super.onKeyDown(paramInt, paramKeyEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = KeyEvent.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onKeyDown",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramKeyEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public boolean onKeyLongPress(int paramInt, KeyEvent paramKeyEvent) {
  boolean bool1 = super.onKeyLongPress(paramInt, paramKeyEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = KeyEvent.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onKeyLongPress",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramKeyEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public boolean onKeyMultiple(int paramInt1, int paramInt2,
   KeyEvent paramKeyEvent) {
  boolean bool1 = super
    .onKeyMultiple(paramInt1, paramInt2, paramKeyEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[4];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Integer.TYPE;
   arrayOfClass[2] = KeyEvent.class;
   arrayOfClass[3] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onKeyMultiple",
     arrayOfClass);
   Object[] arrayOfObject = new Object[4];
   Integer localInteger1 = Integer.valueOf(paramInt1);
   arrayOfObject[0] = localInteger1;
   Integer localInteger2 = Integer.valueOf(paramInt2);
   arrayOfObject[1] = localInteger2;
   arrayOfObject[2] = paramKeyEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[3] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public boolean onKeyUp(int paramInt, KeyEvent paramKeyEvent) {
  boolean bool1 = super.onKeyUp(paramInt, paramKeyEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = KeyEvent.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onKeyUp", arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramKeyEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public void onLowMemory() {
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onLowMemory",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public boolean onMenuItemSelected(int paramInt, MenuItem paramMenuItem) {
  boolean bool1 = super.onMenuItemSelected(paramInt, paramMenuItem);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = MenuItem.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onMenuItemSelected",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramMenuItem;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public boolean onMenuOpened(int paramInt, Menu paramMenu) {
  boolean bool1 = super.onMenuOpened(paramInt, paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Menu.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onMenuOpened",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 protected void onNewIntent(Intent paramIntent) {
  Intent localIntent = paramIntent;
  super.onNewIntent(localIntent);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Intent.class;
   Method localMethod = localClass.getMethod("onNewIntent",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = localIntent;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public boolean onOptionsItemSelected(MenuItem paramMenuItem) {
  boolean bool1 = super.onOptionsItemSelected(paramMenuItem);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = MenuItem.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onOptionsItemSelected",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMenuItem;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public void onOptionsMenuClosed(Menu paramMenu) {
  super.onOptionsMenuClosed(paramMenu);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Menu.class;
   Method localMethod = localClass.getMethod("onOptionsMenuClosed",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramMenu;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onPanelClosed(int paramInt, Menu paramMenu) {
  super.onPanelClosed(paramInt, paramMenu);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Menu.class;
   Method localMethod = localClass1.getMethod("onPanelClosed",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramMenu;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onPause() {
  super.onPause();
  try {
   if (sDexLoaded) {
    Class localClass = sAndroidActivityWrapperClass;
    Class[] arrayOfClass = new Class[0];
    Method localMethod = localClass.getMethod("onPause",
      arrayOfClass);
    Object[] arrayOfObject = new Object[0];
    InvokeMethod(localMethod, arrayOfObject);
   }
  } catch (Exception localException) {
  }
 }
 
 protected void onPostCreate(Bundle paramBundle) {
  super.onPostCreate(paramBundle);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Bundle.class;
   Method localMethod = localClass.getMethod("onPostCreate",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramBundle;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 protected void onPostResume() {
  super.onPostResume();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onPostResume",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 protected void onPrepareDialog(int paramInt, Dialog paramDialog) {
  super.onPrepareDialog(paramInt, paramDialog);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   // arrayOfClass[0] = R.id.class;
   // 因为此处的第一个参数为int类型,所以做个替换就OK
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Dialog.class;
   Method localMethod = localClass.getMethod("onPrepareDialog",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramDialog;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 protected void onPrepareDialog(int paramInt, Dialog paramDialog,
   Bundle paramBundle) {
  super.onPrepareDialog(paramInt, paramDialog, paramBundle);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   // arrayOfClass[0] = R.id.class;
   // 因为此处的第一个参数为int类型,所以做个替换就OK
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Dialog.class;
   arrayOfClass[2] = Bundle.class;
   Method localMethod = localClass.getMethod("onPrepareDialog",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramDialog;
   arrayOfObject[2] = paramBundle;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public boolean onPrepareOptionsMenu(Menu paramMenu) {
  boolean bool1 = super.onPrepareOptionsMenu(paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Menu.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onPrepareOptionsMenu",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public boolean onPreparePanel(int paramInt, View paramView, Menu paramMenu) {
  boolean bool1 = super.onPreparePanel(paramInt, paramView, paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[4];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = View.class;
   arrayOfClass[2] = Menu.class;
   arrayOfClass[3] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onPreparePanel",
     arrayOfClass);
   Object[] arrayOfObject = new Object[4];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramView;
   arrayOfObject[2] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[3] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public void onRestart() {
  super.onRestart();
  try {
   if (sDexLoaded) {
    Class localClass = sAndroidActivityWrapperClass;
    Class[] arrayOfClass = new Class[0];
    Method localMethod = localClass.getMethod("onRestart",
      arrayOfClass);
    Object[] arrayOfObject = new Object[0];
    InvokeMethod(localMethod, arrayOfObject);
   }
  } catch (Exception localException) {
  }
 }
 
 protected void onRestoreInstanceState(Bundle paramBundle) {
  super.onRestoreInstanceState(paramBundle);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Bundle.class;
   Method localMethod = localClass.getMethod("onRestoreInstanceState",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramBundle;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onResume() {
  super.onResume();
  try {
   if (sDexLoaded) {
    Class localClass = sAndroidActivityWrapperClass;
    Class[] arrayOfClass = new Class[0];
    Method localMethod = localClass.getMethod("onResume",
      arrayOfClass);
    Object[] arrayOfObject = new Object[0];
    InvokeMethod(localMethod, arrayOfObject);
   }
  } catch (Exception localException) {
  }
 }
 
 public Object onRetainNonConfigurationInstance() {
  Object localObject1 = super.onRetainNonConfigurationInstance();
  Object localObject3;
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Object.class;
   Method localMethod = localClass.getMethod(
     "onRetainNonConfigurationInstance", arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = localObject1;
   localObject3 = InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject3 = localObject1;
  }
  return localObject3;
 }
 
 protected void onSaveInstanceState(Bundle paramBundle) {
  super.onSaveInstanceState(paramBundle);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Bundle.class;
   Method localMethod = localClass.getMethod("onSaveInstanceState",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramBundle;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public boolean onSearchRequested() {
  boolean bool1 = super.onSearchRequested();
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onSearchRequested",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[0] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public void onStart() {
  super.onStart();
 }
 
 public void onStop() {
  super.onStop();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onStop", arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 protected void onTitleChanged(CharSequence paramCharSequence, int paramInt) {
  super.onTitleChanged(paramCharSequence, paramInt);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = CharSequence.class;
   Class localClass2 = Integer.TYPE;
   arrayOfClass[1] = localClass2;
   Method localMethod = localClass1.getMethod("onTitleChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramCharSequence;
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[1] = localInteger;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public boolean onTouchEvent(MotionEvent paramMotionEvent) {
  boolean bool1 = super.onTouchEvent(paramMotionEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = MotionEvent.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onTouchEvent",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMotionEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public boolean onTrackballEvent(MotionEvent paramMotionEvent) {
  boolean bool1 = super.onTrackballEvent(paramMotionEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = MotionEvent.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onTrackballEvent",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMotionEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }
 
 public void onUserInteraction() {
  super.onUserInteraction();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onUserInteraction",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 protected void onUserLeaveHint() {
  super.onUserLeaveHint();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onUserLeaveHint",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onWindowAttributesChanged(
   WindowManager.LayoutParams paramLayoutParams) {
  super.onWindowAttributesChanged(paramLayoutParams);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = WindowManager.LayoutParams.class;
   Method localMethod = localClass.getMethod(
     "onWindowAttributesChanged", arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramLayoutParams;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void onWindowFocusChanged(boolean paramBoolean) {
  super.onWindowFocusChanged(paramBoolean);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onWindowFocusChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   Boolean localBoolean = Boolean.valueOf(paramBoolean);
   arrayOfObject[0] = localBoolean;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }
 
 public void showDialog() {
  AlertDialog.Builder localBuilder1 = new AlertDialog.Builder(this);
  AlertDialog.Builder localBuilder2 = localBuilder1.setTitle(2130968578);
  AlertDialog.Builder localBuilder3 = localBuilder1
    .setMessage(2130968579);
 
  AlertDialog.Builder localBuilder4 = localBuilder1.setPositiveButton(
    2130968576,
    new android.content.DialogInterface.OnClickListener() {
     @Override
     public void onClick(DialogInterface arg0, int arg1) {
      launchMarketPlaceForAIR();
      System.exit(0);
     }
    });
 
  AlertDialog.Builder localBuilder5 = localBuilder1.setNegativeButton(
    2130968577,
    new android.content.DialogInterface.OnClickListener() {
     @Override
     public void onClick(DialogInterface arg0, int arg1) {
      System.exit(0);
     }
 
    });
 
  AlertDialog.Builder localBuilder6 = localBuilder1
    .setOnCancelListener(new android.content.DialogInterface.OnCancelListener() {
     @Override
     public void onCancel(DialogInterface arg0) {
      System.exit(0);
     }
    });
 
  AlertDialog localAlertDialog = localBuilder1.show();
 }
}
package air.app;

import java.lang.reflect.Method;
import java.net.URISyntaxException;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Process;
import android.util.AttributeSet;
import android.view.ContextMenu;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import dalvik.system.DexClassLoader;

public class AppEntry extends Activity {
 private static final String LOG_TAG = "AppEntry";
 private static String RUNTIME_PACKAGE_ID = "com.adobe.air";
 private static Object sAndroidActivityWrapper = null;
 private static Class<?> sAndroidActivityWrapperClass;
 private static boolean sDexLoaded = false;
 private static DexClassLoader sDloader;

 /**
  * Activity 的 启动函数,用来初始化Adobe AIR的环境
  * */
 public void onCreate(Bundle paramBundle) {
  super.onCreate(paramBundle);
  if (!isRuntimeInstalled()) {
   showDialog();
  } else {
   loadDexAndCreateActivityWrapper();
   if (!sDexLoaded) {
    launchAIRService();
   } else {
    InvokeWrapperOnCreate();
   }
  }
 }

 /**
  * 执行指定的方法:paramMethod为方法名,paramArrayOfObject为方法的参数
  *
  * */
 private Object InvokeMethod(Method paramMethod, Object[] paramArrayOfObject) {
  Object localObject1 = null;
  if (!sDexLoaded) {
   return localObject1;
  }

  try {
   if (paramArrayOfObject != null) {
    localObject1 = paramMethod.invoke(sAndroidActivityWrapper,
      paramArrayOfObject);
   } else {
    Object[] arrayOfObject = new Object[0];
    localObject1 = paramMethod.invoke(sAndroidActivityWrapper,
      arrayOfObject);
   }
  } catch (Exception localException) {
  }
  return localObject1;
 }

 /**
  * 主要用来初始化Activity的包装类 sAndroidActivityWrapperClass, 后续的方法调用都是通过它来的
  * */
 private void InvokeWrapperOnCreate() {
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Activity.class;
   arrayOfClass[1] = String[].class;
   Method localMethod = localClass.getMethod("onCreate", arrayOfClass);
   Boolean localBoolean1 = new Boolean(false);
   Boolean localBoolean2 = new Boolean(true);
   String[] arrayOfString = new String[5];
   arrayOfString[0] = "";
   arrayOfString[1] = "";
   arrayOfString[2] = "-nodebug";
   arrayOfString[3] = localBoolean1.toString();
   arrayOfString[4] = localBoolean2.toString();

   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = this;
   arrayOfObject[1] = arrayOfString;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 private static void KillSelf() {
  Process.killProcess(Process.myPid());
 }

 /**
  * 用来启动Adobe AIR service服务
  * */
 private void launchAIRService() {
  try {
   Intent localIntent1 = new Intent("com.adobe.air.AIRServiceAction");
   localIntent1.setClassName(RUNTIME_PACKAGE_ID,
     "com.adobe.air.AIRService");

   bindService(localIntent1, new ServiceConnection() {

    @Override
    public void onServiceConnected(ComponentName arg0, IBinder arg1) {
     unbindService(this);
     loadDexAndCreateActivityWrapper();
     if (AppEntry.sDexLoaded) {
      InvokeWrapperOnCreate();
     } else {
      AppEntry.KillSelf();
     }
    }

    @Override
    public void onServiceDisconnected(ComponentName arg0) {
    }

   }, 1);
  } catch (Exception localException) {
  }
 }

 /**
  * 启动Android Market 来下载 Adobe AIR for Android 的apk程序
  * */
 private void launchMarketPlaceForAIR() {
  String str2 = null;
  try {
   PackageManager localPackageManager = getPackageManager();
   ComponentName localComponentName = getComponentName();
   Bundle localBundle = localPackageManager.getActivityInfo(
     localComponentName, 128).metaData;
   if (localBundle != null) {
    str2 = (String) localBundle.get("airDownloadURL");
   }
  } catch (android.content.pm.PackageManager.NameNotFoundException namenotfoundexception) {
  }

  if (str2 == null) {
   StringBuilder localStringBuilder = new StringBuilder()
     .append("market://details?id=");
   str2 = localStringBuilder.append(RUNTIME_PACKAGE_ID).toString();
  }
  BroadcastIntent("android.intent.action.VIEW", str2);
 }

 /**
  * 创建 DexClassLoader, sAndroidActivityWrapperClass 和 初始化
  * sAndroidActivityWrapper(通过调用方法CreateAndroidActivityWrapper)
  * */
 private void loadDexAndCreateActivityWrapper() {
  try {
   if (!sDexLoaded) {
    Context localContext = createPackageContext(RUNTIME_PACKAGE_ID,
      3);
    String str2 = RUNTIME_PACKAGE_ID;
    String str3 = getFilesDir().getAbsolutePath();
    ClassLoader localClassLoader = localContext.getClassLoader();
    sDloader = new DexClassLoader(str2, str3, null,
      localClassLoader);
    sAndroidActivityWrapperClass = sDloader
      .loadClass("com.adobe.air.AndroidActivityWrapper");
    if (sAndroidActivityWrapperClass != null) {
     sDexLoaded = true;
    }
   }

   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Activity.class;
   Method localMethod = localClass.getMethod(
     "CreateAndroidActivityWrapper", arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = this;
   sAndroidActivityWrapper = localMethod.invoke(null, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 /**
  * 用来启动 Activity
  * */
 public void BroadcastIntent(String paramString1, String paramString2) {
  try {
   Intent localIntent = Intent.parseUri(paramString2, 0)
     .setAction(paramString1).addFlags(268435456);
   startActivity(localIntent);
  } catch (ActivityNotFoundException localActivityNotFoundException) {
  } catch (URISyntaxException localURISyntaxException) {
  }
 }

 public void finishActivityFromChild(Activity paramActivity, int paramInt) {
  super.finishActivityFromChild(paramActivity, paramInt);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Activity.class;
   arrayOfClass[1] = Integer.TYPE;
   Method localMethod = localClass1.getMethod(
     "finishActivityFromChild", arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramActivity;
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[1] = localInteger;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void finishFromChild(Activity paramActivity) {
  super.finishFromChild(paramActivity);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Activity.class;
   Method localMethod = localClass.getMethod("finishFromChild",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramActivity;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 /**
  * 通过 getPackageInfo 的方法来测试 Adobe AIR 环境是否ready,如果抛出异常, 说明Adobe
  * AIR的相关软件还没有安装
  * */
 public boolean isRuntimeInstalled() {
  PackageManager localPackageManager = getPackageManager();
  int i;
  try {
   PackageInfo localPackageInfo = localPackageManager.getPackageInfo(
     RUNTIME_PACKAGE_ID, 256);
   i = 1;
  } catch (PackageManager.NameNotFoundException localNameNotFoundException) {
   i = 0;
  }

  return i == 1;
 }

 protected void onActivityResult(int paramInt1, int paramInt2,
   Intent paramIntent) {
  try {
   if (sDexLoaded) {
    Class localClass1 = sAndroidActivityWrapperClass;
    Class[] arrayOfClass = new Class[3];
    arrayOfClass[0] = Integer.TYPE;
    arrayOfClass[1] = Integer.TYPE;
    arrayOfClass[2] = Intent.class;
    Method localMethod = localClass1.getMethod("onActivityResult",
      arrayOfClass);
    Object[] arrayOfObject = new Object[3];
    Integer localInteger1 = Integer.valueOf(paramInt1);
    arrayOfObject[0] = localInteger1;
    Integer localInteger2 = Integer.valueOf(paramInt2);
    arrayOfObject[1] = localInteger2;
    arrayOfObject[2] = paramIntent;
    InvokeMethod(localMethod, arrayOfObject);
   }
  } catch (Exception localException) {
  }
 }

 protected void onApplyThemeResource(Resources.Theme paramTheme,
   int paramInt, boolean paramBoolean) {
  super.onApplyThemeResource(paramTheme, paramInt, paramBoolean);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Resources.Theme.class;
   arrayOfClass[1] = Integer.TYPE;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onApplyThemeResource",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   arrayOfObject[0] = paramTheme;
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[1] = localInteger;
   Boolean localBoolean = Boolean.valueOf(paramBoolean);
   arrayOfObject[2] = localBoolean;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onAttachedToWindow() {
  super.onAttachedToWindow();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onAttachedToWindow",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onBackPressed() {
  super.onBackPressed();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onBackPressed",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 protected void onChildTitleChanged(Activity paramActivity,
   CharSequence paramCharSequence) {
  super.onChildTitleChanged(paramActivity, paramCharSequence);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Activity.class;
   arrayOfClass[1] = CharSequence.class;
   Method localMethod = localClass.getMethod("onChildTitleChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramActivity;
   arrayOfObject[1] = paramCharSequence;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onConfigurationChanged(Configuration paramConfiguration) {
  super.onConfigurationChanged(paramConfiguration);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Configuration.class;
   Method localMethod = localClass.getMethod("onConfigurationChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramConfiguration;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onContentChanged() {
  super.onContentChanged();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onContentChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public boolean onContextItemSelected(MenuItem paramMenuItem) {
  boolean bool1 = super.onContextItemSelected(paramMenuItem);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = MenuItem.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onContextItemSelected",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMenuItem;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public void onContextMenuClosed(Menu paramMenu) {
  super.onContextMenuClosed(paramMenu);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Menu.class;
   Method localMethod = localClass.getMethod("onContextMenuClosed",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramMenu;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onCreateContextMenu(ContextMenu paramContextMenu,
   View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo) {
  super.onCreateContextMenu(paramContextMenu, paramView,
    paramContextMenuInfo);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = ContextMenu.class;
   arrayOfClass[1] = View.class;
   arrayOfClass[2] = ContextMenu.ContextMenuInfo.class;
   Method localMethod = localClass.getMethod("onCreateContextMenu",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   arrayOfObject[0] = paramContextMenu;
   arrayOfObject[1] = paramView;
   arrayOfObject[2] = paramContextMenuInfo;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public CharSequence onCreateDescription() {
  CharSequence localCharSequence = super.onCreateDescription();
  Object localObject;
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = CharSequence.class;
   Method localMethod = localClass.getMethod("onCreateDescription",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = localCharSequence;
   localObject = (CharSequence) InvokeMethod(localMethod,
     arrayOfObject);
  } catch (Exception localException) {
   localObject = localCharSequence;
  }
  return (CharSequence) localObject;
 }

 protected Dialog onCreateDialog(int paramInt) {
  Dialog localDialog = super.onCreateDialog(paramInt);
  Object localObject;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Dialog.class;
   Method localMethod = localClass1.getMethod("onCreateDialog",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = localDialog;
   localObject = (Dialog) InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject = localDialog;
  }
  return (Dialog) localObject;
 }

 protected Dialog onCreateDialog(int paramInt, Bundle paramBundle) {
  Dialog localDialog = super.onCreateDialog(paramInt, paramBundle);
  Object localObject;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Bundle.class;
   arrayOfClass[2] = Dialog.class;
   Method localMethod = localClass1.getMethod("onCreateDialog",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramBundle;
   arrayOfObject[2] = localDialog;
   localObject = (Dialog) InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject = localDialog;
  }

  return (Dialog) localObject;
 }

 public boolean onCreateOptionsMenu(Menu paramMenu) {
  boolean bool1 = super.onCreateOptionsMenu(paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Menu.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onCreateOptionsMenu",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public boolean onCreatePanelMenu(int paramInt, Menu paramMenu) {
  boolean bool1 = super.onCreatePanelMenu(paramInt, paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Menu.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onCreatePanelMenu",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public View onCreatePanelView(int paramInt) {
  View localView = super.onCreatePanelView(paramInt);
  Object localObject;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = View.class;
   Method localMethod = localClass1.getMethod("onCreatePanelView",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = localView;
   localObject = (View) InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject = localView;
  }
  return (View) localObject;
 }

 public boolean onCreateThumbnail(Bitmap paramBitmap, Canvas paramCanvas) {
  boolean bool1 = super.onCreateThumbnail(paramBitmap, paramCanvas);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Bitmap.class;
   arrayOfClass[1] = Canvas.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onCreateThumbnail",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   arrayOfObject[0] = paramBitmap;
   arrayOfObject[1] = paramCanvas;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public View onCreateView(String paramString, Context paramContext,
   AttributeSet paramAttributeSet) {
  View localView = super.onCreateView(paramString, paramContext,
    paramAttributeSet);
  Object localObject;
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[4];
   arrayOfClass[0] = String.class;
   arrayOfClass[1] = Context.class;
   arrayOfClass[2] = AttributeSet.class;
   arrayOfClass[3] = View.class;
   Method localMethod = localClass.getMethod("onCreateView",
     arrayOfClass);
   Object[] arrayOfObject = new Object[4];
   arrayOfObject[0] = paramString;
   arrayOfObject[1] = paramContext;
   arrayOfObject[2] = paramAttributeSet;
   arrayOfObject[3] = localView;
   localObject = (View) InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject = localView;
  }
  return (View) localObject;
 }

 public void onDestroy() {
  super.onDestroy();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass
     .getMethod("onDestroy", arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onDetachedFromWindow() {
  super.onDetachedFromWindow();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onDetachedFromWindow",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent) {
  boolean bool1 = super.onKeyDown(paramInt, paramKeyEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = KeyEvent.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onKeyDown",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramKeyEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public boolean onKeyLongPress(int paramInt, KeyEvent paramKeyEvent) {
  boolean bool1 = super.onKeyLongPress(paramInt, paramKeyEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = KeyEvent.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onKeyLongPress",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramKeyEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public boolean onKeyMultiple(int paramInt1, int paramInt2,
   KeyEvent paramKeyEvent) {
  boolean bool1 = super
    .onKeyMultiple(paramInt1, paramInt2, paramKeyEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[4];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Integer.TYPE;
   arrayOfClass[2] = KeyEvent.class;
   arrayOfClass[3] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onKeyMultiple",
     arrayOfClass);
   Object[] arrayOfObject = new Object[4];
   Integer localInteger1 = Integer.valueOf(paramInt1);
   arrayOfObject[0] = localInteger1;
   Integer localInteger2 = Integer.valueOf(paramInt2);
   arrayOfObject[1] = localInteger2;
   arrayOfObject[2] = paramKeyEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[3] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public boolean onKeyUp(int paramInt, KeyEvent paramKeyEvent) {
  boolean bool1 = super.onKeyUp(paramInt, paramKeyEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = KeyEvent.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onKeyUp", arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramKeyEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public void onLowMemory() {
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onLowMemory",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public boolean onMenuItemSelected(int paramInt, MenuItem paramMenuItem) {
  boolean bool1 = super.onMenuItemSelected(paramInt, paramMenuItem);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = MenuItem.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onMenuItemSelected",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramMenuItem;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public boolean onMenuOpened(int paramInt, Menu paramMenu) {
  boolean bool1 = super.onMenuOpened(paramInt, paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Menu.class;
   arrayOfClass[2] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onMenuOpened",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[2] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 protected void onNewIntent(Intent paramIntent) {
  Intent localIntent = paramIntent;
  super.onNewIntent(localIntent);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Intent.class;
   Method localMethod = localClass.getMethod("onNewIntent",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = localIntent;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public boolean onOptionsItemSelected(MenuItem paramMenuItem) {
  boolean bool1 = super.onOptionsItemSelected(paramMenuItem);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = MenuItem.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onOptionsItemSelected",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMenuItem;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public void onOptionsMenuClosed(Menu paramMenu) {
  super.onOptionsMenuClosed(paramMenu);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Menu.class;
   Method localMethod = localClass.getMethod("onOptionsMenuClosed",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramMenu;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onPanelClosed(int paramInt, Menu paramMenu) {
  super.onPanelClosed(paramInt, paramMenu);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Menu.class;
   Method localMethod = localClass1.getMethod("onPanelClosed",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramMenu;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onPause() {
  super.onPause();
  try {
   if (sDexLoaded) {
    Class localClass = sAndroidActivityWrapperClass;
    Class[] arrayOfClass = new Class[0];
    Method localMethod = localClass.getMethod("onPause",
      arrayOfClass);
    Object[] arrayOfObject = new Object[0];
    InvokeMethod(localMethod, arrayOfObject);
   }
  } catch (Exception localException) {
  }
 }

 protected void onPostCreate(Bundle paramBundle) {
  super.onPostCreate(paramBundle);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Bundle.class;
   Method localMethod = localClass.getMethod("onPostCreate",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramBundle;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 protected void onPostResume() {
  super.onPostResume();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onPostResume",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 protected void onPrepareDialog(int paramInt, Dialog paramDialog) {
  super.onPrepareDialog(paramInt, paramDialog);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   // arrayOfClass[0] = R.id.class;
   // 因为此处的第一个参数为int类型,所以做个替换就OK
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Dialog.class;
   Method localMethod = localClass.getMethod("onPrepareDialog",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramDialog;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 protected void onPrepareDialog(int paramInt, Dialog paramDialog,
   Bundle paramBundle) {
  super.onPrepareDialog(paramInt, paramDialog, paramBundle);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[3];
   // arrayOfClass[0] = R.id.class;
   // 因为此处的第一个参数为int类型,所以做个替换就OK
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = Dialog.class;
   arrayOfClass[2] = Bundle.class;
   Method localMethod = localClass.getMethod("onPrepareDialog",
     arrayOfClass);
   Object[] arrayOfObject = new Object[3];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramDialog;
   arrayOfObject[2] = paramBundle;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public boolean onPrepareOptionsMenu(Menu paramMenu) {
  boolean bool1 = super.onPrepareOptionsMenu(paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = Menu.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onPrepareOptionsMenu",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public boolean onPreparePanel(int paramInt, View paramView, Menu paramMenu) {
  boolean bool1 = super.onPreparePanel(paramInt, paramView, paramMenu);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[4];
   arrayOfClass[0] = Integer.TYPE;
   arrayOfClass[1] = View.class;
   arrayOfClass[2] = Menu.class;
   arrayOfClass[3] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onPreparePanel",
     arrayOfClass);
   Object[] arrayOfObject = new Object[4];
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[0] = localInteger;
   arrayOfObject[1] = paramView;
   arrayOfObject[2] = paramMenu;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[3] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public void onRestart() {
  super.onRestart();
  try {
   if (sDexLoaded) {
    Class localClass = sAndroidActivityWrapperClass;
    Class[] arrayOfClass = new Class[0];
    Method localMethod = localClass.getMethod("onRestart",
      arrayOfClass);
    Object[] arrayOfObject = new Object[0];
    InvokeMethod(localMethod, arrayOfObject);
   }
  } catch (Exception localException) {
  }
 }

 protected void onRestoreInstanceState(Bundle paramBundle) {
  super.onRestoreInstanceState(paramBundle);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Bundle.class;
   Method localMethod = localClass.getMethod("onRestoreInstanceState",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramBundle;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onResume() {
  super.onResume();
  try {
   if (sDexLoaded) {
    Class localClass = sAndroidActivityWrapperClass;
    Class[] arrayOfClass = new Class[0];
    Method localMethod = localClass.getMethod("onResume",
      arrayOfClass);
    Object[] arrayOfObject = new Object[0];
    InvokeMethod(localMethod, arrayOfObject);
   }
  } catch (Exception localException) {
  }
 }

 public Object onRetainNonConfigurationInstance() {
  Object localObject1 = super.onRetainNonConfigurationInstance();
  Object localObject3;
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Object.class;
   Method localMethod = localClass.getMethod(
     "onRetainNonConfigurationInstance", arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = localObject1;
   localObject3 = InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
   localObject3 = localObject1;
  }
  return localObject3;
 }

 protected void onSaveInstanceState(Bundle paramBundle) {
  super.onSaveInstanceState(paramBundle);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Bundle.class;
   Method localMethod = localClass.getMethod("onSaveInstanceState",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramBundle;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public boolean onSearchRequested() {
  boolean bool1 = super.onSearchRequested();
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onSearchRequested",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[0] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public void onStart() {
  super.onStart();
 }

 public void onStop() {
  super.onStop();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onStop", arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 protected void onTitleChanged(CharSequence paramCharSequence, int paramInt) {
  super.onTitleChanged(paramCharSequence, paramInt);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = CharSequence.class;
   Class localClass2 = Integer.TYPE;
   arrayOfClass[1] = localClass2;
   Method localMethod = localClass1.getMethod("onTitleChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramCharSequence;
   Integer localInteger = Integer.valueOf(paramInt);
   arrayOfObject[1] = localInteger;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public boolean onTouchEvent(MotionEvent paramMotionEvent) {
  boolean bool1 = super.onTouchEvent(paramMotionEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = MotionEvent.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onTouchEvent",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMotionEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public boolean onTrackballEvent(MotionEvent paramMotionEvent) {
  boolean bool1 = super.onTrackballEvent(paramMotionEvent);
  boolean bool3;
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[2];
   arrayOfClass[0] = MotionEvent.class;
   arrayOfClass[1] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onTrackballEvent",
     arrayOfClass);
   Object[] arrayOfObject = new Object[2];
   arrayOfObject[0] = paramMotionEvent;
   Boolean localBoolean = Boolean.valueOf(bool1);
   arrayOfObject[1] = localBoolean;
   bool3 = ((Boolean) InvokeMethod(localMethod, arrayOfObject))
     .booleanValue();
  } catch (Exception localException) {
   bool3 = bool1;
  }
  return bool3;
 }

 public void onUserInteraction() {
  super.onUserInteraction();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onUserInteraction",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 protected void onUserLeaveHint() {
  super.onUserLeaveHint();
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[0];
   Method localMethod = localClass.getMethod("onUserLeaveHint",
     arrayOfClass);
   Object[] arrayOfObject = new Object[0];
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onWindowAttributesChanged(
   WindowManager.LayoutParams paramLayoutParams) {
  super.onWindowAttributesChanged(paramLayoutParams);
  try {
   Class localClass = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = WindowManager.LayoutParams.class;
   Method localMethod = localClass.getMethod(
     "onWindowAttributesChanged", arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   arrayOfObject[0] = paramLayoutParams;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void onWindowFocusChanged(boolean paramBoolean) {
  super.onWindowFocusChanged(paramBoolean);
  try {
   Class localClass1 = sAndroidActivityWrapperClass;
   Class[] arrayOfClass = new Class[1];
   arrayOfClass[0] = Boolean.TYPE;
   Method localMethod = localClass1.getMethod("onWindowFocusChanged",
     arrayOfClass);
   Object[] arrayOfObject = new Object[1];
   Boolean localBoolean = Boolean.valueOf(paramBoolean);
   arrayOfObject[0] = localBoolean;
   InvokeMethod(localMethod, arrayOfObject);
  } catch (Exception localException) {
  }
 }

 public void showDialog() {
  AlertDialog.Builder localBuilder1 = new AlertDialog.Builder(this);
  AlertDialog.Builder localBuilder2 = localBuilder1.setTitle(2130968578);
  AlertDialog.Builder localBuilder3 = localBuilder1
    .setMessage(2130968579);

  AlertDialog.Builder localBuilder4 = localBuilder1.setPositiveButton(
    2130968576,
    new android.content.DialogInterface.OnClickListener() {
     @Override
     public void onClick(DialogInterface arg0, int arg1) {
      launchMarketPlaceForAIR();
      System.exit(0);
     }
    });

  AlertDialog.Builder localBuilder5 = localBuilder1.setNegativeButton(
    2130968577,
    new android.content.DialogInterface.OnClickListener() {
     @Override
     public void onClick(DialogInterface arg0, int arg1) {
      System.exit(0);
     }

    });

  AlertDialog.Builder localBuilder6 = localBuilder1
    .setOnCancelListener(new android.content.DialogInterface.OnCancelListener() {
     @Override
     public void onCancel(DialogInterface arg0) {
      System.exit(0);
     }
    });

  AlertDialog localAlertDialog = localBuilder1.show();
 }
}

 源码看完了,不知大家了解的怎么样了,不管怎样先休息一下,过端午了,先吃粽子啦。。。

 在此祝大家端午节快乐!!!

目前有 11 条留言 其中:访客:7 条, 博主:4 条

  1. rfewfw : 2015年05月13日16:52:19  -49楼 @回复 回复

    adobe air 播放器可以播放任意swf文件,请问我需要怎么开始入手呢

  2. zero : 2014年09月11日16:09:43  -48楼 @回复 回复

    正需要,好人一生平安!

  3. nellson : 2012年03月10日00:46:27  -47楼 @回复 回复

    想请教下,除了直接加载assets下默认的swf文件,可以指定加载任何的swf文件吗?

  4. Kirk : 2012年02月09日13:27:34  -46楼 @回复 回复

    十分感谢!

  5. Kirk : 2012年02月07日15:22:01  -45楼 @回复 回复

    慢的问题最后是优化flash解决的.
    我又遇到了一个奇怪的问题,百思不得其解
    onKeyDown函数,我在代码中把往air发的onkeydown屏蔽掉了,改写成弹出一个dialog,但是我同事用AS3写的游戏代码仍然会获取到onKeyDown的信息,并且我写的onKeyDown函数运行不到了!
    再请教个问题,关于AIR for android, 哪里有参考资料?我想全面的多了解一下,谢谢

    • 润物无声 : 2012年02月07日21:24:13 @回复 回复

      这个从理论上来说,如果把onkeydown发送消息那里取消掉的话,自己的应用是无法收到该消息的,如果仍能收到消息,希望您再调试调试,我这边不好直接下其他结论。参考资料可以到我的在线书库:AIR,希望对你有所帮助。

  6. Kirk : 2012年02月03日14:34:45  -44楼 @回复 回复

    hi 你好
    代码写的很清晰,我在用的时候遇到一个问题
    如果flash需要用户不断的点击屏幕或者滑动,会频繁的使用onUserInteraction和onTouchEvent,这样会导致屏幕响应的非常慢,请问这块有办法能够优化下吗?
    希望能讨论一下。

    • 润物无声 : 2012年02月03日21:10:39 @回复 回复

      不断点击屏幕或者滑动的话,这两个方法onUsersInteraction和onTouchEvent是会不断被调用的,建议的解决方式是:不要在这两个函数中直接做你需要的工作,先生成一个消息缓存队列,这两个方法中只把消息放到该队列中,这样做的事情最少,另外新建立一个线程来遍历和处理缓存队列中的消息,适当丢弃掉一些密集的消息,这样界面就不会卡了。

      • Kirk : 2012年02月06日11:02:53 @回复 回复

        正在做的flash是类似于切水果的那样的,这样的要保证实时性,并且不能丢掉任何一条消息的吧…

        • 润物无声 : 2012年02月06日21:32:11 @回复 回复

          这个也不是绝对意义的丢弃,就拿切水果的游戏来说,一般的处理方式是,触屏按下+触屏移动+触屏离开这一整套事件来统一处理,处理一次,而实际上这一连串的事件至少在几十个以上,以类似的想法来优化,即相互有联系事件的整合处理。

给我留言

留言无头像?


×
腾讯微博