Skip to content

Commit

Permalink
cannot record audio and video message
Browse files Browse the repository at this point in the history
for now
  • Loading branch information
Shaji Khan committed Mar 22, 2024
1 parent fb79e56 commit cc75325
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/main/java/com/shajikhan/ladspa/amprack/Rack.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
videoRecord.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (mainActivity.record.isChecked()) {
buttonView.setChecked(false);
MainActivity.toast("Cannot record audio and video at the same time");
return;
}

if (isChecked)
mainActivity.camera2.startRecording();
else
Expand Down Expand Up @@ -298,6 +304,12 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mainActivity.record.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
if (videoRecord.isChecked()) {
compoundButton.setChecked(false);
MainActivity.toast("Cannot record audio and video at the same time");
return;
}

if (!mainActivity.onOff.isChecked()) {
// mainActivity.record.setChecked(!b);
if (b) {
Expand Down

0 comments on commit cc75325

Please sign in to comment.