Messaging: Nullability
Change-Id: I8bcde2a868a9c8989971d056be24ff4986e4f8f3
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
* Copyright (C) 2024 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,6 +24,8 @@ import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
@@ -41,18 +44,18 @@ public class SoftwareCameraPreview extends SurfaceView implements CameraPreview.
|
||||
mPreview = new CameraPreview(this);
|
||||
getHolder().addCallback(new SurfaceHolder.Callback() {
|
||||
@Override
|
||||
public void surfaceCreated(final SurfaceHolder surfaceHolder) {
|
||||
public void surfaceCreated(@NonNull final SurfaceHolder surfaceHolder) {
|
||||
CameraManager.get().setSurface(mPreview);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceChanged(final SurfaceHolder surfaceHolder, final int format, final int width,
|
||||
final int height) {
|
||||
public void surfaceChanged(@NonNull final SurfaceHolder surfaceHolder, final int format,
|
||||
final int width, final int height) {
|
||||
CameraManager.get().setSurface(mPreview);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceDestroyed(final SurfaceHolder surfaceHolder) {
|
||||
public void surfaceDestroyed(@NonNull final SurfaceHolder surfaceHolder) {
|
||||
CameraManager.get().setSurface(null);
|
||||
}
|
||||
});
|
||||
@@ -60,7 +63,7 @@ public class SoftwareCameraPreview extends SurfaceView implements CameraPreview.
|
||||
|
||||
|
||||
@Override
|
||||
protected void onVisibilityChanged(final View changedView, final int visibility) {
|
||||
protected void onVisibilityChanged(@NonNull final View changedView, final int visibility) {
|
||||
super.onVisibilityChanged(changedView, visibility);
|
||||
mPreview.onVisibilityChanged(visibility);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user