• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Revisãoee0b9f05c04a072fca5924842ee7aa62750ede6b (tree)
Hora2016-09-23 18:03:48
AutorLukasz Anaczkowski <lukasz.anaczkowski@inte...>
CommiterChih-Wei Huang

Mensagem de Log

Add information about OpenGL driver version

Change-Id: Icf107642b6d84a85c90c7411d6e42e9b6c6ef739
Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>

Mudança Sumário

Diff

--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -969,6 +969,7 @@
969969 <string name="fcc_equipment_id" msgid="149114368246356737">"設備 ID"</string>
970970 <string name="baseband_version" msgid="1848990160763524801">"基頻版本"</string>
971971 <string name="kernel_version" msgid="9192574954196167602">"核心版本"</string>
972+ <string name="opengl_version">"Open GL 驅動版本"</string>
972973 <string name="build_number" msgid="3075795840572241758">"版本號碼"</string>
973974 <string name="selinux_status" msgid="6212165375172061672">"SELinux 狀態"</string>
974975 <string name="device_info_not_available" msgid="8062521887156825182">"無法取得"</string>
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2268,6 +2268,8 @@
22682268 <!-- About phone screen, setting option name [CHAR LIMIT=40] -->
22692269 <string name="kernel_version">Kernel version</string>
22702270 <!-- About phone screen, setting option name [CHAR LIMIT=40] -->
2271+ <string name="opengl_version">OpenGL driver version</string>
2272+ <!-- About phone screen, setting option name [CHAR LIMIT=40] -->
22712273 <string name="build_number">Build number</string>
22722274 <!-- About phone screen, setting option name [CHAR LIMIT=40] -->
22732275 <string name="selinux_status">SELinux status</string>
--- a/res/xml/device_info_settings.xml
+++ b/res/xml/device_info_settings.xml
@@ -113,6 +113,12 @@
113113 android:title="@string/kernel_version"
114114 android:summary="@string/device_info_default"/>
115115
116+ <!-- OpenGL Version -->
117+ <Preference android:key="opengl_version"
118+ style="?android:preferenceInformationStyle"
119+ android:title="@string/opengl_version"
120+ android:summary="@string/device_info_default"/>
121+
116122 <!-- Detailed build version -->
117123 <Preference android:key="build_number"
118124 android:enabled="false"
--- a/src/com/android/settings/DeviceInfoSettings.java
+++ b/src/com/android/settings/DeviceInfoSettings.java
@@ -19,6 +19,7 @@ package com.android.settings;
1919 import android.app.Activity;
2020 import android.content.Context;
2121 import android.content.Intent;
22+import android.opengl.GLES20;
2223 import android.os.Build;
2324 import android.os.Bundle;
2425 import android.os.PersistableBundle;
@@ -60,6 +61,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
6061 private static final String PROPERTY_URL_SAFETYLEGAL = "ro.url.safetylegal";
6162 private static final String PROPERTY_SELINUX_STATUS = "ro.build.selinux";
6263 private static final String KEY_KERNEL_VERSION = "kernel_version";
64+ private static final String KEY_OPENGL_VERSION = "opengl_version";
6365 private static final String KEY_BUILD_NUMBER = "build_number";
6466 private static final String KEY_DEVICE_MODEL = "device_model";
6567 private static final String KEY_SELINUX_STATUS = "selinux_status";
@@ -103,6 +105,10 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
103105
104106 addPreferencesFromResource(R.xml.device_info_settings);
105107
108+ String opengl_version = "GL Vendor: " + GLES20.glGetString(GLES20.GL_VENDOR) + "\n" +
109+ "GL Renderer: " + GLES20.glGetString(GLES20.GL_RENDERER) + "\n" +
110+ "GL Version: " + GLES20.glGetString(GLES20.GL_VERSION);
111+
106112 setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE);
107113 findPreference(KEY_FIRMWARE_VERSION).setEnabled(true);
108114
@@ -120,6 +126,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
120126 setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY);
121127 findPreference(KEY_BUILD_NUMBER).setEnabled(true);
122128 findPreference(KEY_KERNEL_VERSION).setSummary(DeviceInfoUtils.getFormattedKernelVersion());
129+ findPreference(KEY_OPENGL_VERSION).setSummary(opengl_version);
123130 setStringSummary(KEY_DEVICE_MANUFACTURER, Build.MANUFACTURER);
124131
125132 if (!SELinux.isSELinuxEnabled()) {