Tabnine Logo
ArrayUtils.protoIndexOf
Code IndexAdd Tabnine to your IDE (free)

How to use
protoIndexOf
method
in
com.lody.virtual.helper.utils.ArrayUtils

Best Java code snippets using com.lody.virtual.helper.utils.ArrayUtils.protoIndexOf (Showing top 6 results out of 315)

origin: android-hacker/VirtualXposed

private void realStartActivitiesLocked(IBinder resultTo, Intent[] intents, String[] resolvedTypes, Bundle options) {
  Class<?>[] types = IActivityManager.startActivities.paramList();
  Object[] args = new Object[types.length];
  if (types[0] == IApplicationThread.TYPE) {
    args[0] = ActivityThread.getApplicationThread.call(VirtualCore.mainThread());
  }
  int pkgIndex = ArrayUtils.protoIndexOf(types, String.class);
  int intentsIndex = ArrayUtils.protoIndexOf(types, Intent[].class);
  int resultToIndex = ArrayUtils.protoIndexOf(types, IBinder.class, 2);
  int optionsIndex = ArrayUtils.protoIndexOf(types, Bundle.class);
  int resolvedTypesIndex = intentsIndex + 1;
  if (pkgIndex != -1) {
    args[pkgIndex] = VirtualCore.get().getHostPkg();
  }
  args[intentsIndex] = intents;
  args[resultToIndex] = resultTo;
  args[resolvedTypesIndex] = resolvedTypes;
  args[optionsIndex] = options;
  ClassUtils.fixArgs(types, args);
  IActivityManager.startActivities.call(ActivityManagerNative.getDefault.call(),
      (Object[]) args);
}
origin: android-hacker/VirtualXposed

private void realStartActivityLocked(IBinder resultTo, Intent intent, String resultWho, int requestCode,
                   Bundle options) {
  Class<?>[] types = mirror.android.app.IActivityManager.startActivity.paramList();
  Object[] args = new Object[types.length];
  if (types[0] == IApplicationThread.TYPE) {
    args[0] = ActivityThread.getApplicationThread.call(VirtualCore.mainThread());
  }
  int intentIndex = ArrayUtils.protoIndexOf(types, Intent.class);
  int resultToIndex = ArrayUtils.protoIndexOf(types, IBinder.class, 2);
  int optionsIndex = ArrayUtils.protoIndexOf(types, Bundle.class);
  int resolvedTypeIndex = intentIndex + 1;
  int resultWhoIndex = resultToIndex + 1;
  int requestCodeIndex = resultToIndex + 2;
  args[intentIndex] = intent;
  args[resultToIndex] = resultTo;
  args[resultWhoIndex] = resultWho;
  args[requestCodeIndex] = requestCode;
  if (optionsIndex != -1) {
    args[optionsIndex] = options;
  }
  args[resolvedTypeIndex] = intent.getType();
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
    args[intentIndex - 1] = VirtualCore.get().getHostPkg();
  }
  ClassUtils.fixArgs(types, args);
  mirror.android.app.IActivityManager.startActivity.call(ActivityManagerNative.getDefault.call(),
      (Object[]) args);
}
origin: darkskygit/VirtualApp

private void realStartActivitiesLocked(IBinder resultTo, Intent[] intents, String[] resolvedTypes, Bundle options) {
  Class<?>[] types = IActivityManager.startActivities.paramList();
  Object[] args = new Object[types.length];
  if (types[0] == IApplicationThread.TYPE) {
    args[0] = ActivityThread.getApplicationThread.call(VirtualCore.mainThread());
  }
  int pkgIndex = ArrayUtils.protoIndexOf(types, String.class);
  int intentsIndex = ArrayUtils.protoIndexOf(types, Intent[].class);
  int resultToIndex = ArrayUtils.protoIndexOf(types, IBinder.class, 2);
  int optionsIndex = ArrayUtils.protoIndexOf(types, Bundle.class);
  int resolvedTypesIndex = intentsIndex + 1;
  if (pkgIndex != -1) {
    args[pkgIndex] = VirtualCore.get().getHostPkg();
  }
  args[intentsIndex] = intents;
  args[resultToIndex] = resultTo;
  args[resolvedTypesIndex] = resolvedTypes;
  args[optionsIndex] = options;
  ClassUtils.fixArgs(types, args);
  IActivityManager.startActivities.call(ActivityManagerNative.getDefault.call(),
      (Object[]) args);
}
origin: bzsome/VirtualApp-x326

private void realStartActivitiesLocked(IBinder resultTo, Intent[] intents, String[] resolvedTypes, Bundle options) {
  Class<?>[] types = IActivityManager.startActivities.paramList();
  Object[] args = new Object[types.length];
  if (types[0] == IApplicationThread.TYPE) {
    args[0] = ActivityThread.getApplicationThread.call(VirtualCore.mainThread());
  }
  int pkgIndex = ArrayUtils.protoIndexOf(types, String.class);
  int intentsIndex = ArrayUtils.protoIndexOf(types, Intent[].class);
  int resultToIndex = ArrayUtils.protoIndexOf(types, IBinder.class, 2);
  int optionsIndex = ArrayUtils.protoIndexOf(types, Bundle.class);
  int resolvedTypesIndex = intentsIndex + 1;
  if (pkgIndex != -1) {
    args[pkgIndex] = VirtualCore.get().getHostPkg();
  }
  args[intentsIndex] = intents;
  args[resultToIndex] = resultTo;
  args[resolvedTypesIndex] = resolvedTypes;
  args[optionsIndex] = options;
  ClassUtils.fixArgs(types, args);
  IActivityManager.startActivities.call(ActivityManagerNative.getDefault.call(),
      (Object[]) args);
}
origin: darkskygit/VirtualApp

private void realStartActivityLocked(IBinder resultTo, Intent intent, String resultWho, int requestCode,
                   Bundle options) {
  Class<?>[] types = mirror.android.app.IActivityManager.startActivity.paramList();
  Object[] args = new Object[types.length];
  if (types[0] == IApplicationThread.TYPE) {
    args[0] = ActivityThread.getApplicationThread.call(VirtualCore.mainThread());
  }
  int intentIndex = ArrayUtils.protoIndexOf(types, Intent.class);
  int resultToIndex = ArrayUtils.protoIndexOf(types, IBinder.class, 2);
  int optionsIndex = ArrayUtils.protoIndexOf(types, Bundle.class);
  int resolvedTypeIndex = intentIndex + 1;
  int resultWhoIndex = resultToIndex + 1;
  int requestCodeIndex = resultToIndex + 2;
  args[intentIndex] = intent;
  args[resultToIndex] = resultTo;
  args[resultWhoIndex] = resultWho;
  args[requestCodeIndex] = requestCode;
  if (optionsIndex != -1) {
    args[optionsIndex] = options;
  }
  args[resolvedTypeIndex] = intent.getType();
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
    args[intentIndex - 1] = VirtualCore.get().getHostPkg();
  }
  ClassUtils.fixArgs(types, args);
  mirror.android.app.IActivityManager.startActivity.call(ActivityManagerNative.getDefault.call(),
      (Object[]) args);
}
origin: bzsome/VirtualApp-x326

private void realStartActivityLocked(IBinder resultTo, Intent intent, String resultWho, int requestCode,
                   Bundle options) {
  Class<?>[] types = mirror.android.app.IActivityManager.startActivity.paramList();
  Object[] args = new Object[types.length];
  if (types[0] == IApplicationThread.TYPE) {
    args[0] = ActivityThread.getApplicationThread.call(VirtualCore.mainThread());
  }
  int intentIndex = ArrayUtils.protoIndexOf(types, Intent.class);
  int resultToIndex = ArrayUtils.protoIndexOf(types, IBinder.class, 2);
  int optionsIndex = ArrayUtils.protoIndexOf(types, Bundle.class);
  int resolvedTypeIndex = intentIndex + 1;
  int resultWhoIndex = resultToIndex + 1;
  int requestCodeIndex = resultToIndex + 2;
  args[intentIndex] = intent;
  args[resultToIndex] = resultTo;
  args[resultWhoIndex] = resultWho;
  args[requestCodeIndex] = requestCode;
  if (optionsIndex != -1) {
    args[optionsIndex] = options;
  }
  args[resolvedTypeIndex] = intent.getType();
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
    args[intentIndex - 1] = VirtualCore.get().getHostPkg();
  }
  ClassUtils.fixArgs(types, args);
  mirror.android.app.IActivityManager.startActivity.call(ActivityManagerNative.getDefault.call(),
      (Object[]) args);
}
com.lody.virtual.helper.utilsArrayUtilsprotoIndexOf

Popular methods of ArrayUtils

  • checkOffsetAndCount
  • contains
  • getFirst
  • indexOf
    Return first index of value in array, or -1 if not found.
  • indexOfFirst
  • indexOfLast
  • indexOfObject
  • isEmpty

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now