-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: master
Are you sure you want to change the base?
Conversation
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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(); | |||
|
|||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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"; | |||
|
|||
|
There was a problem hiding this comment.
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(); | |||
|
There was a problem hiding this comment.
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"; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
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