From 9624e3aabeacfce5b5eb92bef1dfcaf3640d589e Mon Sep 17 00:00:00 2001 From: Alexey Kuznetsov Date: Fri, 6 Mar 2020 10:15:37 +0300 Subject: [PATCH] show one warning --- .../axet/audiorecorder/activities/RecordingActivity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/github/axet/audiorecorder/activities/RecordingActivity.java b/app/src/main/java/com/github/axet/audiorecorder/activities/RecordingActivity.java index 3ff4ec3..e302cd7 100644 --- a/app/src/main/java/com/github/axet/audiorecorder/activities/RecordingActivity.java +++ b/app/src/main/java/com/github/axet/audiorecorder/activities/RecordingActivity.java @@ -342,7 +342,6 @@ public class RecordingActivity extends AppCompatThemeActivity { View speed; TextView text; View warning; - View slow; RawSamples.Info info; public ProgressEncoding(Context context, RawSamples.Info info) { @@ -405,9 +404,9 @@ public class RecordingActivity extends AppCompatThemeActivity { LayoutInflater inflater = LayoutInflater.from(getContext()); warning = inflater.inflate(R.layout.optimization, view); } - if (diffreal > 0 && diffenc >= diffreal && slow == null && foreground != null && background != null && foreground.getAverageSpeed() / background.getAverageSpeed() > 1 && slow == null) { + if (diffreal > 0 && diffenc >= diffreal && warning == null && foreground != null && background != null && foreground.getAverageSpeed() / background.getAverageSpeed() > 1 && slow == null) { LayoutInflater inflater = LayoutInflater.from(getContext()); - slow = inflater.inflate(R.layout.slow, view); + warning = inflater.inflate(R.layout.slow, view); } pause = 0; resume = 0;