Add a null check in DummySurface static initializer

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157958694
This commit is contained in:
andrewlewis 2017-06-04 07:02:13 -07:00 committed by Oliver Woodman
parent 35cc0d65cd
commit 8dca0b9418

View file

@ -76,7 +76,7 @@ public final class DummySurface extends Surface {
if (Util.SDK_INT >= 17) {
EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
String extensions = EGL14.eglQueryString(display, EGL10.EGL_EXTENSIONS);
SECURE_SUPPORTED = extensions.contains("EGL_EXT_protected_content");
SECURE_SUPPORTED = extensions != null && extensions.contains("EGL_EXT_protected_content");
} else {
SECURE_SUPPORTED = false;
}