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


Java PackageManager.GET_RESOLVED_FILTER属性代码示例

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


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

示例1: newResult

@Override
protected ResolveInfo newResult(VPackage.ActivityIntentInfo info, int match, int userId) {
    final VPackage.ActivityComponent activity = info.activity;
    PackageSetting ps = (PackageSetting) activity.owner.mExtras;
    ActivityInfo ai = PackageParserEx.generateActivityInfo(activity, mFlags, ps.readUserState(userId), userId);
    if (ai == null) {
        return null;
    }
    final ResolveInfo res = new ResolveInfo();
    res.activityInfo = ai;
    if ((mFlags & PackageManager.GET_RESOLVED_FILTER) != 0) {
        res.filter = info.filter;
    }
    res.priority = info.filter.getPriority();
    res.preferredOrder = activity.owner.mPreferredOrder;
    res.match = match;
    res.isDefault = info.hasDefault;
    res.labelRes = info.labelRes;
    res.nonLocalizedLabel = info.nonLocalizedLabel;
    res.icon = info.icon;
    return res;
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:22,代码来源:VPackageManagerService.java

示例2: newResult

@TargetApi(Build.VERSION_CODES.KITKAT)
@Override
protected ResolveInfo newResult(VPackage.ProviderIntentInfo filter, int match, int userId) {
    final VPackage.ProviderComponent provider = filter.provider;
    PackageSetting ps = (PackageSetting) provider.owner.mExtras;
    ProviderInfo pi = PackageParserEx.generateProviderInfo(provider, mFlags, ps.readUserState(userId), userId);
    if (pi == null) {
        return null;
    }
    final ResolveInfo res = new ResolveInfo();
    res.providerInfo = pi;
    if ((mFlags & PackageManager.GET_RESOLVED_FILTER) != 0) {
        res.filter = filter.filter;
    }
    res.priority = filter.filter.getPriority();
    res.preferredOrder = provider.owner.mPreferredOrder;
    res.match = match;
    res.isDefault = filter.hasDefault;
    res.labelRes = filter.labelRes;
    res.nonLocalizedLabel = filter.nonLocalizedLabel;
    res.icon = filter.icon;
    return res;
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:23,代码来源:ProviderIntentResolver.java

示例3: newResult

@Override
protected ResolveInfo newResult(PackageParser.ActivityIntentInfo info, int match) {
	final PackageParser.Activity activity = info.activity;
	ActivityInfo ai = PackageParserCompat.generateActivityInfo(activity, mFlags);
	if (ai == null) {
		return null;
	}
	final ResolveInfo res = new ResolveInfo();
	res.activityInfo = ai;
	if ((mFlags & PackageManager.GET_RESOLVED_FILTER) != 0) {
		res.filter = info;
	}
	res.priority = info.getPriority();
	res.preferredOrder = activity.owner.mPreferredOrder;
	// System.out.println("Result: " + res.activityInfo.className +
	// " = " + res.priority);
	res.match = match;
	res.isDefault = info.hasDefault;
	res.labelRes = info.labelRes;
	res.nonLocalizedLabel = info.nonLocalizedLabel;
	res.icon = info.icon;
	return res;
}
 
开发者ID:codehz,项目名称:container,代码行数:23,代码来源:VPackageManagerService.java

示例4: newResult

@TargetApi(Build.VERSION_CODES.KITKAT)
@Override
protected ResolveInfo newResult(PackageParser.ProviderIntentInfo filter, int match) {
	final PackageParser.Provider provider = filter.provider;
	ProviderInfo pi = PackageParserCompat.generateProviderInfo(provider, mFlags);
	if (pi == null) {
		return null;
	}
	final ResolveInfo res = new ResolveInfo();
	res.providerInfo = pi;
	if ((mFlags & PackageManager.GET_RESOLVED_FILTER) != 0) {
		res.filter = filter;
	}
	res.priority = filter.getPriority();
	res.preferredOrder = provider.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,代码来源:ProviderIntentResolver.java


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