Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiCamera App Changes for Coverity Fix #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pillai45
Copy link

The changes are made in the multicamera APP code to address the Coverity Issues

One part of the issue is solved here

Tracked-On: OAM-106764

The changes are made in the multicamera APP code to address the Coverity Issues

One part of the issue is solved here

Tracked-On: OAM-106764
Signed-off-by: pillaive <[email protected]>
@@ -530,11 +525,6 @@ public void run() {
System.out.println(TAG +" camera close exception");
}

if (null != imageReader) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wont create leak ?

@@ -480,10 +479,6 @@ public void closeCamera() {
cameraDevice.close();
cameraDevice = null;
}
if (null != imageReader) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, it wont create leak ?

@@ -234,9 +235,9 @@ private String toLocalNumber(int n) {
}

/** Converts the given double to a localized String version. */
private String toLocalNumber(double n) {
/*private String toLocalNumber(double n) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this commented code, if not used

@@ -106,6 +107,7 @@ protected void onCreate(Bundle savedInstanceState) {

checkPermissions();


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove newly added unwanted line

Open_Camera_ById();
}
if (mCamera_BackView.isAvailable()) {
mCamera.textureListener.onSurfaceTextureAvailable(
mCamera_BackView.getSurfaceTexture(), mCamera_BackView.getWidth(),
mCamera_BackView.getHeight());
} else {
mCamera_BackView.setSurfaceTextureListener(mCamera.textureListener);
if(mCamera != null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use Objects.isNull

@@ -25,8 +25,7 @@
import androidx.preference.PreferenceFragment;

public class SettingsActivity extends AppCompatActivity {
private String TAG = "settings";


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@@ -99,6 +100,7 @@ protected void onCreate(Bundle savedInstanceState) {
mRoundedThumbnailView = findViewById(R.id.rounded_thumbnail_view);

checkPermissions();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@@ -176,6 +177,7 @@ public static String[] generateFileDetails(int type) {
fileDetails[0] = dateFormat.format(date);
fileDetails[1] = fileDetails[0] + ".jpg";
fileDetails[2] = "image/jpeg";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@sysopenci sysopenci added the Stale Stale label for inactive open prs label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Stale label for inactive open prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants