Format with google-java-format

This commit is contained in:
Ian Baker 2024-02-08 18:07:08 +00:00
parent c0c1c315c5
commit c4d9df970c
4 changed files with 13 additions and 12 deletions

View File

@ -34,7 +34,6 @@ import android.opengl.GLES20;
import android.opengl.GLES30;
import android.opengl.GLUtils;
import android.opengl.Matrix;
import androidx.annotation.DoNotInline;
import androidx.annotation.IntRange;
import androidx.annotation.Nullable;
import androidx.media3.common.C;
@ -413,7 +412,8 @@ public final class GlUtil {
currentEglContextVersion,
/* offset= */ 0);
checkGlError();
return currentEglContextVersion[0]; }
return currentEglContextVersion[0];
}
/**
* Returns a newly created sync object and inserts it into the GL command stream.
@ -445,7 +445,8 @@ public final class GlUtil {
*/
public static void deleteSyncObject(long syncObject) throws GlException {
deleteSyncObjectQuietly(syncObject);
checkGlError(); }
checkGlError();
}
/** Releases the GL sync object if set, suppressing any error. */
public static void deleteSyncObjectQuietly(long syncObject) {
@ -546,8 +547,7 @@ public final class GlUtil {
public static void focusEglSurface(
EGLDisplay eglDisplay, EGLContext eglContext, EGLSurface eglSurface, int width, int height)
throws GlException {
focusRenderTarget(
eglDisplay, eglContext, eglSurface, /* framebuffer= */ 0, width, height);
focusRenderTarget(eglDisplay, eglContext, eglSurface, /* framebuffer= */ 0, width, height);
}
/**

View File

@ -2499,8 +2499,8 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
*/
private static boolean codecNeedsFlushWorkaround(String name) {
return Util.SDK_INT == 19
&& Util.MODEL.startsWith("SM-G800")
&& ("OMX.Exynos.avc.dec".equals(name) || "OMX.Exynos.avc.dec.secure".equals(name));
&& Util.MODEL.startsWith("SM-G800")
&& ("OMX.Exynos.avc.dec".equals(name) || "OMX.Exynos.avc.dec.secure".equals(name));
}
/**

View File

@ -26,7 +26,6 @@ import android.view.Choreographer;
import android.view.Choreographer.FrameCallback;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
import androidx.annotation.DoNotInline;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
@ -419,7 +418,9 @@ public final class VideoFrameReleaseHelper {
@Nullable
private DisplayHelper maybeBuildDisplayHelper(@Nullable Context context) {
if (context == null) { return null;}
if (context == null) {
return null;
}
DisplayManager displayManager =
(DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE);
return displayManager != null ? new DisplayHelper(displayManager) : null;
@ -443,8 +444,7 @@ public final class VideoFrameReleaseHelper {
}
}
private final class DisplayHelper
implements DisplayManager.DisplayListener {
private final class DisplayHelper implements DisplayManager.DisplayListener {
private final DisplayManager displayManager;

View File

@ -106,7 +106,8 @@ public final class SphericalGLSurfaceView extends GLSurfaceView {
// fusion. It's used instead of TYPE_ROTATION_VECTOR since the latter uses the magnetometer on
// devices. When used indoors, the magnetometer can take some time to settle depending on the
// device and amount of metal in the environment.
@Nullable Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR);
@Nullable
Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR);
if (orientationSensor == null) {
orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);
}