Stick Squad 3 v1.2.5.9版本的 MD5 值为:375cf7f77a7075270cd68d1397368279
以下内容为反编译后的 AppEntry.java 源代码,内容仅作参考
package air.StickSquad3Android;
import android.R;
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.ActivityInfo;
import android.content.pm.ApplicationInfo;
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.util.Log;
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 com.adobe.air.InstallOfferPingUtils;
import com.adobe.air.ResourceIdMap;
import com.apptracker.android.util.AppConstants;
import dalvik.system.DexClassLoader;
import java.lang.reflect.Method;
import java.net.URISyntaxException;
import java.util.Date;
public class AppEntry extends Activity {
private static final String LOG_TAG = "AppEntry";
private static final String RESOURCE_BUTTON_EXIT = "string.button_exit";
private static final String RESOURCE_BUTTON_INSTALL = "string.button_install";
private static final String RESOURCE_CLASS = "air.StickSquad3Android.R";
private static final String RESOURCE_TEXT_RUNTIME_REQUIRED = "string.text_runtime_required";
private static final String RESOURCE_TITLE_ADOBE_AIR = "string.title_adobe_air";
private static Class<?> sAndroidActivityWrapperClass;
private static DexClassLoader sDloader;
private static boolean sRuntimeClassesLoaded = false;
private static Object sAndroidActivityWrapper = null;
private static AppEntry sThis = null;
private static String RUNTIME_PACKAGE_ID = "com.adobe.air";
private static String AIR_PING_URL = "http://airdownload2.adobe.com/air?";
private void BroadcastIntent(String action, String data) {
try {
startActivity(Intent.parseUri(data, 0).setAction(action).addFlags(268435456));
} catch (ActivityNotFoundException e) {
} catch (URISyntaxException e2) {
}
}
public void launchMarketPlaceForAIR() {
String airDownloadURL = null;
try {
ActivityInfo info = getPackageManager().getActivityInfo(getComponentName(), 128);
Bundle metadata = info.metaData;
if (metadata != null) {
airDownloadURL = (String) metadata.get("airDownloadURL");
}
} catch (PackageManager.NameNotFoundException e) {
}
String marketPlaceURL = airDownloadURL;
if (marketPlaceURL == null) {
marketPlaceURL = "market://details?id=" + RUNTIME_PACKAGE_ID;
}
try {
BroadcastIntent("android.intent.action.VIEW", marketPlaceURL);
} catch (Exception e2) {
}
}
private boolean isRuntimeInstalled() {
PackageManager pkgMgr = getPackageManager();
try {
pkgMgr.getPackageInfo(RUNTIME_PACKAGE_ID, 256);
return true;
} catch (PackageManager.NameNotFoundException e) {
return false;
}
}
private boolean isRuntimeOnExternalStorage() {
ApplicationInfo appInfo;
PackageManager pkgMgr = getPackageManager();
try {
appInfo = pkgMgr.getApplicationInfo(RUNTIME_PACKAGE_ID, 8192);
} catch (PackageManager.NameNotFoundException e) {
}
if ((appInfo.flags & 262144) == 262144) {
return true;
}
return false;
}
private void showDialog(int titleId, String text, int positiveButtonId, int negativeButtonId) {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setTitle(titleId);
alertDialogBuilder.setMessage(text);
alertDialogBuilder.setPositiveButton(positiveButtonId, new AnonymousClass1());
alertDialogBuilder.setOnCancelListener(new AnonymousClass2());
alertDialogBuilder.show();
}
public class AnonymousClass1 implements DialogInterface.OnClickListener {
AnonymousClass1() {
}
@Override
public void onClick(DialogInterface dialog, int which) {
AppEntry.this.launchMarketPlaceForAIR();
InstallOfferPingUtils.PingAndExit(AppEntry.sThis, AppEntry.AIR_PING_URL, true, false, true);
}
}
public class AnonymousClass2 implements DialogInterface.OnCancelListener {
AnonymousClass2() {
}
@Override
public void onCancel(DialogInterface dialog) {
InstallOfferPingUtils.PingAndExit(AppEntry.sThis, AppEntry.AIR_PING_URL, false, false, true);
}
}
private void showRuntimeNotInstalledDialog() {
ResourceIdMap r = new ResourceIdMap(RESOURCE_CLASS);
String text = getString(r.getId(RESOURCE_TEXT_RUNTIME_REQUIRED)) + getString(r.getId("string.text_install_runtime"));
showDialog(r.getId(RESOURCE_TITLE_ADOBE_AIR), text, r.getId(RESOURCE_BUTTON_INSTALL), r.getId(RESOURCE_BUTTON_EXIT));
}
private void showRuntimeOnExternalStorageDialog() {
ResourceIdMap r = new ResourceIdMap(RESOURCE_CLASS);
String text = getString(r.getId(RESOURCE_TEXT_RUNTIME_REQUIRED)) + getString(r.getId("string.text_runtime_on_external_storage"));
showDialog(r.getId(RESOURCE_TITLE_ADOBE_AIR), text, r.getId(RESOURCE_BUTTON_INSTALL), r.getId(RESOURCE_BUTTON_EXIT));
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
sThis = this;
Date t = new Date();
long millis = t.getTime();
Log.i("StartupTime1", AppConstants.K + millis);
boolean hasCaptiveRuntime = loadCaptiveRuntimeClasses();
if (!hasCaptiveRuntime) {
if (!sRuntimeClassesLoaded && !isRuntimeInstalled()) {
if (isRuntimeOnExternalStorage()) {
showRuntimeOnExternalStorageDialog();
return;
} else {
showRuntimeNotInstalledDialog();
return;
}
}
loadSharedRuntimeDex();
}
if (sRuntimeClassesLoaded) {
createActivityWrapper(hasCaptiveRuntime);
InvokeWrapperOnCreate();
} else if (hasCaptiveRuntime) {
KillSelf();
} else {
launchAIRService();
}
}
private void registerForNotifications() {
Intent serviceIntent = new Intent("com.adobe.air.AndroidGcmRegistrationService");
serviceIntent.setClassName(RUNTIME_PACKAGE_ID, "com.adobe.air.AndroidGcmRegistrationService");
startService(serviceIntent);
}
private void launchAIRService() {
try {
Intent intent = new Intent("com.adobe.air.AIRServiceAction");
intent.setClassName(RUNTIME_PACKAGE_ID, "com.adobe.air.AIRService");
ServiceConnection conn = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
AppEntry.this.unbindService(this);
AppEntry.this.loadSharedRuntimeDex();
AppEntry.this.createActivityWrapper(false);
if (AppEntry.sRuntimeClassesLoaded) {
AppEntry.this.InvokeWrapperOnCreate();
} else {
AppEntry.KillSelf();
}
}
@Override
public void onServiceDisconnected(ComponentName name) {
}
};
bindService(intent, conn, 1);
} catch (Exception e) {
}
}
public void InvokeWrapperOnCreate() {
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreate", Activity.class, String[].class);
Boolean isADL = new Boolean(false);
Boolean isDebuggerMode = new Boolean(false);
String[] args = {"", "", "-nodebug", isADL.toString(), isDebuggerMode.toString()};
InvokeMethod(method, this, args);
} catch (Exception e) {
}
}
private Object InvokeMethod(Method method, Object... args) {
if (!sRuntimeClassesLoaded) {
return null;
}
Object retval = null;
try {
if (args != null) {
retval = method.invoke(sAndroidActivityWrapper, args);
} else {
retval = method.invoke(sAndroidActivityWrapper, new Object[0]);
}
return retval;
} catch (Exception e) {
return retval;
}
}
public static void KillSelf() {
Process.killProcess(Process.myPid());
}
@Override
public void onStart() {
super.onStart();
}
@Override
public void onRestart() {
super.onRestart();
try {
if (sRuntimeClassesLoaded) {
Method method = sAndroidActivityWrapperClass.getMethod("onRestart", new Class[0]);
InvokeMethod(method, new Object[0]);
}
} catch (Exception e) {
}
}
@Override
public void onPause() {
super.onPause();
try {
if (sRuntimeClassesLoaded) {
Method method = sAndroidActivityWrapperClass.getMethod("onPause", new Class[0]);
InvokeMethod(method, new Object[0]);
}
} catch (Exception e) {
}
}
@Override
public void onResume() {
super.onResume();
try {
if (sRuntimeClassesLoaded) {
Method method = sAndroidActivityWrapperClass.getMethod("onResume", new Class[0]);
InvokeMethod(method, new Object[0]);
}
} catch (Exception e) {
}
}
@Override
public void onStop() {
super.onStop();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onStop", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
@Override
public void onDestroy() {
super.onDestroy();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onDestroy", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
sThis = null;
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onConfigurationChanged", Configuration.class);
InvokeMethod(method, newConfig);
} catch (Exception e) {
}
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
try {
Method method = sAndroidActivityWrapperClass.getMethod("dispatchKeyEvent", KeyEvent.class, Boolean.TYPE);
InvokeMethod(method, event, false);
} catch (Exception e) {
}
return 0 != 0 || super.dispatchKeyEvent(event);
}
public boolean dispatchGenericMotionEvent(MotionEvent event) {
try {
Method method = sAndroidActivityWrapperClass.getMethod("dispatchGenericMotionEvent", MotionEvent.class, Boolean.TYPE);
InvokeMethod(method, event, false);
} catch (Exception e) {
}
return 0 != 0 || super.dispatchGenericMotionEvent(event);
}
@Override
public void onLowMemory() {
try {
Method method = sAndroidActivityWrapperClass.getMethod("onLowMemory", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
try {
if (sRuntimeClassesLoaded) {
Method method = sAndroidActivityWrapperClass.getMethod("onActivityResult", Integer.TYPE, Integer.TYPE, Intent.class);
InvokeMethod(method, Integer.valueOf(requestCode), Integer.valueOf(resultCode), data);
}
} catch (Exception e) {
}
}
@Override
public void onNewIntent(Intent aIntent) {
super.onNewIntent(aIntent);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onNewIntent", Intent.class);
InvokeMethod(method, aIntent);
} catch (Exception e) {
}
}
private boolean loadCaptiveRuntimeClasses() {
boolean hasCaptiveRuntime = false;
try {
sAndroidActivityWrapperClass = Class.forName("com.adobe.air.AndroidActivityWrapper");
hasCaptiveRuntime = true;
if (sAndroidActivityWrapperClass != null) {
sRuntimeClassesLoaded = true;
}
} catch (Exception e) {
}
return hasCaptiveRuntime;
}
public void loadSharedRuntimeDex() {
try {
if (!sRuntimeClassesLoaded) {
Context con = createPackageContext(RUNTIME_PACKAGE_ID, 3);
sDloader = new DexClassLoader(RUNTIME_PACKAGE_ID, getFilesDir().getAbsolutePath(), null, con.getClassLoader());
sAndroidActivityWrapperClass = sDloader.loadClass("com.adobe.air.AndroidActivityWrapper");
if (sAndroidActivityWrapperClass != null) {
sRuntimeClassesLoaded = true;
}
}
} catch (Exception e) {
}
}
public void createActivityWrapper(boolean hasCaptiveRuntime) {
try {
if (hasCaptiveRuntime) {
Method methodCreateAndroidActivityWrapper = sAndroidActivityWrapperClass.getMethod("CreateAndroidActivityWrapper", Activity.class, Boolean.class);
sAndroidActivityWrapper = methodCreateAndroidActivityWrapper.invoke(null, this, Boolean.valueOf(hasCaptiveRuntime));
} else {
Method methodCreateAndroidActivityWrapper2 = sAndroidActivityWrapperClass.getMethod("CreateAndroidActivityWrapper", Activity.class);
sAndroidActivityWrapper = methodCreateAndroidActivityWrapper2.invoke(null, this);
}
} catch (Exception e) {
}
}
@Override
public void finishActivityFromChild(Activity child, int requestCode) {
super.finishActivityFromChild(child, requestCode);
try {
Method method = sAndroidActivityWrapperClass.getMethod("finishActivityFromChild", Activity.class, Integer.TYPE);
InvokeMethod(method, child, Integer.valueOf(requestCode));
} catch (Exception e) {
}
}
@Override
public void finishFromChild(Activity child) {
super.finishFromChild(child);
try {
Method method = sAndroidActivityWrapperClass.getMethod("finishFromChild", Activity.class);
InvokeMethod(method, child);
} catch (Exception e) {
}
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onAttachedToWindow", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
@Override
public void onBackPressed() {
super.onBackPressed();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onBackPressed", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
@Override
public void onContentChanged() {
super.onContentChanged();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onContentChanged", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
@Override
public boolean onContextItemSelected(MenuItem item) {
boolean retval = super.onContextItemSelected(item);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onContextItemSelected", MenuItem.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, item, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public void onContextMenuClosed(Menu menu) {
super.onContextMenuClosed(menu);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onContextMenuClosed", Menu.class);
InvokeMethod(method, menu);
} catch (Exception e) {
}
}
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreateContextMenu", ContextMenu.class, View.class, ContextMenu.ContextMenuInfo.class);
InvokeMethod(method, menu, v, menuInfo);
} catch (Exception e) {
}
}
@Override
public CharSequence onCreateDescription() {
CharSequence retval = super.onCreateDescription();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreateDescription", CharSequence.class);
return (CharSequence) InvokeMethod(method, retval);
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
boolean retval = super.onCreateOptionsMenu(menu);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreateOptionsMenu", Menu.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, menu, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onCreatePanelMenu(int featureId, Menu menu) {
boolean retval = super.onCreatePanelMenu(featureId, menu);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreatePanelMenu", Integer.TYPE, Menu.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Integer.valueOf(featureId), menu, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public View onCreatePanelView(int featureId) {
View retval = super.onCreatePanelView(featureId);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreatePanelView", Integer.TYPE, View.class);
return (View) InvokeMethod(method, Integer.valueOf(featureId), retval);
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas) {
boolean retval = super.onCreateThumbnail(outBitmap, canvas);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreateThumbnail", Bitmap.class, Canvas.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, outBitmap, canvas, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public View onCreateView(String name, Context context, AttributeSet attrs) {
View retval = super.onCreateView(name, context, attrs);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreateView", String.class, Context.class, AttributeSet.class, View.class);
return (View) InvokeMethod(method, name, context, attrs, retval);
} catch (Exception e) {
return retval;
}
}
@Override
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onDetachedFromWindow", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean retval = super.onKeyDown(keyCode, event);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onKeyDown", Integer.TYPE, KeyEvent.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Integer.valueOf(keyCode), event, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
boolean retval = super.onKeyLongPress(keyCode, event);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onKeyLongPress", Integer.TYPE, KeyEvent.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Integer.valueOf(keyCode), event, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) {
boolean retval = super.onKeyMultiple(keyCode, repeatCount, event);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onKeyMultiple", Integer.TYPE, Integer.TYPE, KeyEvent.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Integer.valueOf(keyCode), Integer.valueOf(repeatCount), event, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
boolean retval = super.onKeyUp(keyCode, event);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onKeyUp", Integer.TYPE, KeyEvent.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Integer.valueOf(keyCode), event, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
boolean retval = super.onMenuItemSelected(featureId, item);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onMenuItemSelected", Integer.TYPE, MenuItem.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Integer.valueOf(featureId), item, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onMenuOpened(int featureId, Menu menu) {
boolean retval = super.onMenuOpened(featureId, menu);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onMenuOpened", Integer.TYPE, Menu.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Integer.valueOf(featureId), menu, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
boolean retval = super.onOptionsItemSelected(item);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onOptionsItemSelected", MenuItem.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, item, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public void onOptionsMenuClosed(Menu menu) {
super.onOptionsMenuClosed(menu);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onOptionsMenuClosed", Menu.class);
InvokeMethod(method, menu);
} catch (Exception e) {
}
}
@Override
public void onPanelClosed(int featureId, Menu menu) {
super.onPanelClosed(featureId, menu);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onPanelClosed", Integer.TYPE, Menu.class);
InvokeMethod(method, Integer.valueOf(featureId), menu);
} catch (Exception e) {
}
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
boolean retval = super.onPrepareOptionsMenu(menu);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onPrepareOptionsMenu", Menu.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, menu, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onPreparePanel(int featureId, View view, Menu menu) {
boolean retval = super.onPreparePanel(featureId, view, menu);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onPreparePanel", Integer.TYPE, View.class, Menu.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Integer.valueOf(featureId), view, menu, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public Object onRetainNonConfigurationInstance() {
Object retval = super.onRetainNonConfigurationInstance();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onRetainNonConfigurationInstance", Object.class);
return InvokeMethod(method, retval);
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onSearchRequested() {
boolean retval = super.onSearchRequested();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onSearchRequested", Boolean.TYPE);
return ((Boolean) InvokeMethod(method, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
boolean retval = super.onTouchEvent(event);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onTouchEvent", MotionEvent.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, event, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public boolean onTrackballEvent(MotionEvent event) {
boolean retval = super.onTrackballEvent(event);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onTrackballEvent", MotionEvent.class, Boolean.TYPE);
return ((Boolean) InvokeMethod(method, event, Boolean.valueOf(retval))).booleanValue();
} catch (Exception e) {
return retval;
}
}
@Override
public void onUserInteraction() {
super.onUserInteraction();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onUserInteraction", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
@Override
public void onWindowAttributesChanged(WindowManager.LayoutParams params) {
super.onWindowAttributesChanged(params);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onWindowAttributesChanged", WindowManager.LayoutParams.class);
InvokeMethod(method, params);
} catch (Exception e) {
}
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onWindowFocusChanged", Boolean.TYPE);
InvokeMethod(method, Boolean.valueOf(hasFocus));
} catch (Exception e) {
}
}
@Override
public void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
super.onApplyThemeResource(theme, resid, first);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onApplyThemeResource", Resources.Theme.class, Integer.TYPE, Boolean.TYPE);
InvokeMethod(method, theme, Integer.valueOf(resid), Boolean.valueOf(first));
} catch (Exception e) {
}
}
@Override
public void onChildTitleChanged(Activity childActivity, CharSequence title) {
super.onChildTitleChanged(childActivity, title);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onChildTitleChanged", Activity.class, CharSequence.class);
InvokeMethod(method, childActivity, title);
} catch (Exception e) {
}
}
@Override
public Dialog onCreateDialog(int id) {
Dialog retval = super.onCreateDialog(id);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreateDialog", Integer.TYPE, Dialog.class);
return (Dialog) InvokeMethod(method, Integer.valueOf(id), retval);
} catch (Exception e) {
return retval;
}
}
protected Dialog onCreateDialog(int id, Bundle args) {
Dialog retval = super.onCreateDialog(id, args);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onCreateDialog", Integer.TYPE, Bundle.class, Dialog.class);
return (Dialog) InvokeMethod(method, Integer.valueOf(id), args, retval);
} catch (Exception e) {
return retval;
}
}
@Override
public void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onPostCreate", Bundle.class);
InvokeMethod(method, savedInstanceState);
} catch (Exception e) {
}
}
@Override
public void onPostResume() {
super.onPostResume();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onPostResume", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
@Override
public void onPrepareDialog(int id, Dialog dialog) {
super.onPrepareDialog(id, dialog);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onPrepareDialog", R.id.class, Dialog.class);
InvokeMethod(method, Integer.valueOf(id), dialog);
} catch (Exception e) {
}
}
protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
super.onPrepareDialog(id, dialog, args);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onPrepareDialog", R.id.class, Dialog.class, Bundle.class);
InvokeMethod(method, Integer.valueOf(id), dialog, args);
} catch (Exception e) {
}
}
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onRestoreInstanceState", Bundle.class);
InvokeMethod(method, savedInstanceState);
} catch (Exception e) {
}
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onSaveInstanceState", Bundle.class);
InvokeMethod(method, outState);
} catch (Exception e) {
}
}
@Override
public void onTitleChanged(CharSequence title, int color) {
super.onTitleChanged(title, color);
try {
Method method = sAndroidActivityWrapperClass.getMethod("onTitleChanged", CharSequence.class, Integer.TYPE);
InvokeMethod(method, title, Integer.valueOf(color));
} catch (Exception e) {
}
}
@Override
public void onUserLeaveHint() {
super.onUserLeaveHint();
try {
Method method = sAndroidActivityWrapperClass.getMethod("onUserLeaveHint", new Class[0]);
InvokeMethod(method, new Object[0]);
} catch (Exception e) {
}
}
}