FileDocCategorySizeDatePackage
PersistentPreferredActivity.javaAPI DocAndroid 5.1 API3712Thu Mar 12 22:22:42 GMT 2015com.android.server.pm

PersistentPreferredActivity

public class PersistentPreferredActivity extends android.content.IntentFilter

Fields Summary
private static final String
ATTR_NAME
private static final String
ATTR_FILTER
private static final String
TAG
private static final boolean
DEBUG_FILTERS
final android.content.ComponentName
mComponent
Constructors Summary
PersistentPreferredActivity(android.content.IntentFilter filter, android.content.ComponentName activity)


        
        super(filter);
        mComponent = activity;
    
PersistentPreferredActivity(XmlPullParser parser)

        String shortComponent = parser.getAttributeValue(null, ATTR_NAME);
        mComponent = ComponentName.unflattenFromString(shortComponent);
        if (mComponent == null) {
            PackageManagerService.reportSettingsProblem(Log.WARN,
                    "Error in package manager settings: " +
                            "Bad activity name " + shortComponent +
                            " at " + parser.getPositionDescription());
        }
        int outerDepth = parser.getDepth();
        String tagName = parser.getName();
        int type;
        while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
                && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
            tagName = parser.getName();
            if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
                continue;
            } else if (type == XmlPullParser.START_TAG) {
                if (tagName.equals(ATTR_FILTER)) {
                    break;
                } else {
                    PackageManagerService.reportSettingsProblem(Log.WARN,
                            "Unknown element: " + tagName +
                            " at " + parser.getPositionDescription());
                    XmlUtils.skipCurrentTag(parser);
                }
            }
        }
        if (tagName.equals(ATTR_FILTER)) {
            readFromXml(parser);
        } else {
            PackageManagerService.reportSettingsProblem(Log.WARN,
                    "Missing element filter at " +
                    parser.getPositionDescription());
            XmlUtils.skipCurrentTag(parser);
        }
    
Methods Summary
public java.lang.StringtoString()

        return "PersistentPreferredActivity{0x" + Integer.toHexString(System.identityHashCode(this))
                + " " + mComponent.flattenToShortString() + "}";
    
public voidwriteToXml(org.xmlpull.v1.XmlSerializer serializer)

        serializer.attribute(null, ATTR_NAME, mComponent.flattenToShortString());
        serializer.startTag(null, ATTR_FILTER);
            super.writeToXml(serializer);
        serializer.endTag(null, ATTR_FILTER);