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

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

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

origin: android-hacker/VirtualXposed

private int register_intent_filter(F filter, Iterator<String> i, HashMap<String, F[]> dest, String prefix) {
  if (i == null) {
    return 0;
  }
  int num = 0;
  while (i.hasNext()) {
    String name = i.next();
    num++;
    addFilter(dest, name, filter);
  }
  return num;
}
origin: android-hacker/VirtualXposed

if (packageName != null && !isPackageForFilter(packageName, filter)) {
  continue;
if (!allowFilterResult(filter, dest)) {
  continue;
if (match >= 0) {
  if (!defaultOnly || filter.filter.hasCategory(Intent.CATEGORY_DEFAULT)) {
    final R oneResult = newResult(filter, match, userId);
    if (oneResult != null) {
      dest.add(oneResult);
origin: android-hacker/VirtualXposed

public List<R> queryIntentFromList(Intent intent, String resolvedType, boolean defaultOnly,
    ArrayList<F[]> listCut, int userId) {
  ArrayList<R> resultList = new ArrayList<R>();
  FastImmutableArraySet<String> categories = getFastIntentCategories(intent);
  final String scheme = intent.getScheme();
  int N = listCut.size();
  for (int i = 0; i < N; ++i) {
    buildResolveList(intent, categories, defaultOnly, resolvedType, scheme, listCut.get(i), resultList, userId);
  }
  sortResults(resultList);
  return resultList;
}
origin: android-hacker/VirtualXposed

public ArrayList<F> findFilters(IntentFilter matching) {
  if (matching.countDataSchemes() == 1) {
    // Fast case.
    return collectFilters(mSchemeToFilter.get(matching.getDataScheme(0)), matching);
  } else if (matching.countDataTypes() != 0 && matching.countActions() == 1) {
    // Another fast case.
    return collectFilters(mTypedActionToFilter.get(matching.getAction(0)), matching);
  } else if (matching.countDataTypes() == 0 && matching.countDataSchemes() == 0 && matching.countActions() == 1) {
    // Last fast case.
    return collectFilters(mActionToFilter.get(matching.getAction(0)), matching);
  } else {
    ArrayList<F> res = null;
    for (F cur : mFilters) {
      if (filterEquals(cur.filter, matching)) {
        if (res == null) {
          res = new ArrayList<>();
        }
        res.add(cur);
      }
    }
    return res;
  }
}
origin: android-hacker/VirtualXposed

public List<ResolveInfo> queryIntent(Intent intent, String resolvedType, boolean defaultOnly, int userId) {
  mFlags = defaultOnly ? PackageManager.MATCH_DEFAULT_ONLY : 0;
  return super.queryIntent(intent, resolvedType, defaultOnly, userId);
}
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 ArrayList<F> collectFilters(F[] array, IntentFilter matching) {
  ArrayList<F> res = null;
  if (array != null) {
    for (int i = 0; i < array.length; i++) {
      F cur = array[i];
      if (cur == null) {
        break;
      }
      if (filterEquals(cur.filter, matching)) {
        if (res == null) {
          res = new ArrayList<>();
        }
        res.add(cur);
      }
    }
  }
  return res;
}
origin: android-hacker/VirtualXposed

List<ResolveInfo> queryIntent(Intent intent, String resolvedType, int flags, int userId) {
  mFlags = flags;
  return super.queryIntent(intent, resolvedType, (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0, userId);
}
origin: darkskygit/VirtualApp

public ArrayList<F> findFilters(IntentFilter matching) {
  if (matching.countDataSchemes() == 1) {
    // Fast case.
    return collectFilters(mSchemeToFilter.get(matching.getDataScheme(0)), matching);
  } else if (matching.countDataTypes() != 0 && matching.countActions() == 1) {
    // Another fast case.
    return collectFilters(mTypedActionToFilter.get(matching.getAction(0)), matching);
  } else if (matching.countDataTypes() == 0 && matching.countDataSchemes() == 0 && matching.countActions() == 1) {
    // Last fast case.
    return collectFilters(mActionToFilter.get(matching.getAction(0)), matching);
  } else {
    ArrayList<F> res = null;
    for (F cur : mFilters) {
      if (filterEquals(cur.filter, matching)) {
        if (res == null) {
          res = new ArrayList<>();
        }
        res.add(cur);
      }
    }
    return res;
  }
}
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: bzsome/VirtualApp-x326

private ArrayList<F> collectFilters(F[] array, IntentFilter matching) {
  ArrayList<F> res = null;
  if (array != null) {
    for (int i = 0; i < array.length; i++) {
      F cur = array[i];
      if (cur == null) {
        break;
      }
      if (filterEquals(cur.filter, matching)) {
        if (res == null) {
          res = new ArrayList<>();
        }
        res.add(cur);
      }
    }
  }
  return res;
}
origin: android-hacker/VirtualXposed

FastImmutableArraySet<String> categories = getFastIntentCategories(intent);
if (firstTypeCut != null) {
  buildResolveList(intent, categories, defaultOnly, resolvedType, scheme, firstTypeCut, finalList, userId);
  buildResolveList(intent, categories, defaultOnly, resolvedType, scheme, secondTypeCut, finalList, userId);
  buildResolveList(intent, categories, defaultOnly, resolvedType, scheme, thirdTypeCut, finalList, userId);
  buildResolveList(intent, categories, defaultOnly, resolvedType, scheme, schemeCut, finalList, userId);
sortResults(finalList);
return finalList;
origin: darkskygit/VirtualApp

if (packageName != null && !isPackageForFilter(packageName, filter)) {
  continue;
if (!allowFilterResult(filter, dest)) {
  continue;
if (match >= 0) {
  if (!defaultOnly || filter.filter.hasCategory(Intent.CATEGORY_DEFAULT)) {
    final R oneResult = newResult(filter, match, userId);
    if (oneResult != null) {
      dest.add(oneResult);
origin: android-hacker/VirtualXposed

public List<ResolveInfo> queryIntent(Intent intent, String resolvedType, int flags, int userId) {
  mFlags = flags;
  return super.queryIntent(intent, resolvedType, (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0, userId);
}
origin: bzsome/VirtualApp-x326

public ArrayList<F> findFilters(IntentFilter matching) {
  if (matching.countDataSchemes() == 1) {
    // Fast case.
    return collectFilters(mSchemeToFilter.get(matching.getDataScheme(0)), matching);
  } else if (matching.countDataTypes() != 0 && matching.countActions() == 1) {
    // Another fast case.
    return collectFilters(mTypedActionToFilter.get(matching.getAction(0)), matching);
  } else if (matching.countDataTypes() == 0 && matching.countDataSchemes() == 0 && matching.countActions() == 1) {
    // Last fast case.
    return collectFilters(mActionToFilter.get(matching.getAction(0)), matching);
  } else {
    ArrayList<F> res = null;
    for (F cur : mFilters) {
      if (filterEquals(cur.filter, matching)) {
        if (res == null) {
          res = new ArrayList<>();
        }
        res.add(cur);
      }
    }
    return res;
  }
}
origin: android-hacker/VirtualXposed

private int register_mime_types(F filter, String prefix) {
  final Iterator<String> i = filter.filter.typesIterator();
  if (i == null) {
    return 0;
  }
  int num = 0;
  while (i.hasNext()) {
    String name = i.next();
    num++;
    String baseName = name;
    final int slashpos = name.indexOf('/');
    if (slashpos > 0) {
      baseName = name.substring(0, slashpos).intern();
    } else {
      name = name + "/*";
    }
    addFilter(mTypeToFilter, name, filter);
    if (slashpos > 0) {
      addFilter(mBaseTypeToFilter, baseName, filter);
    } else {
      addFilter(mWildTypeToFilter, baseName, filter);
    }
  }
  return num;
}
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: darkskygit/VirtualApp

private ArrayList<F> collectFilters(F[] array, IntentFilter matching) {
  ArrayList<F> res = null;
  if (array != null) {
    for (int i = 0; i < array.length; i++) {
      F cur = array[i];
      if (cur == null) {
        break;
      }
      if (filterEquals(cur.filter, matching)) {
        if (res == null) {
          res = new ArrayList<>();
        }
        res.add(cur);
      }
    }
  }
  return res;
}
origin: darkskygit/VirtualApp

public List<R> queryIntentFromList(Intent intent, String resolvedType, boolean defaultOnly,
    ArrayList<F[]> listCut, int userId) {
  ArrayList<R> resultList = new ArrayList<R>();
  FastImmutableArraySet<String> categories = getFastIntentCategories(intent);
  final String scheme = intent.getScheme();
  int N = listCut.size();
  for (int i = 0; i < N; ++i) {
    buildResolveList(intent, categories, defaultOnly, resolvedType, scheme, listCut.get(i), resultList, userId);
  }
  sortResults(resultList);
  return resultList;
}
origin: bzsome/VirtualApp-x326

if (packageName != null && !isPackageForFilter(packageName, filter)) {
  continue;
if (!allowFilterResult(filter, dest)) {
  continue;
if (match >= 0) {
  if (!defaultOnly || filter.filter.hasCategory(Intent.CATEGORY_DEFAULT)) {
    final R oneResult = newResult(filter, match, userId);
    if (oneResult != null) {
      dest.add(oneResult);
com.lody.virtual.server.pmIntentResolver

Most used methods

  • 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
  • newArray
  • newResult
  • queryIntent
  • queryIntentFromList
  • register_intent_filter
  • queryIntentFromList,
  • register_intent_filter,
  • register_mime_types,
  • removeFilterInternal,
  • remove_all_objects,
  • sortResults,
  • unregister_intent_filter,
  • unregister_mime_types

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
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