当前位置: 首页>>代码示例>>Java>>正文


Java PackageParser.ServiceIntentInfo方法代码示例

本文整理汇总了Java中android.content.pm.PackageParser.ServiceIntentInfo方法的典型用法代码示例。如果您正苦于以下问题:Java PackageParser.ServiceIntentInfo方法的具体用法?Java PackageParser.ServiceIntentInfo怎么用?Java PackageParser.ServiceIntentInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.content.pm.PackageParser的用法示例。


在下文中一共展示了PackageParser.ServiceIntentInfo方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: queryIntentForPackage

import android.content.pm.PackageParser; //导入方法依赖的package包/类
public List<ResolveInfo> queryIntentForPackage(Intent intent, String resolvedType, int flags,
		ArrayList<PackageParser.Service> packageServices) {
	if (packageServices == null) {
		return null;
	}
	mFlags = flags;
	final boolean defaultOnly = (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0;
	final int N = packageServices.size();
	ArrayList<PackageParser.ServiceIntentInfo[]> listCut = new ArrayList<PackageParser.ServiceIntentInfo[]>(N);

	ArrayList<PackageParser.ServiceIntentInfo> intentFilters;
	for (int i = 0; i < N; ++i) {
		intentFilters = packageServices.get(i).intents;
		if (intentFilters != null && intentFilters.size() > 0) {
			PackageParser.ServiceIntentInfo[] array = new PackageParser.ServiceIntentInfo[intentFilters.size()];
			intentFilters.toArray(array);
			listCut.add(array);
		}
	}
	return super.queryIntentFromList(intent, resolvedType, defaultOnly, listCut);
}
 
开发者ID:codehz,项目名称:container,代码行数:22,代码来源:VPackageManagerService.java

示例2: newResult

import android.content.pm.PackageParser; //导入方法依赖的package包/类
@Override
protected ResolveInfo newResult(PackageParser.ServiceIntentInfo filter, int match) {
	final PackageParser.Service service = filter.service;
	ServiceInfo si = PackageParserCompat.generateServiceInfo(service, mFlags);
	if (si == null) {
		return null;
	}
	final ResolveInfo res = new ResolveInfo();
	res.serviceInfo = si;
	if ((mFlags & PackageManager.GET_RESOLVED_FILTER) != 0) {
		res.filter = filter;
	}
	res.priority = filter.getPriority();
	res.preferredOrder = service.owner.mPreferredOrder;
	res.match = match;
	res.isDefault = filter.hasDefault;
	res.labelRes = filter.labelRes;
	res.nonLocalizedLabel = filter.nonLocalizedLabel;
	res.icon = filter.icon;
	return res;
}
 
开发者ID:codehz,项目名称:container,代码行数:22,代码来源:VPackageManagerService.java

示例3: addService

import android.content.pm.PackageParser; //导入方法依赖的package包/类
public final void addService(PackageParser.Service s) {
	mServices.put(s.getComponentName(), s);
	if (DEBUG_SHOW_INFO) {
		Log.v(TAG, "  " + (s.info.nonLocalizedLabel != null ? s.info.nonLocalizedLabel : s.info.name) + ":");
		Log.v(TAG, "    Class=" + s.info.name);
	}
	final int NI = s.intents.size();
	int j;
	for (j = 0; j < NI; j++) {
		PackageParser.ServiceIntentInfo intent = s.intents.get(j);
		addFilter(intent);
	}
}
 
开发者ID:codehz,项目名称:container,代码行数:14,代码来源:VPackageManagerService.java

示例4: removeService

import android.content.pm.PackageParser; //导入方法依赖的package包/类
public final void removeService(PackageParser.Service s) {
	mServices.remove(s.getComponentName());
	if (DEBUG_SHOW_INFO) {
		Log.v(TAG, "  " + (s.info.nonLocalizedLabel != null ? s.info.nonLocalizedLabel : s.info.name) + ":");
		Log.v(TAG, "    Class=" + s.info.name);
	}
	final int NI = s.intents.size();
	int j;
	for (j = 0; j < NI; j++) {
		PackageParser.ServiceIntentInfo intent = s.intents.get(j);
		removeFilter(intent);
	}
}
 
开发者ID:codehz,项目名称:container,代码行数:14,代码来源:VPackageManagerService.java

示例5: allowFilterResult

import android.content.pm.PackageParser; //导入方法依赖的package包/类
@Override
protected boolean allowFilterResult(PackageParser.ServiceIntentInfo filter, List<ResolveInfo> dest) {
	ServiceInfo filterSi = filter.service.info;
	for (int i = dest.size() - 1; i >= 0; i--) {
		ServiceInfo destAi = dest.get(i).serviceInfo;
		if (ObjectsCompat.equals(destAi.name, filterSi.name)
				&& ObjectsCompat.equals(destAi.packageName, filterSi.packageName)) {
			return false;
		}
	}
	return true;
}
 
开发者ID:codehz,项目名称:container,代码行数:13,代码来源:VPackageManagerService.java

示例6: newArray

import android.content.pm.PackageParser; //导入方法依赖的package包/类
@Override
protected PackageParser.ServiceIntentInfo[] newArray(int size) {
	return new PackageParser.ServiceIntentInfo[size];
}
 
开发者ID:codehz,项目名称:container,代码行数:5,代码来源:VPackageManagerService.java

示例7: isFilterStopped

import android.content.pm.PackageParser; //导入方法依赖的package包/类
@Override
protected boolean isFilterStopped(PackageParser.ServiceIntentInfo filter) {
	return false;
}
 
开发者ID:codehz,项目名称:container,代码行数:5,代码来源:VPackageManagerService.java

示例8: isPackageForFilter

import android.content.pm.PackageParser; //导入方法依赖的package包/类
@Override
protected boolean isPackageForFilter(String packageName, PackageParser.ServiceIntentInfo info) {
	return packageName.equals(info.service.owner.packageName);
}
 
开发者ID:codehz,项目名称:container,代码行数:5,代码来源:VPackageManagerService.java

示例9: filterToLabel

import android.content.pm.PackageParser; //导入方法依赖的package包/类
@Override
protected Object filterToLabel(PackageParser.ServiceIntentInfo filter) {
	return filter.service;
}
 
开发者ID:codehz,项目名称:container,代码行数:5,代码来源:VPackageManagerService.java

示例10: dumpFilter

import android.content.pm.PackageParser; //导入方法依赖的package包/类
@Override
protected void dumpFilter(PrintWriter out, String prefix, PackageParser.ServiceIntentInfo filter) {

}
 
开发者ID:codehz,项目名称:container,代码行数:5,代码来源:VPackageManagerService.java


注:本文中的android.content.pm.PackageParser.ServiceIntentInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。