Skip to content

Commit

Permalink
Ignore extra cameras to ensure the multi preview
Browse files Browse the repository at this point in the history
Issue Detailed: Fail to open 6 default virtio-camera with multi
preview in aaag.

Issue Fixed: The multi camera app only supports up to 4 cameras. If the number
of cameras exceeds 4, the extra cameras will be ignored and only the first four
will be used.

Tests Done: Multi-camera preview works well after the change.

Tracked-On: OAM-128468
Signed-off-by: Jade Guo <[email protected]>
  • Loading branch information
jiaxuan-guo committed Dec 17, 2024
1 parent cee8916 commit b1e8bf5
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,18 @@ void startCamera() {
manageTopLeftCam();
manageBotmLeftCam();
manageTopRightCam();
} else if (numOfCameras == 4) {
} else if (numOfCameras >= 4) {
LinLayout1.setVisibility(View.VISIBLE);
LinLayout2.setVisibility(View.VISIBLE);
manageTopLeftCam();
manageTopRightCam();
manageBotmLeftCam();
manageBotmRightCam();
if (numOfCameras > 4) {
Log.w(TAG, "numOfCameras exceeds 4. Cameras beyond the fourth will be ignored.");
}
} else {
Log.d(TAG, "onResume No CAMERA CONNECTED");
Log.w(TAG, "onResume No CAMERA CONNECTED");
}
}
private void set_FrameVisibilities() {
Expand Down

0 comments on commit b1e8bf5

Please sign in to comment.