Tabnine Logo
IntentResolver.newArray
Code IndexAdd Tabnine to your IDE (free)

How to use
newArray
method
in
com.lody.virtual.server.pm.IntentResolver

Best Java code snippets using com.lody.virtual.server.pm.IntentResolver.newArray (Showing top 6 results out of 315)

origin: android-hacker/VirtualXposed

private void addFilter(HashMap<String, F[]> map, String name, F filter) {
  F[] array = map.get(name);
  if (array == null) {
    array = newArray(2);
    map.put(name, array);
    array[0] = filter;
  } else {
    final int N = array.length;
    int i = N;
    while (i > 0 && array[i - 1] == null) {
      i--;
    }
    if (i < N) {
      array[i] = filter;
    } else {
      F[] newa = newArray((N * 3) / 2);
      System.arraycopy(array, 0, newa, 0, N);
      newa[N] = filter;
      map.put(name, newa);
    }
  }
}
origin: android-hacker/VirtualXposed

private void remove_all_objects(HashMap<String, F[]> map, String name, Object object) {
  F[] array = map.get(name);
  if (array != null) {
    int LAST = array.length - 1;
    while (LAST >= 0 && array[LAST] == null) {
      LAST--;
    }
    for (int idx = LAST; idx >= 0; idx--) {
      if (array[idx] == object) {
        final int remain = LAST - idx;
        if (remain > 0) {
          System.arraycopy(array, idx + 1, array, idx, remain);
        }
        array[LAST] = null;
        LAST--;
      }
    }
    if (LAST < 0) {
      map.remove(name);
    } else if (LAST < (array.length / 2)) {
      F[] newa = newArray(LAST + 2);
      System.arraycopy(array, 0, newa, 0, LAST + 1);
      map.put(name, newa);
    }
  }
}
origin: darkskygit/VirtualApp

private void addFilter(HashMap<String, F[]> map, String name, F filter) {
  F[] array = map.get(name);
  if (array == null) {
    array = newArray(2);
    map.put(name, array);
    array[0] = filter;
  } else {
    final int N = array.length;
    int i = N;
    while (i > 0 && array[i - 1] == null) {
      i--;
    }
    if (i < N) {
      array[i] = filter;
    } else {
      F[] newa = newArray((N * 3) / 2);
      System.arraycopy(array, 0, newa, 0, N);
      newa[N] = filter;
      map.put(name, newa);
    }
  }
}
origin: bzsome/VirtualApp-x326

private void addFilter(HashMap<String, F[]> map, String name, F filter) {
  F[] array = map.get(name);
  if (array == null) {
    array = newArray(2);
    map.put(name, array);
    array[0] = filter;
  } else {
    final int N = array.length;
    int i = N;
    while (i > 0 && array[i - 1] == null) {
      i--;
    }
    if (i < N) {
      array[i] = filter;
    } else {
      F[] newa = newArray((N * 3) / 2);
      System.arraycopy(array, 0, newa, 0, N);
      newa[N] = filter;
      map.put(name, newa);
    }
  }
}
origin: darkskygit/VirtualApp

private void remove_all_objects(HashMap<String, F[]> map, String name, Object object) {
  F[] array = map.get(name);
  if (array != null) {
    int LAST = array.length - 1;
    while (LAST >= 0 && array[LAST] == null) {
      LAST--;
    }
    for (int idx = LAST; idx >= 0; idx--) {
      if (array[idx] == object) {
        final int remain = LAST - idx;
        if (remain > 0) {
          System.arraycopy(array, idx + 1, array, idx, remain);
        }
        array[LAST] = null;
        LAST--;
      }
    }
    if (LAST < 0) {
      map.remove(name);
    } else if (LAST < (array.length / 2)) {
      F[] newa = newArray(LAST + 2);
      System.arraycopy(array, 0, newa, 0, LAST + 1);
      map.put(name, newa);
    }
  }
}
origin: bzsome/VirtualApp-x326

private void remove_all_objects(HashMap<String, F[]> map, String name, Object object) {
  F[] array = map.get(name);
  if (array != null) {
    int LAST = array.length - 1;
    while (LAST >= 0 && array[LAST] == null) {
      LAST--;
    }
    for (int idx = LAST; idx >= 0; idx--) {
      if (array[idx] == object) {
        final int remain = LAST - idx;
        if (remain > 0) {
          System.arraycopy(array, idx + 1, array, idx, remain);
        }
        array[LAST] = null;
        LAST--;
      }
    }
    if (LAST < 0) {
      map.remove(name);
    } else if (LAST < (array.length / 2)) {
      F[] newa = newArray(LAST + 2);
      System.arraycopy(array, 0, newa, 0, LAST + 1);
      map.put(name, newa);
    }
  }
}
com.lody.virtual.server.pmIntentResolvernewArray

Popular methods of IntentResolver

  • addFilter
  • allowFilterResult
    Control whether the given filter is allowed to go into the result list. Mainly intended to prevent a
  • buildResolveList
  • collectFilters
  • filterEquals
  • getFastIntentCategories
  • isPackageForFilter
    Returns whether this filter is owned by this package. This must be implemented to provide correct fi
  • newResult
  • queryIntent
  • queryIntentFromList
  • register_intent_filter
  • register_mime_types
  • register_intent_filter,
  • register_mime_types,
  • removeFilterInternal,
  • remove_all_objects,
  • sortResults,
  • unregister_intent_filter,
  • unregister_mime_types

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ImageIO (javax.imageio)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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