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


Java PackageManager.MATCH_DEFAULT_ONLY属性代码示例

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


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

示例1: queryIntentForPackage

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);
}
 
开发者ID:codehz,项目名称:container,代码行数:21,代码来源:VPackageManagerService.java

示例2: queryIntentForPackage

public List<ResolveInfo> queryIntentForPackage(Intent intent, String resolvedType, int flags,
                                               ArrayList<VPackage.ServiceComponent> packageServices, int userId) {
    if (packageServices == null) {
        return null;
    }
    mFlags = flags;
    final boolean defaultOnly = (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0;
    final int N = packageServices.size();
    ArrayList<VPackage.ServiceIntentInfo[]> listCut = new ArrayList<VPackage.ServiceIntentInfo[]>(N);

    ArrayList<VPackage.ServiceIntentInfo> intentFilters;
    for (int i = 0; i < N; ++i) {
        intentFilters = packageServices.get(i).intents;
        if (intentFilters != null && intentFilters.size() > 0) {
            VPackage.ServiceIntentInfo[] array = new VPackage.ServiceIntentInfo[intentFilters.size()];
            intentFilters.toArray(array);
            listCut.add(array);
        }
    }
    return super.queryIntentFromList(intent, resolvedType, defaultOnly, listCut, userId);
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:21,代码来源:VPackageManagerService.java

示例3: queryIntentForPackage

public List<ResolveInfo> queryIntentForPackage(Intent intent, String resolvedType, int flags,
                                               ArrayList<VPackage.ProviderComponent> packageProviders, int userId) {
    if (packageProviders == null) {
        return null;
    }
    mFlags = flags;
    final boolean defaultOnly = (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0;
    final int N = packageProviders.size();
    ArrayList<VPackage.ProviderIntentInfo[]> listCut = new ArrayList<>(N);

    ArrayList<VPackage.ProviderIntentInfo> intentFilters;
    for (int i = 0; i < N; ++i) {
        intentFilters = packageProviders.get(i).intents;
        if (intentFilters != null && intentFilters.size() > 0) {
            VPackage.ProviderIntentInfo[] array = new VPackage.ProviderIntentInfo[intentFilters
                    .size()];
            intentFilters.toArray(array);
            listCut.add(array);
        }
    }
    return super.queryIntentFromList(intent, resolvedType, defaultOnly, listCut, userId);
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:22,代码来源:ProviderIntentResolver.java

示例4: resolveActivity

@Override
public ResolveInfo resolveActivity(Intent intent, int flags) {
    if (isDictionaryAction(intent) && flags == PackageManager.MATCH_DEFAULT_ONLY) {
        for (ResolveInfo ri : mRiList) {
            if (ri.activityInfo.packageName.equals(intent.getPackage())) {
                return ri;
            }
            // else continue to check the next candidate.
        }
        return null; // none found
    } else {
        return null;
    }
}
 
开发者ID:orionlee,项目名称:aDictOnCopy,代码行数:14,代码来源:StubPackageMangerBuilder.java

示例5: queryIntentActivities

@Override
public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) {
    if (isDictionaryAction(intent) && flags == PackageManager.MATCH_DEFAULT_ONLY) {
        return mRiList;
    } else {
        return new ArrayList<>();
    }
}
 
开发者ID:orionlee,项目名称:aDictOnCopy,代码行数:8,代码来源:StubPackageMangerBuilder.java

示例6: queryIntent

public List<ResolveInfo> queryIntent(Intent intent, String resolvedType, int flags) {
	mFlags = flags;
	return super.queryIntent(intent, resolvedType, (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0);
}
 
开发者ID:codehz,项目名称:container,代码行数:4,代码来源:VPackageManagerService.java

示例7: queryIntent

public List<?> queryIntent(Intent intent, String resolvedType, int flags,int userId) {
    //mFlags = flags;
    return super.queryIntent(intent, resolvedType,
            (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0);
}
 
开发者ID:alibaba,项目名称:atlas,代码行数:5,代码来源:AdditionalComponentIntentResolver.java

示例8: queryIntent

List<ResolveInfo> queryIntent(Intent intent, String resolvedType, int flags, int userId) {
    mFlags = flags;
    return super.queryIntent(intent, resolvedType, (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0, userId);
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:4,代码来源:VPackageManagerService.java

示例9: queryIntent

public List<ResolveInfo> queryIntent(Intent intent, String resolvedType, boolean defaultOnly, int userId) {
    mFlags = defaultOnly ? PackageManager.MATCH_DEFAULT_ONLY : 0;
    return super.queryIntent(intent, resolvedType, defaultOnly, userId);
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:4,代码来源:ProviderIntentResolver.java

示例10: queryIntent

public List<ResolveInfo> queryIntent(Intent intent, String resolvedType, int flags, int userId) {
    mFlags = flags;
    return super.queryIntent(intent, resolvedType, (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0, userId);
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:4,代码来源:ProviderIntentResolver.java


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