packages/apps/Settings
Revisão | ee0b9f05c04a072fca5924842ee7aa62750ede6b (tree) |
---|---|
Hora | 2016-09-23 18:03:48 |
Autor | Lukasz Anaczkowski <lukasz.anaczkowski@inte...> |
Commiter | Chih-Wei Huang |
Add information about OpenGL driver version
Change-Id: Icf107642b6d84a85c90c7411d6e42e9b6c6ef739
Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
@@ -969,6 +969,7 @@ | ||
969 | 969 | <string name="fcc_equipment_id" msgid="149114368246356737">"設備 ID"</string> |
970 | 970 | <string name="baseband_version" msgid="1848990160763524801">"基頻版本"</string> |
971 | 971 | <string name="kernel_version" msgid="9192574954196167602">"核心版本"</string> |
972 | + <string name="opengl_version">"Open GL 驅動版本"</string> | |
972 | 973 | <string name="build_number" msgid="3075795840572241758">"版本號碼"</string> |
973 | 974 | <string name="selinux_status" msgid="6212165375172061672">"SELinux 狀態"</string> |
974 | 975 | <string name="device_info_not_available" msgid="8062521887156825182">"無法取得"</string> |
@@ -2268,6 +2268,8 @@ | ||
2268 | 2268 | <!-- About phone screen, setting option name [CHAR LIMIT=40] --> |
2269 | 2269 | <string name="kernel_version">Kernel version</string> |
2270 | 2270 | <!-- 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] --> | |
2271 | 2273 | <string name="build_number">Build number</string> |
2272 | 2274 | <!-- About phone screen, setting option name [CHAR LIMIT=40] --> |
2273 | 2275 | <string name="selinux_status">SELinux status</string> |
@@ -113,6 +113,12 @@ | ||
113 | 113 | android:title="@string/kernel_version" |
114 | 114 | android:summary="@string/device_info_default"/> |
115 | 115 | |
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 | + | |
116 | 122 | <!-- Detailed build version --> |
117 | 123 | <Preference android:key="build_number" |
118 | 124 | android:enabled="false" |
@@ -19,6 +19,7 @@ package com.android.settings; | ||
19 | 19 | import android.app.Activity; |
20 | 20 | import android.content.Context; |
21 | 21 | import android.content.Intent; |
22 | +import android.opengl.GLES20; | |
22 | 23 | import android.os.Build; |
23 | 24 | import android.os.Bundle; |
24 | 25 | import android.os.PersistableBundle; |
@@ -60,6 +61,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In | ||
60 | 61 | private static final String PROPERTY_URL_SAFETYLEGAL = "ro.url.safetylegal"; |
61 | 62 | private static final String PROPERTY_SELINUX_STATUS = "ro.build.selinux"; |
62 | 63 | private static final String KEY_KERNEL_VERSION = "kernel_version"; |
64 | + private static final String KEY_OPENGL_VERSION = "opengl_version"; | |
63 | 65 | private static final String KEY_BUILD_NUMBER = "build_number"; |
64 | 66 | private static final String KEY_DEVICE_MODEL = "device_model"; |
65 | 67 | private static final String KEY_SELINUX_STATUS = "selinux_status"; |
@@ -103,6 +105,10 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In | ||
103 | 105 | |
104 | 106 | addPreferencesFromResource(R.xml.device_info_settings); |
105 | 107 | |
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 | + | |
106 | 112 | setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE); |
107 | 113 | findPreference(KEY_FIRMWARE_VERSION).setEnabled(true); |
108 | 114 |
@@ -120,6 +126,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In | ||
120 | 126 | setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY); |
121 | 127 | findPreference(KEY_BUILD_NUMBER).setEnabled(true); |
122 | 128 | findPreference(KEY_KERNEL_VERSION).setSummary(DeviceInfoUtils.getFormattedKernelVersion()); |
129 | + findPreference(KEY_OPENGL_VERSION).setSummary(opengl_version); | |
123 | 130 | setStringSummary(KEY_DEVICE_MANUFACTURER, Build.MANUFACTURER); |
124 | 131 | |
125 | 132 | if (!SELinux.isSELinuxEnabled()) { |