From cc7532590f2ec2b7fa7fa56020c50ff48a24db10 Mon Sep 17 00:00:00 2001 From: Shaji Khan Date: Fri, 22 Mar 2024 13:25:09 +0530 Subject: [PATCH] cannot record audio and video message for now --- .../main/java/com/shajikhan/ladspa/amprack/Rack.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/java/com/shajikhan/ladspa/amprack/Rack.java b/app/src/main/java/com/shajikhan/ladspa/amprack/Rack.java index c3ab80f7..203240a3 100644 --- a/app/src/main/java/com/shajikhan/ladspa/amprack/Rack.java +++ b/app/src/main/java/com/shajikhan/ladspa/amprack/Rack.java @@ -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 @@ -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) {