Example usage for android.content.pm FeatureInfo FeatureInfo

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

Introduction

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

Prototype

public FeatureInfo() 

Source Link

Usage

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

private FeatureInfo parseUsesFeature(Resources res, AttributeSet attrs)
        throws XmlPullParserException, IOException {
    FeatureInfo fi = new FeatureInfo();
    TypedArray sa = res.obtainAttributes(attrs, com.android.internal.R.styleable.AndroidManifestUsesFeature);
    // Note: don't allow this value to be a reference to a resource
    // that may change.
    fi.name = sa.getNonResourceString(com.android.internal.R.styleable.AndroidManifestUsesFeature_name);
    if (fi.name == null) {
        fi.reqGlEsVersion = sa.getInt(com.android.internal.R.styleable.AndroidManifestUsesFeature_glEsVersion,
                FeatureInfo.GL_ES_VERSION_UNDEFINED);
    }//  w w w .  j  a  va  2s.  com
    if (sa.getBoolean(com.android.internal.R.styleable.AndroidManifestUsesFeature_required, true)) {
        fi.flags |= FeatureInfo.FLAG_REQUIRED;
    }
    sa.recycle();
    return fi;
}