mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-15 16:55:03 +01:00
Clearify PTT (=push to talk)
So that my future self and other valued developrs don't must also research that the variable 'isPTTActive' is renamed to 'isPushToTalkActive'. Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
c554535bae
commit
4c0aa6a235
@ -258,7 +258,7 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
private Handler cameraSwitchHandler = new Handler();
|
private Handler cameraSwitchHandler = new Handler();
|
||||||
|
|
||||||
// push to talk
|
// push to talk
|
||||||
private boolean isPTTActive = false;
|
private boolean isPushToTalkActive = false;
|
||||||
private PulseAnimation pulseAnimation;
|
private PulseAnimation pulseAnimation;
|
||||||
|
|
||||||
private String baseUrl;
|
private String baseUrl;
|
||||||
@ -401,7 +401,7 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
callControlHandler.removeCallbacksAndMessages(null);
|
callControlHandler.removeCallbacksAndMessages(null);
|
||||||
callInfosHandler.removeCallbacksAndMessages(null);
|
callInfosHandler.removeCallbacksAndMessages(null);
|
||||||
cameraSwitchHandler.removeCallbacksAndMessages(null);
|
cameraSwitchHandler.removeCallbacksAndMessages(null);
|
||||||
isPTTActive = true;
|
isPushToTalkActive = true;
|
||||||
binding.callControls.setVisibility(View.VISIBLE);
|
binding.callControls.setVisibility(View.VISIBLE);
|
||||||
if (!isVoiceOnlyCall) {
|
if (!isVoiceOnlyCall) {
|
||||||
binding.switchSelfVideoButton.setVisibility(View.VISIBLE);
|
binding.switchSelfVideoButton.setVisibility(View.VISIBLE);
|
||||||
@ -952,7 +952,7 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
appPreferences.setPushToTalkIntroShown(true);
|
appPreferences.setPushToTalkIntroShown(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isPTTActive) {
|
if (!isPushToTalkActive) {
|
||||||
microphoneOn = !microphoneOn;
|
microphoneOn = !microphoneOn;
|
||||||
|
|
||||||
if (microphoneOn) {
|
if (microphoneOn) {
|
||||||
@ -1107,7 +1107,7 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
if (spotlightView != null && spotlightView.getVisibility() != View.GONE) {
|
if (spotlightView != null && spotlightView.getVisibility() != View.GONE) {
|
||||||
spotlightView.setVisibility(View.GONE);
|
spotlightView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
} else if (!isPTTActive) {
|
} else if (!isPushToTalkActive) {
|
||||||
float alpha;
|
float alpha;
|
||||||
long duration;
|
long duration;
|
||||||
|
|
||||||
@ -1156,7 +1156,7 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
callControlHandler.postDelayed(new Runnable() {
|
callControlHandler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!isPTTActive) {
|
if (!isPushToTalkActive) {
|
||||||
animateCallControls(false, 0);
|
animateCallControls(false, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1183,7 +1183,7 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
callInfosHandler.postDelayed(new Runnable() {
|
callInfosHandler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!isPTTActive) {
|
if (!isPushToTalkActive) {
|
||||||
animateCallControls(false, 0);
|
animateCallControls(false, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2523,7 +2523,7 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
binding.callInfosLinearLayout.setVisibility(View.GONE);
|
binding.callInfosLinearLayout.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isPTTActive) {
|
if (!isPushToTalkActive) {
|
||||||
animateCallControls(false, 5000);
|
animateCallControls(false, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2642,8 +2642,8 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
v.onTouchEvent(event);
|
v.onTouchEvent(event);
|
||||||
if (event.getAction() == MotionEvent.ACTION_UP && isPTTActive) {
|
if (event.getAction() == MotionEvent.ACTION_UP && isPushToTalkActive) {
|
||||||
isPTTActive = false;
|
isPushToTalkActive = false;
|
||||||
binding.microphoneButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_off_white_24px);
|
binding.microphoneButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_off_white_24px);
|
||||||
pulseAnimation.stop();
|
pulseAnimation.stop();
|
||||||
toggleMedia(false, false);
|
toggleMedia(false, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user