Java 5 migration

This commit is contained in:
TacoTheDank 2020-08-31 19:26:02 -04:00
parent 5b711fcec6
commit 7df0c1824a
2 changed files with 6 additions and 10 deletions

View File

@ -59,6 +59,6 @@ public class WebImage extends AutoSafeParcelable {
}
public String toString() {
return String.format(Locale.getDefault(), "Image %dx%d %s", new Object[]{Integer.valueOf(width), Integer.valueOf(height), uri.toString()});
return String.format(Locale.getDefault(), "Image %dx%d %s", width, height, uri.toString());
}
}

View File

@ -117,7 +117,7 @@ public class DeviceConfiguration {
if (egl10 != null) {
EGLDisplay display = egl10.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
egl10.eglInitialize(display, new int[2]);
int cf[] = new int[1];
int[] cf = new int[1];
if (egl10.eglGetConfigs(display, null, 0, cf)) {
EGLConfig[] configs = new EGLConfig[cf[0]];
if (egl10.eglGetConfigs(display, configs, cf[0], cf)) {
@ -147,8 +147,8 @@ public class DeviceConfiguration {
}
}
private static void addExtensionsForConfig(EGL10 egl10, EGLDisplay egldisplay, EGLConfig eglconfig, int ai[],
int ai1[], Set<String> set) {
private static void addExtensionsForConfig(EGL10 egl10, EGLDisplay egldisplay, EGLConfig eglconfig, int[] ai,
int[] ai1, Set<String> set) {
EGLContext eglcontext = egl10.eglCreateContext(egldisplay, eglconfig, EGL10.EGL_NO_CONTEXT, ai1);
if (eglcontext != EGL10.EGL_NO_CONTEXT) {
javax.microedition.khronos.egl.EGLSurface eglsurface =
@ -157,12 +157,8 @@ public class DeviceConfiguration {
egl10.eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext);
String s = GLES10.glGetString(7939);
if (s != null && !s.isEmpty()) {
String as[] = s.split(" ");
int i = as.length;
for (int j = 0; j < i; j++) {
set.add(as[j]);
}
String[] as = s.split(" ");
set.addAll(Arrays.asList(as).subList(0, as.length));
}
egl10.eglMakeCurrent(egldisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
egl10.eglDestroySurface(egldisplay, eglsurface);