VPackageManagerService.java 文件源码

java
阅读 42 收藏 0 点赞 0 评论 0

项目:container 作者:
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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号