Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ class CallActivity : CallBaseActivity() {

if (permissionUtil!!.isMicrophonePermissionGranted()) {
CallForegroundService.start(applicationContext, conversationName, intent.extras)
if (!microphoneOn) {
if (!microphoneOn && !appPreferences.callMicrophoneMuted) {
onMicrophoneClick()
}
}
Expand Down Expand Up @@ -1265,6 +1265,7 @@ class CallActivity : CallBaseActivity() {
)
}
toggleMedia(microphoneOn, false)
appPreferences.callMicrophoneMuted = !microphoneOn
} else {
binding!!.microphoneButton.setImageResource(R.drawable.ic_mic_white_24px)
pulseAnimation!!.start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ public interface AppPreferences {

void removeScreenLock();

boolean getCallMicrophoneMuted();

void setCallMicrophoneMuted(boolean value);

boolean getIsKeyboardIncognito();

void setIncognitoKeyboard(boolean value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,18 @@ class AppPreferencesImpl(val context: Context) : AppPreferences {
setScreenLock(false)
}

override fun getCallMicrophoneMuted(): Boolean =
runBlocking {
async { readBoolean(CALL_MICROPHONE_MUTED).first() }
}.getCompleted()

override fun setCallMicrophoneMuted(value: Boolean) =
runBlocking<Unit> {
async {
writeBoolean(CALL_MICROPHONE_MUTED, value)
}
}

override fun getIsKeyboardIncognito(): Boolean {
val read = runBlocking { async { readBoolean(INCOGNITO_KEYBOARD).first() } }.getCompleted()
return read
Expand Down Expand Up @@ -672,6 +684,7 @@ class AppPreferencesImpl(val context: Context) : AppPreferences {
const val NOTIFY_UPGRADE_V3 = "notification_channels_upgrade_to_v3"
const val SCREEN_SECURITY = "screen_security"
const val SCREEN_LOCK = "screen_lock"
const val CALL_MICROPHONE_MUTED = "call_microphone_muted"
const val INCOGNITO_KEYBOARD = "incognito_keyboard"
const val SHOW_ECOSYSTEM = "SHOW_ECOSYSTEM"
const val PHONE_BOOK_INTEGRATION = "phone_book_integration"
Expand Down
Loading