packages/apps/Settings
リビジョン | 3de30ed9d2e49dd7fb4b02815cd78908245d1654 (tree) |
---|---|
日時 | 2014-03-04 17:23:43 |
作者 | Lukasz Anaczkowski <lukasz.anaczkowski@inte...> |
コミッター | Chih-Wei Huang |
Add information about OpenGL driver version
Change-Id: Icf107642b6d84a85c90c7411d6e42e9b6c6ef739
Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
@@ -1964,6 +1964,7 @@ | ||
1964 | 1964 | <string name="baseband_version">Baseband version</string> |
1965 | 1965 | <!-- About phone screen, setting option name--> |
1966 | 1966 | <string name="kernel_version">Kernel version</string> |
1967 | + <string name="opengl_version">OpenGL driver version</string> | |
1967 | 1968 | <!-- About phone screen, setting option name--> |
1968 | 1969 | <string name="build_number">Build number</string> |
1969 | 1970 | <!-- About phone screen, setting option name--> |
@@ -131,6 +131,12 @@ | ||
131 | 131 | android:title="@string/kernel_version" |
132 | 132 | android:summary="@string/device_info_default"/> |
133 | 133 | |
134 | + <!-- OpenGL Version --> | |
135 | + <Preference android:key="opengl_version" | |
136 | + style="?android:preferenceInformationStyle" | |
137 | + android:title="@string/opengl_version" | |
138 | + android:summary="@string/device_info_default"/> | |
139 | + | |
134 | 140 | <!-- Detailed build version --> |
135 | 141 | <Preference android:key="build_number" |
136 | 142 | style="?android:preferenceInformationStyle" |
@@ -30,6 +30,7 @@ import android.preference.PreferenceGroup; | ||
30 | 30 | import android.preference.PreferenceScreen; |
31 | 31 | import android.util.Log; |
32 | 32 | import android.widget.Toast; |
33 | +import android.opengl.GLES20; | |
33 | 34 | |
34 | 35 | import java.io.BufferedReader; |
35 | 36 | import java.io.FileReader; |
@@ -55,6 +56,7 @@ public class DeviceInfoSettings extends RestrictedSettingsFragment { | ||
55 | 56 | private static final String PROPERTY_URL_SAFETYLEGAL = "ro.url.safetylegal"; |
56 | 57 | private static final String PROPERTY_SELINUX_STATUS = "ro.build.selinux"; |
57 | 58 | private static final String KEY_KERNEL_VERSION = "kernel_version"; |
59 | + private static final String KEY_OPENGL_VERSION = "opengl_version"; | |
58 | 60 | private static final String KEY_BUILD_NUMBER = "build_number"; |
59 | 61 | private static final String KEY_DEVICE_MODEL = "device_model"; |
60 | 62 | private static final String KEY_SELINUX_STATUS = "selinux_status"; |
@@ -85,6 +87,10 @@ public class DeviceInfoSettings extends RestrictedSettingsFragment { | ||
85 | 87 | // This will keep us from entering developer mode without a PIN. |
86 | 88 | protectByRestrictions(KEY_BUILD_NUMBER); |
87 | 89 | |
90 | + String opengl_version = "GL Vendor: " + GLES20.glGetString(GLES20.GL_VENDOR) + "\n" + | |
91 | + "GL Renderer: " + GLES20.glGetString(GLES20.GL_RENDERER) + "\n" + | |
92 | + "GL Version: " + GLES20.glGetString(GLES20.GL_VERSION); | |
93 | + | |
88 | 94 | setStringSummary(KEY_FIRMWARE_VERSION, Build.VERSION.RELEASE); |
89 | 95 | findPreference(KEY_FIRMWARE_VERSION).setEnabled(true); |
90 | 96 | setValueSummary(KEY_BASEBAND_VERSION, "gsm.version.baseband"); |
@@ -94,6 +100,7 @@ public class DeviceInfoSettings extends RestrictedSettingsFragment { | ||
94 | 100 | setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY); |
95 | 101 | findPreference(KEY_BUILD_NUMBER).setEnabled(true); |
96 | 102 | findPreference(KEY_KERNEL_VERSION).setSummary(getFormattedKernelVersion()); |
103 | + findPreference(KEY_OPENGL_VERSION).setSummary(opengl_version); | |
97 | 104 | setStringSummary(KEY_DEVICE_MANUFACTURER, Build.MANUFACTURER); |
98 | 105 | |
99 | 106 | if (!SELinux.isSELinuxEnabled()) { |