<TextView android:id="@+id/attr_five_way_nav"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
+ <TextView android:id="@+id/attr_gles_version_label"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/gles_version_label"
+ android:textStyle="bold" />
+ <TextView android:id="@+id/attr_gles_version"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"/>
</LinearLayout>
</ScrollView>
private static final int TOUCHSCREEN = BASE + 1;
private static final int KEYBOARD_TYPE = BASE + 2;
private static final int NAVIGATION = BASE + 3;
+ private static final int GLES_VERSION = BASE + 4;
@Override
protected void onCreate(Bundle icicle) {
setContentView(R.layout.application_hw_pref);
if(appHwPref != null) {
- displayTextView(R.id.attr_package, pInfo.applicationInfo.loadLabel(mPm));
- displayTextView(R.id.attr_touchscreen, appHwPref, TOUCHSCREEN);
- displayTextView(R.id.attr_input_method, appHwPref, KEYBOARD_TYPE);
- displayTextView(R.id.attr_navigation, appHwPref, NAVIGATION);
- displayFlag(R.id.attr_hard_keyboard, ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD, appHwPref);
- displayFlag(R.id.attr_five_way_nav, ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV, appHwPref);
+ displayTextView(R.id.attr_package, pInfo.applicationInfo.loadLabel(mPm));
+ displayTextView(R.id.attr_touchscreen, appHwPref, TOUCHSCREEN);
+ displayTextView(R.id.attr_input_method, appHwPref, KEYBOARD_TYPE);
+ displayTextView(R.id.attr_navigation, appHwPref, NAVIGATION);
+ displayFlag(R.id.attr_hard_keyboard, ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD, appHwPref);
+ displayFlag(R.id.attr_five_way_nav, ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV, appHwPref);
+ displayTextView(R.id.attr_gles_version, appHwPref, GLES_VERSION);
}
}
void displayFlag(int viewId, int flagMask, ConfigurationInfo[] appHwPref) {
- if(appHwPref == null) {
- return;
- }
- boolean flag = false;
- for (int i = 0; i < appHwPref.length; i++) {
- ConfigurationInfo pref = appHwPref[i];
- if((pref.reqInputFeatures & flagMask) != 0) {
- flag = true;
- break;
- }
+ if(appHwPref == null) {
+ return;
+ }
+ boolean flag = false;
+ for (int i = 0; i < appHwPref.length; i++) {
+ ConfigurationInfo pref = appHwPref[i];
+ if((pref.reqInputFeatures & flagMask) != 0) {
+ flag = true;
+ break;
+ }
}
if(flag) {
displayTextView(viewId, "true");
} else {
- displayTextView(viewId, "false");
+ displayTextView(viewId, "false");
}
}
case NAVIGATION:
str = getNavigationStr(config[i]);
break;
+ case GLES_VERSION:
+ str = config[i].getGlEsVersion();
+ break;
}
if(str != null) {
list.add(str);