List of usage examples for android.content.pm FeatureInfo GL_ES_VERSION_UNDEFINED
int GL_ES_VERSION_UNDEFINED
To view the source code for android.content.pm FeatureInfo GL_ES_VERSION_UNDEFINED.
Click Source Link
From source file:com.commonsware.android.mapsv2.animator.AbstractMapActivity.java
private static int getVersionFromPackageManager(Context context) { PackageManager packageManager = context.getPackageManager(); FeatureInfo[] featureInfos = packageManager.getSystemAvailableFeatures(); if (featureInfos != null && featureInfos.length > 0) { for (FeatureInfo featureInfo : featureInfos) { // Null feature name means this feature is the open // gl es version feature. if (featureInfo.name == null) { if (featureInfo.reqGlEsVersion != FeatureInfo.GL_ES_VERSION_UNDEFINED) { return getMajorVersion(featureInfo.reqGlEsVersion); } else { return 1; // Lack of property means OpenGL ES // version 1 }/*from w ww.jav a 2 s . co m*/ } } } return 1; }
From source file:count.ly.messaging.CrashDetails.java
/** * Returns the current device openGL version. *///from ww w . j a va 2s .c om static String getOpenGL(Context context) { PackageManager packageManager = context.getPackageManager(); FeatureInfo[] featureInfos = packageManager.getSystemAvailableFeatures(); if (featureInfos != null && featureInfos.length > 0) { for (FeatureInfo featureInfo : featureInfos) { // Null feature name means this feature is the open gl es version feature. if (featureInfo.name == null) { if (featureInfo.reqGlEsVersion != FeatureInfo.GL_ES_VERSION_UNDEFINED) { return Integer.toString((featureInfo.reqGlEsVersion & 0xffff0000) >> 16); } else { return "1"; // Lack of property means OpenGL ES version 1 } } } } return "1"; }
From source file:de.kartheininger.markerclustering.AbstractMapActivity.java
private static int getVersionFromPackageManager(Context context) { PackageManager packageManager = context.getPackageManager(); FeatureInfo[] featureInfos = packageManager.getSystemAvailableFeatures(); if (featureInfos != null && featureInfos.length > 0) { for (FeatureInfo featureInfo : featureInfos) { // Null feature name means this feature is the open // gl es version feature. if (featureInfo.name == null) { if (featureInfo.reqGlEsVersion != FeatureInfo.GL_ES_VERSION_UNDEFINED) { return getMajorVersion(featureInfo.reqGlEsVersion); } else { return 1; // Lack of property means OpenGL ES // version 1 }/* w w w . j av a2s . c o m*/ } } } return 1; }
From source file:com.projecto.mapav2.MainActivity.java
private static int getVersionFromPackageManager(Context context) { PackageManager packageManager = context.getPackageManager(); FeatureInfo[] featureInfos = packageManager.getSystemAvailableFeatures(); if (featureInfos != null && featureInfos.length > 0) { for (FeatureInfo featureInfo : featureInfos) { // Null feature name means this feature is the open gl es version feature. if (featureInfo.name == null) { if (featureInfo.reqGlEsVersion != FeatureInfo.GL_ES_VERSION_UNDEFINED) { return getMajorVersion(featureInfo.reqGlEsVersion); } else { return 1; // Lack of property means OpenGL ES version 1 }/*w w w .j a v a 2 s . c o m*/ } } } return 1; }
From source file:com.yayandroid.utility.MapHelperFragment.java
private int getVersionFromPackageManager(Context context) { PackageManager packageManager = context.getPackageManager(); FeatureInfo[] featureInfos = packageManager.getSystemAvailableFeatures(); if (featureInfos != null && featureInfos.length > 0) { for (FeatureInfo featureInfo : featureInfos) { // Null feature name means this feature is the open // GLes version feature. if (featureInfo.name == null) { if (featureInfo.reqGlEsVersion != FeatureInfo.GL_ES_VERSION_UNDEFINED) { return getMajorVersion(featureInfo.reqGlEsVersion); } else { // Lack of property means OpenGL ES version 1 return 1; }/*from ww w . j a v a2 s. com*/ } } } return 1; }
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); }//from www . ja v a2 s .c om if (sa.getBoolean(com.android.internal.R.styleable.AndroidManifestUsesFeature_required, true)) { fi.flags |= FeatureInfo.FLAG_REQUIRED; } sa.recycle(); return fi; }