Disable mic/camera on inactive group thread

Fixes #4653
Fixes #3334
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-11-22 10:44:57 -08:00
parent a4f7b78fd0
commit 2790128e9c
2 changed files with 9 additions and 1 deletions

View File

@ -730,8 +730,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void initializeEnabledCheck() {
boolean enabled = !(isPushGroupConversation() && !isActiveGroup());
composeText.setEnabled(enabled);
inputPanel.setEnabled(enabled);
sendButton.setEnabled(enabled);
attachButton.setEnabled(enabled);
}
private void initializeDraftFromDatabase() {

View File

@ -153,6 +153,13 @@ public class InputPanel extends LinearLayout
this.microphoneRecorderView.cancelAction();
}
public void setEnabled(boolean enabled) {
composeText.setEnabled(enabled);
emojiToggle.setEnabled(enabled);
quickAudioToggle.setEnabled(enabled);
quickCameraToggle.setEnabled(enabled);
}
private long onRecordHideEvent(float x) {
ListenableFuture<Void> future = slideToCancel.hide(x);
long elapsedTime = recordTime.hide();