Example usage for android.content.pm ServiceInfo ServiceInfo

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

Introduction

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

Prototype

private ServiceInfo(Parcel source) 

Source Link

Usage

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

public static final ServiceInfo generateServiceInfo(Service s, int flags, PackageUserState state, int userId) {
    if (s == null)
        return null;
    if (!checkUseInstalledOrHidden(flags, state)) {
        return null;
    }/* ww w . ja  v  a  2s  . c o  m*/
    if (!copyNeeded(flags, s.owner, state, s.metaData, userId)) {
        return s.info;
    }
    // Make shallow copies so we can store the metadata safely
    ServiceInfo si = new ServiceInfo(s.info);
    si.metaData = s.metaData;
    si.applicationInfo = generateApplicationInfo(s.owner, flags, state, userId);
    return si;
}