本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}