Example usage for android.content.pm ProviderInfo ProviderInfo

List of usage examples for android.content.pm ProviderInfo ProviderInfo

Introduction

In this page you can find the example usage for android.content.pm ProviderInfo ProviderInfo.

Prototype

private ProviderInfo(Parcel in) 

Source Link

Usage

From source file:android.content.pm.PackageParser.java

public static final ProviderInfo generateProviderInfo(Provider p, int flags, PackageUserState state,
        int userId) {
    if (p == null)
        return null;
    if (!checkUseInstalledOrHidden(flags, state)) {
        return null;
    }//from   ww  w  .ja  v  a 2 s.  co  m
    if (!copyNeeded(flags, p.owner, state, p.metaData, userId)
            && ((flags & PackageManager.GET_URI_PERMISSION_PATTERNS) != 0
                    || p.info.uriPermissionPatterns == null)) {
        return p.info;
    }
    // Make shallow copies so we can store the metadata safely
    ProviderInfo pi = new ProviderInfo(p.info);
    pi.metaData = p.metaData;
    if ((flags & PackageManager.GET_URI_PERMISSION_PATTERNS) == 0) {
        pi.uriPermissionPatterns = null;
    }
    pi.applicationInfo = generateApplicationInfo(p.owner, flags, state, userId);
    return pi;
}