Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Implementation of camera switch #14

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

Conversation

kbillore
Copy link

No description provided.

public void openBackCamera() {
closeCamera();
GetCameraCnt();
if(numOfCameras == 1) {

Choose a reason for hiding this comment

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

introduce space between if and (

@@ -0,0 +1,40 @@
package com.intel.multicamera;

Choose a reason for hiding this comment

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

  • rename the file to MultiCamera or someother name.
  • Add copyright and license header

private static IntelCamera ic_instance = null;

IntelCamera() {
WhichCamera = 0;

Choose a reason for hiding this comment

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

use small letter for first character

private void OpenOnlyBackCamera() {
frameView0.setVisibility(FrameLayout.VISIBLE);
FrameVisibility[0] = frameView0.getVisibility();
if (mTopLeftCam == null) {

Choose a reason for hiding this comment

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

possible pointer derefenece in line no: 431

} else {
mTopLeftCam_textureView.setSurfaceTextureListener(mTopLeftCam.textureListener);
}
if(numOfCameras > 1)

Choose a reason for hiding this comment

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

introduce space between if and (

frameView0.setVisibility(View.GONE);
frameView1.setVisibility(FrameLayout.VISIBLE);
FrameVisibility[0] = frameView1.getVisibility();
if (mTopRightCam == null) {

Choose a reason for hiding this comment

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

same here. possible null pointer deference in line no: 471

@@ -442,8 +560,20 @@ private void manageBotmRightCam() {
protected void onResume() {
super.onResume();
Log.e(TAG, "onResume");
IntelCamera ic_cam = IntelCamera.getInstance();
if(ic_cam.getIsCameraOrSurveillance() == 1){

Choose a reason for hiding this comment

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

introduce space between if and (

hideCameraSwitchButton();
}
else {
if(ic_cam.getWhichCamera() == 0) {

Choose a reason for hiding this comment

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

introduce space between if and (

findViewById(R.id.imageView3).setVisibility(View.VISIBLE);

}
public void visibleCameraSwitchButton() {

Choose a reason for hiding this comment

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

introduce blank line between new functions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants