Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.kde.necessitas.origo;
- import android.app.Activity;
- import android.app.AlertDialog;
- import android.app.AlertDialog.Builder;
- import android.app.Dialog;
- import android.content.ComponentName;
- import android.content.Context;
- import android.content.DialogInterface;
- import android.content.DialogInterface.OnClickListener;
- import android.content.Intent;
- import android.content.ServiceConnection;
- import android.content.pm.ActivityInfo;
- import android.content.pm.PackageManager;
- import android.content.pm.PackageManager.NameNotFoundException;
- import android.content.res.Configuration;
- import android.content.res.Resources;
- import android.content.res.Resources.Theme;
- import android.graphics.Bitmap;
- import android.graphics.Canvas;
- import android.net.Uri;
- import android.os.Bundle;
- import android.os.IBinder;
- import android.os.RemoteException;
- import android.util.AttributeSet;
- import android.util.Log;
- import android.view.ContextMenu;
- import android.view.ContextMenu.ContextMenuInfo;
- import android.view.KeyEvent;
- import android.view.Menu;
- import android.view.MenuItem;
- import android.view.MotionEvent;
- import android.view.View;
- import android.view.WindowManager.LayoutParams;
- import android.view.accessibility.AccessibilityEvent;
- import dalvik.system.DexClassLoader;
- import java.io.File;
- import java.lang.reflect.Method;
- import java.util.ArrayList;
- import java.util.Arrays;
- import org.kde.necessitas.ministro.IMinistro;
- import org.kde.necessitas.ministro.IMinistro.Stub;
- import org.kde.necessitas.ministro.IMinistroCallback;
- import org.kde.necessitas.ministro.IMinistroCallback.Stub;
- public class QtActivity extends Activity
- {
- private static final String APPLICATION_PARAMETERS = null;
- private static final String APPLICATION_PARAMETERS_KEY = "application.parameters";
- private static final String APPLICATION_TITLE_KEY = "application.title";
- private static final String BUNDLED_LIBRARIES_KEY = "bundled.libraries";
- private static final String DEX_PATH_KEY = "dex.path";
- private static final String ENVIRONMENT_VARIABLES = "QT_USE_ANDROID_NATIVE_STYLE=1\t";
- private static final String ENVIRONMENT_VARIABLES_KEY = "environment.variables";
- private static final String ERROR_CODE_KEY = "error.code";
- private static final String ERROR_MESSAGE_KEY = "error.message";
- private static final int INCOMPATIBLE_MINISTRO_VERSION = 1;
- private static final String LIB_PATH_KEY = "lib.path";
- private static final String LOADER_CLASS_NAME_KEY = "loader.class.name";
- private static final String MAIN_LIBRARY_KEY = "main.library";
- private static final String MINIMUM_MINISTRO_API_KEY = "minimum.ministro.api";
- private static final String MINIMUM_QT_VERSION_KEY = "minimum.qt.version";
- private static final int MINISTRO_API_LEVEL = 2;
- private static final int MINISTRO_INSTALL_REQUEST_CODE = 62446;
- private static final String NATIVE_LIBRARIES_KEY = "native.libraries";
- private static final int NECESSITAS_API_LEVEL = 2;
- private static final String NECESSITAS_API_LEVEL_KEY = "necessitas.api.level";
- private static final String QT_PROVIDER = "necessitas";
- private static final String QT_PROVIDER_KEY = "qt.provider";
- private static final int QT_VERSION = 264193;
- private static final String REQUIRED_MODULES_KEY = "required.modules";
- private ActivityInfo m_activityInfo = null;
- private DexClassLoader m_classLoader = null;
- private ServiceConnection m_ministroConnection = new ServiceConnection()
- {
- private IMinistroCallback m_ministroCallback = new IMinistroCallback.Stub()
- {
- public void loaderReady(final Bundle paramAnonymous2Bundle)
- throws RemoteException
- {
- QtActivity.this.runOnUiThread(new Runnable()
- {
- public void run()
- {
- QtActivity.this.unbindService(QtActivity.this.m_ministroConnection);
- QtActivity.this.loadApplication(paramAnonymous2Bundle);
- }
- });
- }
- };
- private IMinistro m_service = null;
- public void onServiceConnected(ComponentName paramAnonymousComponentName, IBinder paramAnonymousIBinder)
- {
- this.m_service = IMinistro.Stub.asInterface(paramAnonymousIBinder);
- try
- {
- if (this.m_service != null)
- {
- Bundle localBundle = new Bundle();
- localBundle.putStringArray("required.modules", QtActivity.this.m_qtLibs);
- localBundle.putString("application.title", (String)QtActivity.this.getTitle());
- localBundle.putInt("minimum.ministro.api", 2);
- localBundle.putString("qt.provider", "necessitas");
- localBundle.putInt("minimum.qt.version", 264193);
- localBundle.putString("environment.variables", "QT_USE_ANDROID_NATIVE_STYLE=1\t");
- if (QtActivity.APPLICATION_PARAMETERS != null)
- localBundle.putString("application.parameters", QtActivity.APPLICATION_PARAMETERS);
- this.m_service.requestLoader(this.m_ministroCallback, localBundle);
- }
- return;
- }
- catch (RemoteException localRemoteException)
- {
- localRemoteException.printStackTrace();
- }
- }
- public void onServiceDisconnected(ComponentName paramAnonymousComponentName)
- {
- this.m_service = null;
- }
- };
- private String[] m_qtLibs = null;
- private void downloadUpgradeMinistro(String paramString)
- {
- AlertDialog.Builder localBuilder = new AlertDialog.Builder(this);
- localBuilder.setMessage(paramString);
- localBuilder.setPositiveButton(17039379, new DialogInterface.OnClickListener()
- {
- public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
- {
- try
- {
- Intent localIntent = new Intent("android.intent.action.VIEW", Uri.parse("market://search?q=pname:org.kde.necessitas.ministro"));
- QtActivity.this.startActivityForResult(localIntent, 62446);
- return;
- }
- catch (Exception localException)
- {
- localException.printStackTrace();
- QtActivity.this.ministroNotFound();
- }
- }
- });
- localBuilder.setNegativeButton(17039369, new DialogInterface.OnClickListener()
- {
- public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
- {
- QtActivity.this.finish();
- }
- });
- localBuilder.show();
- }
- private void loadApplication(Bundle paramBundle)
- {
- AlertDialog localAlertDialog1;
- try
- {
- int i = paramBundle.getInt("error.code");
- if (i == 0)
- break label163;
- if (i == 1)
- {
- downloadUpgradeMinistro(paramBundle.getString("error.message"));
- return;
- }
- AlertDialog localAlertDialog2 = new AlertDialog.Builder(this).create();
- localAlertDialog2.setMessage(paramBundle.getString("error.message"));
- localAlertDialog2.setButton(getResources().getString(17039370), new DialogInterface.OnClickListener()
- {
- public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
- {
- QtActivity.this.finish();
- }
- });
- localAlertDialog2.show();
- return;
- }
- catch (Exception localException)
- {
- localException.printStackTrace();
- localAlertDialog1 = new AlertDialog.Builder(this).create();
- if (this.m_activityInfo == null)
- break label495;
- }
- label163: String str1;
- String str2;
- String str3;
- if (this.m_activityInfo.metaData.containsKey("android.app.fatal_error_msg"))
- {
- localAlertDialog1.setMessage(this.m_activityInfo.metaData.getString("android.app.fatal_error_msg"));
- localAlertDialog1.setButton(getResources().getString(17039370), new DialogInterface.OnClickListener()
- {
- public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
- {
- QtActivity.this.finish();
- }
- });
- localAlertDialog1.show();
- return;
- ArrayList localArrayList = new ArrayList();
- if (this.m_activityInfo.metaData.containsKey("android.app.bundled_libs_resource_id"))
- localArrayList.addAll(Arrays.asList(getResources().getStringArray(this.m_activityInfo.metaData.getInt("android.app.bundled_libs_resource_id"))));
- boolean bool = this.m_activityInfo.metaData.containsKey("android.app.lib_name");
- str1 = null;
- if (bool)
- {
- str1 = this.m_activityInfo.metaData.getString("android.app.lib_name");
- paramBundle.putString("main.library", str1);
- }
- paramBundle.putStringArrayList("bundled.libraries", localArrayList);
- paramBundle.putInt("necessitas.api.level", 2);
- str2 = paramBundle.getString("dex.path");
- str3 = getDir("outdex", 0).getAbsolutePath();
- if (!paramBundle.containsKey("lib.path"))
- break label506;
- }
- label495: label506: for (String str4 = paramBundle.getString("lib.path"); ; str4 = null)
- {
- this.m_classLoader = new DexClassLoader(str2, str3, str4, getClassLoader());
- Object localObject = this.m_classLoader.loadClass(paramBundle.getString("loader.class.name")).newInstance();
- Method localMethod = localObject.getClass().getMethod("loadApplication", new Class[] { Activity.class, ClassLoader.class, Bundle.class });
- Object[] arrayOfObject = new Object[3];
- arrayOfObject[0] = this;
- arrayOfObject[1] = this.m_classLoader;
- arrayOfObject[2] = paramBundle;
- if (!((Boolean)localMethod.invoke(localObject, arrayOfObject)).booleanValue())
- throw new Exception("");
- QtApplication.setQtActivityDelegate(localObject);
- if (str1 != null)
- System.loadLibrary(str1);
- if (!((Boolean)localObject.getClass().getMethod("startApplication", new Class[0]).invoke(localObject, new Object[0])).booleanValue())
- {
- throw new Exception("");
- localAlertDialog1.setMessage("Fatal error, your application can't be started.");
- break;
- }
- return;
- }
- }
- private void ministroNotFound()
- {
- AlertDialog localAlertDialog = new AlertDialog.Builder(this).create();
- if ((this.m_activityInfo != null) && (this.m_activityInfo.metaData.containsKey("android.app.ministro_not_found_msg")))
- localAlertDialog.setMessage(this.m_activityInfo.metaData.getString("android.app.ministro_not_found_msg"));
- while (true)
- {
- localAlertDialog.setButton(getResources().getString(17039370), new DialogInterface.OnClickListener()
- {
- public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
- {
- QtActivity.this.finish();
- }
- });
- localAlertDialog.show();
- return;
- localAlertDialog.setMessage("Can't find Ministro service.\nThe application can't start.");
- }
- }
- private void startApp(boolean paramBoolean)
- {
- while (true)
- {
- int n;
- int k;
- try
- {
- ActivityInfo localActivityInfo = getPackageManager().getActivityInfo(getComponentName(), 128);
- if (localActivityInfo.metaData.containsKey("android.app.qt_libs_resource_id"))
- {
- int i1 = localActivityInfo.metaData.getInt("android.app.qt_libs_resource_id");
- this.m_qtLibs = getResources().getStringArray(i1);
- }
- if ((getIntent().getExtras() != null) && (getIntent().getExtras().containsKey("use_local_qt_libs")) && (getIntent().getExtras().getString("use_local_qt_libs").equals("true")))
- {
- ArrayList localArrayList = new ArrayList();
- String str2 = "/data/local/qt/";
- if (getIntent().getExtras().containsKey("libs_prefix"))
- str2 = getIntent().getExtras().getString("libs_prefix");
- if (this.m_qtLibs != null)
- {
- int i = 0;
- if (i < this.m_qtLibs.length)
- {
- localArrayList.add(str2 + "lib/lib" + this.m_qtLibs[i] + ".so");
- i++;
- continue;
- }
- }
- if (getIntent().getExtras().containsKey("load_local_libs"))
- {
- String[] arrayOfString2 = getIntent().getExtras().getString("load_local_libs").split(":");
- int m = arrayOfString2.length;
- n = 0;
- if (n < m)
- {
- String str7 = arrayOfString2[n];
- if (str7.length() <= 0)
- break label716;
- localArrayList.add(str2 + str7);
- break label716;
- }
- }
- String str3 = new String();
- String str4 = System.getProperty("path.separator", ":");
- if (getIntent().getExtras().containsKey("load_local_jars"))
- {
- String[] arrayOfString1 = getIntent().getExtras().getString("load_local_jars").split(":");
- int j = arrayOfString1.length;
- k = 0;
- if (k < j)
- {
- String str6 = arrayOfString1[k];
- if (str6.length() <= 0)
- break label722;
- if (str3.length() > 0)
- str3 = str3 + str4;
- str3 = str3 + str2 + str6;
- break label722;
- }
- }
- Bundle localBundle = new Bundle();
- localBundle.putInt("error.code", 0);
- localBundle.putString("dex.path", str3);
- if (getIntent().getExtras().containsKey("loader_class_name"))
- {
- str5 = getIntent().getExtras().getString("loader_class_name");
- localBundle.putString("loader.class.name", str5);
- localBundle.putStringArrayList("native.libraries", localArrayList);
- localBundle.putString("environment.variables", "QML_IMPORT_PATH=" + str2 + "/imports\tQT_PLUGIN_PATH=" + str2 + "/plugins");
- localBundle.putString("application.parameters", "-platform\tandroid");
- loadApplication(localBundle);
- return;
- }
- String str5 = "org.kde.necessitas.industrius.QtActivityDelegate";
- continue;
- }
- try
- {
- if (bindService(new Intent(IMinistro.class.getCanonicalName()), this.m_ministroConnection, 1))
- break;
- throw new SecurityException("");
- }
- catch (Exception localException2)
- {
- if (!paramBoolean)
- break label711;
- }
- String str1 = "This application requires Ministro service. Would you like to install it?";
- if ((this.m_activityInfo != null) && (this.m_activityInfo.metaData.containsKey("android.app.ministro_needed_msg")))
- str1 = this.m_activityInfo.metaData.getString("android.app.ministro_needed_msg");
- downloadUpgradeMinistro(str1);
- return;
- }
- catch (Exception localException1)
- {
- Log.e("Qt", "Can't create main activity", localException1);
- return;
- }
- label711: ministroNotFound();
- return;
- label716: n++;
- continue;
- label722: k++;
- }
- }
- public boolean dispatchKeyEvent(KeyEvent paramKeyEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.dispatchKeyEvent != null))
- return ((Boolean)QtApplication.invokeDelegateMethod(QtApplication.dispatchKeyEvent, new Object[] { paramKeyEvent })).booleanValue();
- return super.dispatchKeyEvent(paramKeyEvent);
- }
- public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent paramAccessibilityEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.dispatchPopulateAccessibilityEvent != null))
- return ((Boolean)QtApplication.invokeDelegateMethod(QtApplication.dispatchPopulateAccessibilityEvent, new Object[] { paramAccessibilityEvent })).booleanValue();
- return super.dispatchPopulateAccessibilityEvent(paramAccessibilityEvent);
- }
- public boolean dispatchTouchEvent(MotionEvent paramMotionEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.dispatchTouchEvent != null))
- return ((Boolean)QtApplication.invokeDelegateMethod(QtApplication.dispatchTouchEvent, new Object[] { paramMotionEvent })).booleanValue();
- return super.dispatchTouchEvent(paramMotionEvent);
- }
- public boolean dispatchTrackballEvent(MotionEvent paramMotionEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.dispatchTrackballEvent != null))
- return ((Boolean)QtApplication.invokeDelegateMethod(QtApplication.dispatchTrackballEvent, new Object[] { paramMotionEvent })).booleanValue();
- return super.dispatchTrackballEvent(paramMotionEvent);
- }
- protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.onActivityResult != null))
- {
- Method localMethod = QtApplication.onActivityResult;
- Object[] arrayOfObject = new Object[3];
- arrayOfObject[0] = Integer.valueOf(paramInt1);
- arrayOfObject[1] = Integer.valueOf(paramInt2);
- arrayOfObject[2] = paramIntent;
- QtApplication.invokeDelegateMethod(localMethod, arrayOfObject);
- return;
- }
- if (paramInt1 == 62446)
- startApp(false);
- super.onActivityResult(paramInt1, paramInt2, paramIntent);
- }
- protected void onApplyThemeResource(Resources.Theme paramTheme, int paramInt, boolean paramBoolean)
- {
- Object[] arrayOfObject = new Object[3];
- arrayOfObject[0] = paramTheme;
- arrayOfObject[1] = Integer.valueOf(paramInt);
- arrayOfObject[2] = Boolean.valueOf(paramBoolean);
- if (!QtApplication.invokeDelegate(arrayOfObject).invoked)
- super.onApplyThemeResource(paramTheme, paramInt, paramBoolean);
- }
- public void onAttachedToWindow()
- {
- if (!QtApplication.invokeDelegate(new Object[0]).invoked)
- super.onAttachedToWindow();
- }
- public void onBackPressed()
- {
- if (!QtApplication.invokeDelegate(new Object[0]).invoked)
- super.onBackPressed();
- }
- protected void onChildTitleChanged(Activity paramActivity, CharSequence paramCharSequence)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramActivity, paramCharSequence }).invoked)
- super.onChildTitleChanged(paramActivity, paramCharSequence);
- }
- public void onConfigurationChanged(Configuration paramConfiguration)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramConfiguration }).invoked)
- super.onConfigurationChanged(paramConfiguration);
- }
- public void onContentChanged()
- {
- if (!QtApplication.invokeDelegate(new Object[0]).invoked)
- super.onContentChanged();
- }
- public boolean onContextItemSelected(MenuItem paramMenuItem)
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[] { paramMenuItem });
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onContextItemSelected(paramMenuItem);
- }
- public void onContextMenuClosed(Menu paramMenu)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramMenu }).invoked)
- super.onContextMenuClosed(paramMenu);
- }
- public void onCreate(Bundle paramBundle)
- {
- super.onCreate(paramBundle);
- if ((QtApplication.m_delegateObject != null) && (QtApplication.onCreate != null))
- QtApplication.invokeDelegateMethod(QtApplication.onCreate, new Object[] { paramBundle });
- while (true)
- {
- return;
- requestWindowFeature(1);
- try
- {
- this.m_activityInfo = getPackageManager().getActivityInfo(getComponentName(), 128);
- if (getLastNonConfigurationInstance() == null)
- {
- if (this.m_activityInfo.metaData.containsKey("android.app.splash_screen"))
- setContentView(this.m_activityInfo.metaData.getInt("android.app.splash_screen"));
- startApp(true);
- return;
- }
- }
- catch (PackageManager.NameNotFoundException localNameNotFoundException)
- {
- localNameNotFoundException.printStackTrace();
- finish();
- }
- }
- }
- public void onCreateContextMenu(ContextMenu paramContextMenu, View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramContextMenu, paramView, paramContextMenuInfo }).invoked)
- super.onCreateContextMenu(paramContextMenu, paramView, paramContextMenuInfo);
- }
- public CharSequence onCreateDescription()
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[0]);
- if (localInvokeResult.invoked)
- return (CharSequence)localInvokeResult.methodReturns;
- return super.onCreateDescription();
- }
- protected Dialog onCreateDialog(int paramInt)
- {
- Object[] arrayOfObject = new Object[1];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(arrayOfObject);
- if (localInvokeResult.invoked)
- return (Dialog)localInvokeResult.methodReturns;
- return super.onCreateDialog(paramInt);
- }
- public boolean onCreateOptionsMenu(Menu paramMenu)
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[] { paramMenu });
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onCreateOptionsMenu(paramMenu);
- }
- public boolean onCreatePanelMenu(int paramInt, Menu paramMenu)
- {
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramMenu;
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(arrayOfObject);
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onCreatePanelMenu(paramInt, paramMenu);
- }
- public View onCreatePanelView(int paramInt)
- {
- Object[] arrayOfObject = new Object[1];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(arrayOfObject);
- if (localInvokeResult.invoked)
- return (View)localInvokeResult.methodReturns;
- return super.onCreatePanelView(paramInt);
- }
- public boolean onCreateThumbnail(Bitmap paramBitmap, Canvas paramCanvas)
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[] { paramBitmap, paramCanvas });
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onCreateThumbnail(paramBitmap, paramCanvas);
- }
- public View onCreateView(String paramString, Context paramContext, AttributeSet paramAttributeSet)
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[] { paramString, paramContext, paramAttributeSet });
- if (localInvokeResult.invoked)
- return (View)localInvokeResult.methodReturns;
- return super.onCreateView(paramString, paramContext, paramAttributeSet);
- }
- protected void onDestroy()
- {
- super.onDestroy();
- QtApplication.invokeDelegate(new Object[0]);
- }
- public void onDetachedFromWindow()
- {
- if (!QtApplication.invokeDelegate(new Object[0]).invoked)
- super.onDetachedFromWindow();
- }
- public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.onKeyDown != null))
- {
- Method localMethod = QtApplication.onKeyDown;
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramKeyEvent;
- return ((Boolean)QtApplication.invokeDelegateMethod(localMethod, arrayOfObject)).booleanValue();
- }
- return super.onKeyDown(paramInt, paramKeyEvent);
- }
- public boolean onKeyLongPress(int paramInt, KeyEvent paramKeyEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.onKeyLongPress != null))
- {
- Method localMethod = QtApplication.onKeyLongPress;
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramKeyEvent;
- return ((Boolean)QtApplication.invokeDelegateMethod(localMethod, arrayOfObject)).booleanValue();
- }
- return super.onKeyLongPress(paramInt, paramKeyEvent);
- }
- public boolean onKeyMultiple(int paramInt1, int paramInt2, KeyEvent paramKeyEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.onKeyMultiple != null))
- {
- Method localMethod = QtApplication.onKeyMultiple;
- Object[] arrayOfObject = new Object[3];
- arrayOfObject[0] = Integer.valueOf(paramInt1);
- arrayOfObject[1] = Integer.valueOf(paramInt2);
- arrayOfObject[2] = paramKeyEvent;
- return ((Boolean)QtApplication.invokeDelegateMethod(localMethod, arrayOfObject)).booleanValue();
- }
- return super.onKeyMultiple(paramInt1, paramInt2, paramKeyEvent);
- }
- public boolean onKeyUp(int paramInt, KeyEvent paramKeyEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.onKeyDown != null))
- {
- Method localMethod = QtApplication.onKeyUp;
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramKeyEvent;
- return ((Boolean)QtApplication.invokeDelegateMethod(localMethod, arrayOfObject)).booleanValue();
- }
- return super.onKeyUp(paramInt, paramKeyEvent);
- }
- public void onLowMemory()
- {
- if (!QtApplication.invokeDelegate(new Object[0]).invoked)
- super.onLowMemory();
- }
- public boolean onMenuItemSelected(int paramInt, MenuItem paramMenuItem)
- {
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramMenuItem;
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(arrayOfObject);
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onMenuItemSelected(paramInt, paramMenuItem);
- }
- public boolean onMenuOpened(int paramInt, Menu paramMenu)
- {
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramMenu;
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(arrayOfObject);
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onMenuOpened(paramInt, paramMenu);
- }
- protected void onNewIntent(Intent paramIntent)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramIntent }).invoked)
- super.onNewIntent(paramIntent);
- }
- public boolean onOptionsItemSelected(MenuItem paramMenuItem)
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[] { paramMenuItem });
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onOptionsItemSelected(paramMenuItem);
- }
- public void onOptionsMenuClosed(Menu paramMenu)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramMenu }).invoked)
- super.onOptionsMenuClosed(paramMenu);
- }
- public void onPanelClosed(int paramInt, Menu paramMenu)
- {
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramMenu;
- if (!QtApplication.invokeDelegate(arrayOfObject).invoked)
- super.onPanelClosed(paramInt, paramMenu);
- }
- protected void onPause()
- {
- super.onPause();
- QtApplication.invokeDelegate(new Object[0]);
- }
- protected void onPostCreate(Bundle paramBundle)
- {
- super.onPostCreate(paramBundle);
- QtApplication.invokeDelegate(new Object[] { paramBundle });
- }
- protected void onPostResume()
- {
- super.onPostResume();
- QtApplication.invokeDelegate(new Object[0]);
- }
- protected void onPrepareDialog(int paramInt, Dialog paramDialog)
- {
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramDialog;
- if (!QtApplication.invokeDelegate(arrayOfObject).invoked)
- super.onPrepareDialog(paramInt, paramDialog);
- }
- public boolean onPrepareOptionsMenu(Menu paramMenu)
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[] { paramMenu });
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onPrepareOptionsMenu(paramMenu);
- }
- public boolean onPreparePanel(int paramInt, View paramView, Menu paramMenu)
- {
- Object[] arrayOfObject = new Object[3];
- arrayOfObject[0] = Integer.valueOf(paramInt);
- arrayOfObject[1] = paramView;
- arrayOfObject[2] = paramMenu;
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(arrayOfObject);
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onPreparePanel(paramInt, paramView, paramMenu);
- }
- protected void onRestart()
- {
- super.onRestart();
- QtApplication.invokeDelegate(new Object[0]);
- }
- protected void onRestoreInstanceState(Bundle paramBundle)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramBundle }).invoked)
- super.onRestoreInstanceState(paramBundle);
- }
- protected void onResume()
- {
- super.onResume();
- QtApplication.invokeDelegate(new Object[0]);
- }
- public Object onRetainNonConfigurationInstance()
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[0]);
- if (localInvokeResult.invoked)
- return localInvokeResult.methodReturns;
- return super.onRetainNonConfigurationInstance();
- }
- protected void onSaveInstanceState(Bundle paramBundle)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramBundle }).invoked)
- super.onSaveInstanceState(paramBundle);
- }
- public boolean onSearchRequested()
- {
- QtApplication.InvokeResult localInvokeResult = QtApplication.invokeDelegate(new Object[0]);
- if (localInvokeResult.invoked)
- return ((Boolean)localInvokeResult.methodReturns).booleanValue();
- return super.onSearchRequested();
- }
- protected void onStart()
- {
- super.onStart();
- QtApplication.invokeDelegate(new Object[0]);
- }
- protected void onStop()
- {
- super.onStop();
- QtApplication.invokeDelegate(new Object[0]);
- }
- protected void onTitleChanged(CharSequence paramCharSequence, int paramInt)
- {
- Object[] arrayOfObject = new Object[2];
- arrayOfObject[0] = paramCharSequence;
- arrayOfObject[1] = Integer.valueOf(paramInt);
- if (!QtApplication.invokeDelegate(arrayOfObject).invoked)
- super.onTitleChanged(paramCharSequence, paramInt);
- }
- public boolean onTouchEvent(MotionEvent paramMotionEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.onTouchEvent != null))
- return ((Boolean)QtApplication.invokeDelegateMethod(QtApplication.onTouchEvent, new Object[] { paramMotionEvent })).booleanValue();
- return super.onTouchEvent(paramMotionEvent);
- }
- public boolean onTrackballEvent(MotionEvent paramMotionEvent)
- {
- if ((QtApplication.m_delegateObject != null) && (QtApplication.onTrackballEvent != null))
- return ((Boolean)QtApplication.invokeDelegateMethod(QtApplication.onTrackballEvent, new Object[] { paramMotionEvent })).booleanValue();
- return super.onTrackballEvent(paramMotionEvent);
- }
- public void onUserInteraction()
- {
- if (!QtApplication.invokeDelegate(new Object[0]).invoked)
- super.onUserInteraction();
- }
- protected void onUserLeaveHint()
- {
- if (!QtApplication.invokeDelegate(new Object[0]).invoked)
- super.onUserLeaveHint();
- }
- public void onWindowAttributesChanged(WindowManager.LayoutParams paramLayoutParams)
- {
- if (!QtApplication.invokeDelegate(new Object[] { paramLayoutParams }).invoked)
- super.onWindowAttributesChanged(paramLayoutParams);
- }
- public void onWindowFocusChanged(boolean paramBoolean)
- {
- Object[] arrayOfObject = new Object[1];
- arrayOfObject[0] = Boolean.valueOf(paramBoolean);
- if (!QtApplication.invokeDelegate(arrayOfObject).invoked)
- super.onWindowFocusChanged(paramBoolean);
- }
- public boolean super_dispatchKeyEvent(KeyEvent paramKeyEvent)
- {
- return super.dispatchKeyEvent(paramKeyEvent);
- }
- public boolean super_dispatchPopulateAccessibilityEvent(AccessibilityEvent paramAccessibilityEvent)
- {
- return super_dispatchPopulateAccessibilityEvent(paramAccessibilityEvent);
- }
- public boolean super_dispatchTouchEvent(MotionEvent paramMotionEvent)
- {
- return super.dispatchTouchEvent(paramMotionEvent);
- }
- public boolean super_dispatchTrackballEvent(MotionEvent paramMotionEvent)
- {
- return super.dispatchTrackballEvent(paramMotionEvent);
- }
- public void super_onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
- {
- super.onActivityResult(paramInt1, paramInt2, paramIntent);
- }
- public void super_onApplyThemeResource(Resources.Theme paramTheme, int paramInt, boolean paramBoolean)
- {
- super.onApplyThemeResource(paramTheme, paramInt, paramBoolean);
- }
- public void super_onAttachedToWindow()
- {
- super.onAttachedToWindow();
- }
- public void super_onBackPressed()
- {
- super.onBackPressed();
- }
- public void super_onChildTitleChanged(Activity paramActivity, CharSequence paramCharSequence)
- {
- super.onChildTitleChanged(paramActivity, paramCharSequence);
- }
- public void super_onConfigurationChanged(Configuration paramConfiguration)
- {
- super.onConfigurationChanged(paramConfiguration);
- }
- public void super_onContentChanged()
- {
- super.onContentChanged();
- }
- public boolean super_onContextItemSelected(MenuItem paramMenuItem)
- {
- return super.onContextItemSelected(paramMenuItem);
- }
- public void super_onContextMenuClosed(Menu paramMenu)
- {
- super.onContextMenuClosed(paramMenu);
- }
- public void super_onCreateContextMenu(ContextMenu paramContextMenu, View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo)
- {
- super.onCreateContextMenu(paramContextMenu, paramView, paramContextMenuInfo);
- }
- public CharSequence super_onCreateDescription()
- {
- return super.onCreateDescription();
- }
- public Dialog super_onCreateDialog(int paramInt)
- {
- return super.onCreateDialog(paramInt);
- }
- public boolean super_onCreateOptionsMenu(Menu paramMenu)
- {
- return super.onCreateOptionsMenu(paramMenu);
- }
- public boolean super_onCreatePanelMenu(int paramInt, Menu paramMenu)
- {
- return super.onCreatePanelMenu(paramInt, paramMenu);
- }
- public View super_onCreatePanelView(int paramInt)
- {
- return super.onCreatePanelView(paramInt);
- }
- public boolean super_onCreateThumbnail(Bitmap paramBitmap, Canvas paramCanvas)
- {
- return super.onCreateThumbnail(paramBitmap, paramCanvas);
- }
- public View super_onCreateView(String paramString, Context paramContext, AttributeSet paramAttributeSet)
- {
- return super.onCreateView(paramString, paramContext, paramAttributeSet);
- }
- public void super_onDetachedFromWindow()
- {
- super.onDetachedFromWindow();
- }
- public boolean super_onKeyDown(int paramInt, KeyEvent paramKeyEvent)
- {
- return super.onKeyDown(paramInt, paramKeyEvent);
- }
- public boolean super_onKeyLongPress(int paramInt, KeyEvent paramKeyEvent)
- {
- return super.onKeyLongPress(paramInt, paramKeyEvent);
- }
- public boolean super_onKeyMultiple(int paramInt1, int paramInt2, KeyEvent paramKeyEvent)
- {
- return super.onKeyMultiple(paramInt1, paramInt2, paramKeyEvent);
- }
- public boolean super_onKeyUp(int paramInt, KeyEvent paramKeyEvent)
- {
- return super.onKeyUp(paramInt, paramKeyEvent);
- }
- public boolean super_onMenuItemSelected(int paramInt, MenuItem paramMenuItem)
- {
- return super.onMenuItemSelected(paramInt, paramMenuItem);
- }
- public boolean super_onMenuOpened(int paramInt, Menu paramMenu)
- {
- return super.onMenuOpened(paramInt, paramMenu);
- }
- public void super_onNewIntent(Intent paramIntent)
- {
- super.onNewIntent(paramIntent);
- }
- public boolean super_onOptionsItemSelected(MenuItem paramMenuItem)
- {
- return super.onOptionsItemSelected(paramMenuItem);
- }
- public void super_onOptionsMenuClosed(Menu paramMenu)
- {
- super.onOptionsMenuClosed(paramMenu);
- }
- public void super_onPanelClosed(int paramInt, Menu paramMenu)
- {
- super.onPanelClosed(paramInt, paramMenu);
- }
- public void super_onPrepareDialog(int paramInt, Dialog paramDialog)
- {
- super.onPrepareDialog(paramInt, paramDialog);
- }
- public boolean super_onPrepareOptionsMenu(Menu paramMenu)
- {
- return super.onPrepareOptionsMenu(paramMenu);
- }
- public boolean super_onPreparePanel(int paramInt, View paramView, Menu paramMenu)
- {
- return super.onPreparePanel(paramInt, paramView, paramMenu);
- }
- public void super_onRestoreInstanceState(Bundle paramBundle)
- {
- super.onRestoreInstanceState(paramBundle);
- }
- public Object super_onRetainNonConfigurationInstance()
- {
- return super.onRetainNonConfigurationInstance();
- }
- public void super_onSaveInstanceState(Bundle paramBundle)
- {
- super.onSaveInstanceState(paramBundle);
- }
- public boolean super_onSearchRequested()
- {
- return super.onSearchRequested();
- }
- public void super_onTitleChanged(CharSequence paramCharSequence, int paramInt)
- {
- super.onTitleChanged(paramCharSequence, paramInt);
- }
- public boolean super_onTouchEvent(MotionEvent paramMotionEvent)
- {
- return super.onTouchEvent(paramMotionEvent);
- }
- public boolean super_onTrackballEvent(MotionEvent paramMotionEvent)
- {
- return super.onTrackballEvent(paramMotionEvent);
- }
- public void super_onUserInteraction()
- {
- super.onUserInteraction();
- }
- public void super_onUserLeaveHint()
- {
- super.onUserLeaveHint();
- }
- public void super_onWindowAttributesChanged(WindowManager.LayoutParams paramLayoutParams)
- {
- super.onWindowAttributesChanged(paramLayoutParams);
- }
- public void super_onWindowFocusChanged(boolean paramBoolean)
- {
- super.onWindowFocusChanged(paramBoolean);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment