FileDocCategorySizeDatePackage
ServiceInfo.javaAPI DocAndroid 5.1 API3528Thu Mar 12 22:22:10 GMT 2015android.content.pm

ServiceInfo

public class ServiceInfo extends ComponentInfo implements android.os.Parcelable
Information you can retrieve about a particular application service. This corresponds to information collected from the AndroidManifest.xml's <service> tags.

Fields Summary
public String
permission
Optional name of a permission required to be able to access this Service. From the "permission" attribute.
public static final int
FLAG_STOP_WITH_TASK
Bit in {@link #flags}: If set, the service will automatically be stopped by the system if the user removes a task that is rooted in one of the application's activities. Set from the {@link android.R.attr#stopWithTask} attribute.
public static final int
FLAG_ISOLATED_PROCESS
Bit in {@link #flags}: If set, the service will run in its own isolated process. Set from the {@link android.R.attr#isolatedProcess} attribute.
public static final int
FLAG_SINGLE_USER
Bit in {@link #flags}: If set, a single instance of the service will run for all users on the device. Set from the {@link android.R.attr#singleUser} attribute.
public int
flags
Options that have been set in the service declaration in the manifest. These include: {@link #FLAG_STOP_WITH_TASK}, {@link #FLAG_ISOLATED_PROCESS}, {@link #FLAG_SINGLE_USER}.
public static final Creator
CREATOR
Constructors Summary
public ServiceInfo()


      
    
public ServiceInfo(ServiceInfo orig)

        super(orig);
        permission = orig.permission;
        flags = orig.flags;
    
private ServiceInfo(android.os.Parcel source)


       
        super(source);
        permission = source.readString();
        flags = source.readInt();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public voiddump(android.util.Printer pw, java.lang.String prefix)

        super.dumpFront(pw, prefix);
        pw.println(prefix + "permission=" + permission);
        pw.println(prefix + "flags=0x" + Integer.toHexString(flags));
    
public java.lang.StringtoString()

        return "ServiceInfo{"
            + Integer.toHexString(System.identityHashCode(this))
            + " " + name + "}";
    
public voidwriteToParcel(android.os.Parcel dest, int parcelableFlags)

        super.writeToParcel(dest, parcelableFlags);
        dest.writeString(permission);
        dest.writeInt(flags);