FileDocCategorySizeDatePackage
ConfigurationInfo.javaAPI DocAndroid 5.1 API5237Thu Mar 12 22:22:10 GMT 2015android.content.pm

ConfigurationInfo

public class ConfigurationInfo extends Object implements android.os.Parcelable
Information you can retrieve about hardware configuration preferences declared by an application. This corresponds to information collected from the AndroidManifest.xml's <uses-configuration> and <uses-feature> tags.

Fields Summary
public int
reqTouchScreen
The kind of touch screen attached to the device. One of: {@link android.content.res.Configuration#TOUCHSCREEN_NOTOUCH}, {@link android.content.res.Configuration#TOUCHSCREEN_STYLUS}, {@link android.content.res.Configuration#TOUCHSCREEN_FINGER}.
public int
reqKeyboardType
Application's input method preference. One of: {@link android.content.res.Configuration#KEYBOARD_UNDEFINED}, {@link android.content.res.Configuration#KEYBOARD_NOKEYS}, {@link android.content.res.Configuration#KEYBOARD_QWERTY}, {@link android.content.res.Configuration#KEYBOARD_12KEY}
public int
reqNavigation
A flag indicating whether any keyboard is available. one of: {@link android.content.res.Configuration#NAVIGATION_UNDEFINED}, {@link android.content.res.Configuration#NAVIGATION_DPAD}, {@link android.content.res.Configuration#NAVIGATION_TRACKBALL}, {@link android.content.res.Configuration#NAVIGATION_WHEEL}
public static final int
INPUT_FEATURE_HARD_KEYBOARD
Value for {@link #reqInputFeatures}: if set, indicates that the application requires a hard keyboard
public static final int
INPUT_FEATURE_FIVE_WAY_NAV
Value for {@link #reqInputFeatures}: if set, indicates that the application requires a five way navigation device
public int
reqInputFeatures
Flags associated with the input features. Any combination of {@link #INPUT_FEATURE_HARD_KEYBOARD}, {@link #INPUT_FEATURE_FIVE_WAY_NAV}
public static final int
GL_ES_VERSION_UNDEFINED
Default value for {@link #reqGlEsVersion};
public int
reqGlEsVersion
The GLES version used by an application. The upper order 16 bits represent the major version and the lower order 16 bits the minor version.
public static final Creator
CREATOR
Constructors Summary
public ConfigurationInfo()


      
    
public ConfigurationInfo(ConfigurationInfo orig)

        reqTouchScreen = orig.reqTouchScreen;
        reqKeyboardType = orig.reqKeyboardType;
        reqNavigation = orig.reqNavigation;
        reqInputFeatures = orig.reqInputFeatures;
        reqGlEsVersion = orig.reqGlEsVersion;
    
private ConfigurationInfo(android.os.Parcel source)


       
        reqTouchScreen = source.readInt();
        reqKeyboardType = source.readInt();
        reqNavigation = source.readInt();
        reqInputFeatures = source.readInt();
        reqGlEsVersion = source.readInt();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public java.lang.StringgetGlEsVersion()
This method extracts the major and minor version of reqGLEsVersion attribute and returns it as a string. Say reqGlEsVersion value of 0x00010002 is returned as 1.2

return
String representation of the reqGlEsVersion attribute

        int major = ((reqGlEsVersion & 0xffff0000) >> 16);
        int minor = reqGlEsVersion & 0x0000ffff;
        return String.valueOf(major)+"."+String.valueOf(minor);
    
public java.lang.StringtoString()

        return "ConfigurationInfo{"
            + Integer.toHexString(System.identityHashCode(this))
            + " touchscreen = " + reqTouchScreen
            + " inputMethod = " + reqKeyboardType
            + " navigation = " + reqNavigation
            + " reqInputFeatures = " + reqInputFeatures
            + " reqGlEsVersion = " + reqGlEsVersion + "}";
    
public voidwriteToParcel(android.os.Parcel dest, int parcelableFlags)

        dest.writeInt(reqTouchScreen);
        dest.writeInt(reqKeyboardType);
        dest.writeInt(reqNavigation);
        dest.writeInt(reqInputFeatures);
        dest.writeInt(reqGlEsVersion);