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

C922 dialog temp #37

Open
wants to merge 1 commit into
base: A10_V1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ public void onClick(View view) {
}

public void openBackCamera() {
System.out.println(TAG+"open back camera start");
closeCamera();

GetCameraCnt();
Expand All @@ -317,15 +318,21 @@ public void openBackCamera() {
updateStorageSpace(null);

OpenOnlyBackCamera();
System.out.println(TAG+"open back camera end");

}

public void openFrontCamera() {
System.out.println(TAG+"open front camera start");

closeCamera();

GetCameraCnt();
updateStorageSpace(null);

OpenOnlyFrontCamera();
System.out.println(TAG+"open front camera end");

}

private void OpenOnlyFrontCamera() {
Expand Down Expand Up @@ -456,6 +463,16 @@ private void checkPermissions() {

}

@Override
protected void onDestroy() {
try {
unregisterReceiver(mCameraInst.getmUsbReceiver());
}catch (Exception e) {
Log.e(TAG, "fatal during unregister receiver");
}
super.onDestroy();
}

@Override
protected void onPause() {
super.onPause();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ public void GetCameraCnt() {
}

public void Open_TopLeftCam() {
System.out.println(TAG+"open top left camera start");

String[] Data = new String[5];
ImageButton[] Buttons = new ImageButton[6];

Expand Down Expand Up @@ -344,9 +346,13 @@ public void onClick(View v) {

ic_camera.setTopLeftCam(new CameraBase(this, mTopLeftCam_textureView, Buttons, mRecordingTimeView,
Data, roundedThumbnailView));
System.out.println(TAG+"open top left camera end");

}

public void Open_TopRightCam() {
System.out.println(TAG+"open top right camera start");

String[] Data = new String[5];
ImageButton[] Buttons = new ImageButton[6];
mTopRightCam_textureView = findViewById(R.id.textureview1);
Expand Down Expand Up @@ -390,9 +396,13 @@ public void onClick(View v) {

ic_camera.setTopRightCam(new CameraBase(this, mTopRightCam_textureView, Buttons,
mRecordingTimeView0, Data, roundedThumbnailView));
System.out.println(TAG+"open top right camera end");

}

public void Open_BotmLeftCam() {
System.out.println(TAG+"open bot left camera start");

String[] Data = new String[5];
ImageButton[] Buttons = new ImageButton[6];
mBotmLeftCam_textureView = findViewById(R.id.textureview2);
Expand Down Expand Up @@ -437,9 +447,13 @@ public void onClick(View v) {

ic_camera.setBotLeftCam(new CameraBase(this, mBotmLeftCam_textureView, Buttons,
mRecordingTimeView1, Data, roundedThumbnailView));
System.out.println(TAG+"open top left camera end");

}

public void Open_BotmRightCam() {
System.out.println(TAG+"open bot right camera start");

String[] Data = new String[5];
ImageButton[] Buttons = new ImageButton[6];
mBotmRightCam_textureView = findViewById(R.id.textureview3);
Expand Down Expand Up @@ -482,6 +496,8 @@ public void onClick(View v) {

ic_camera.setBotRightCam(new CameraBase(this, mBotmRightCam_textureView, Buttons,
mRecordingTimeView2, Data, roundedThumbnailView));
System.out.println(TAG+"open bot right camera end");

}

private void manageTopLeftCam() {
Expand Down Expand Up @@ -650,6 +666,16 @@ public void closeCamera() {
}
}

@Override
protected void onDestroy() {
try {
unregisterReceiver(ic_camera.getmUsbReceiver());
}catch (Exception e) {
Log.e(TAG, "fatal during unregister receiver");
}
super.onDestroy();
}

@Override
protected void onPause() {
System.out.println("onPause");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,16 @@ private void checkPermissions() {
}


@Override
protected void onDestroy() {
try {
unregisterReceiver(mCameraInst.getmUsbReceiver());
}catch (Exception e) {
Log.e(TAG, "fatal during unregister receiver");
}
super.onDestroy();
}

@Override
protected void onPause() {
super.onPause();
Expand Down