Skip to content

armgit / haven

Public Imported from GitHub
0

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors

tune the mic threshold configure display a bit

n8fr8ea48f2cc2721
diff --git a/src/main/java/info/guardianproject/phoneypot/ui/MicrophoneConfigureActivity.java b/src/main/java/info/guardianproject/phoneypot/ui/MicrophoneConfigureActivity.java
index f003c6e..e4e2f0a 100644
--- a/src/main/java/info/guardianproject/phoneypot/ui/MicrophoneConfigureActivity.java
+++ b/src/main/java/info/guardianproject/phoneypot/ui/MicrophoneConfigureActivity.java
@@ -250,11 +250,13 @@ public class MicrophoneConfigureActivity extends AppCompatActivity implements Mi
mNumberTrigger.invalidate();
}
- int perc = (int)((averageDB/140d)*100d);
+ int perc = (int)((averageDB/160d)*100d);
mWaveAmpList.addFirst(new Integer((int)perc));
+
if (mWaveAmpList.size() > mWaveform.width / mWaveform.barGap + 2) {
mWaveAmpList.removeLast();
}
+
mWaveform.refresh();
mTextLevel.setText(getString(R.string.current_noise_base) + ' ' + ((int)averageDB)+"db");