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