當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。