Lint: control flow issues

This commit is contained in:
TacoTheDank 2020-08-31 19:23:19 -04:00
parent 3dc63b80d1
commit 5b711fcec6
3 changed files with 6 additions and 13 deletions

View File

@ -147,12 +147,10 @@ public class CastDeviceControllerImpl extends ICastDeviceController.Stub impleme
switch (message.getPayloadType()) { switch (message.getPayloadType()) {
case STRING: case STRING:
String response = message.getPayloadUtf8(); String response = message.getPayloadUtf8();
if (requestId == null) { if (requestId != null) {
this.onTextMessageReceived(message.getNamespace(), response);
} else {
this.onSendMessageSuccess(response, requestId); this.onSendMessageSuccess(response, requestId);
this.onTextMessageReceived(message.getNamespace(), response);
} }
this.onTextMessageReceived(message.getNamespace(), response);
break; break;
case BINARY: case BINARY:
byte[] payload = message.getPayloadBinary(); byte[] payload = message.getPayloadBinary();

View File

@ -153,9 +153,7 @@ public class DeviceConfiguration {
if (eglcontext != EGL10.EGL_NO_CONTEXT) { if (eglcontext != EGL10.EGL_NO_CONTEXT) {
javax.microedition.khronos.egl.EGLSurface eglsurface = javax.microedition.khronos.egl.EGLSurface eglsurface =
egl10.eglCreatePbufferSurface(egldisplay, eglconfig, ai); egl10.eglCreatePbufferSurface(egldisplay, eglconfig, ai);
if (eglsurface == EGL10.EGL_NO_SURFACE) { if (eglsurface != EGL10.EGL_NO_SURFACE) {
egl10.eglDestroyContext(egldisplay, eglcontext);
} else {
egl10.eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext); egl10.eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext);
String s = GLES10.glGetString(7939); String s = GLES10.glGetString(7939);
if (s != null && !s.isEmpty()) { if (s != null && !s.isEmpty()) {
@ -168,8 +166,8 @@ public class DeviceConfiguration {
} }
egl10.eglMakeCurrent(egldisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); egl10.eglMakeCurrent(egldisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
egl10.eglDestroySurface(egldisplay, eglsurface); egl10.eglDestroySurface(egldisplay, eglsurface);
egl10.eglDestroyContext(egldisplay, eglcontext);
} }
egl10.eglDestroyContext(egldisplay, eglcontext);
} }
} }
} }

View File

@ -647,11 +647,8 @@ public class McsService extends Service implements Handler.Callback {
} }
private void handleOutputDone(android.os.Message msg) { private void handleOutputDone(android.os.Message msg) {
switch (msg.arg1) { if (msg.arg1 == MCS_HEARTBEAT_PING_TAG) {
case MCS_HEARTBEAT_PING_TAG: wakeLock.release();
wakeLock.release();
break;
default:
} }
} }