List of usage examples for android.content.pm PackageManager resolveContentProvider
public abstract ProviderInfo resolveContentProvider(String name, @ComponentInfoFlags int flags);
From source file:Main.java
/** * Get the information about an app's ContentProvider. * * @param pm The PackageManager//from w ww.ja v a 2s . co m * @param app The app * @return The ProviderInfo for the app's ContentProvider */ @Nullable private static ProviderInfo getProviderInfo(@NonNull PackageManager pm, int app) { return pm.resolveContentProvider(sPackageNames[app] + ".provider", 0); }