Java Code Examples for android.content.pm.PackageManager.GET_RESOLVED_FILTER

The following are Jave code examples for showing how to use GET_RESOLVED_FILTER of the android.content.pm.PackageManager class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: VirtualHook   File: VPackageManagerService.java   View Source Code Vote up 6 votes
@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;
}
 
Example 2
Project: VirtualHook   File: VPackageManagerService.java   View Source Code Vote up 6 votes
@Override
protected ResolveInfo newResult(VPackage.ServiceIntentInfo filter, int match, int userId) {
    final VPackage.ServiceComponent service = filter.service;
    PackageSetting ps = (PackageSetting) service.owner.mExtras;
    ServiceInfo si = PackageParserEx.generateServiceInfo(service, mFlags, ps.readUserState(userId), userId);
    if (si == null) {
        return null;
    }
    final ResolveInfo res = new ResolveInfo();
    res.serviceInfo = si;
    if ((mFlags & PackageManager.GET_RESOLVED_FILTER) != 0) {
        res.filter = filter.filter;
    }
    res.priority = filter.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;
}
 
Example 3
Project: VirtualHook   File: ProviderIntentResolver.java   View Source Code Vote up 6 votes
@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;
}
 
Example 4
Project: TPlayer   File: VPackageManagerService.java   View Source Code Vote up 6 votes
@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;
}
 
Example 5
Project: TPlayer   File: VPackageManagerService.java   View Source Code Vote up 6 votes
@Override
protected ResolveInfo newResult(VPackage.ServiceIntentInfo filter, int match, int userId) {
    final VPackage.ServiceComponent service = filter.service;
    PackageSetting ps = (PackageSetting) service.owner.mExtras;
    ServiceInfo si = PackageParserEx.generateServiceInfo(service, mFlags, ps.readUserState(userId), userId);
    if (si == null) {
        return null;
    }
    final ResolveInfo res = new ResolveInfo();
    res.serviceInfo = si;
    if ((mFlags & PackageManager.GET_RESOLVED_FILTER) != 0) {
        res.filter = filter.filter;
    }
    res.priority = filter.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;
}
 
Example 6
Project: container   File: VPackageManagerService.java   View Source Code Vote up 6 votes
@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;
}
 
Example 7
Project: container   File: VPackageManagerService.java   View Source Code Vote up 6 votes
@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;
}
 
Example 8
Project: container   File: ProviderIntentResolver.java   View Source Code Vote up 6 votes
@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;
}
 
Example 9
Project: TPlayer   File: ProviderIntentResolver.java   View Source Code Vote up 5 votes
@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;
}