forked from mirror/monocles_chat
Adjust call integration sounds.
(cherry picked from commit 56316125822556b515ee786323f37497d26d0b09)
This commit is contained in:
parent
c6d77737f4
commit
90f6aa776a
1 changed files with 8 additions and 13 deletions
|
@ -59,7 +59,7 @@ public class CallIntegration extends Connection {
|
||||||
private static final List<String> BROKEN_MANUFACTURES_UP_TO_11 =
|
private static final List<String> BROKEN_MANUFACTURES_UP_TO_11 =
|
||||||
Arrays.asList("realme", "oppo", "oneplus");
|
Arrays.asList("realme", "oppo", "oneplus");
|
||||||
|
|
||||||
public static final int DEFAULT_TONE_VOLUME = 20;
|
public static final int DEFAULT_TONE_VOLUME = 60;
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
|
||||||
|
@ -126,11 +126,6 @@ public class CallIntegration extends Connection {
|
||||||
this.callback.onCallIntegrationReject();
|
this.callback.onCallIntegrationReject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPlayDtmfTone(char c) {
|
|
||||||
this.callback.applyDtmfTone("" + c);
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
@RequiresApi(api = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
|
||||||
@Override
|
@Override
|
||||||
public void onAvailableCallEndpointsChanged(@NonNull List<CallEndpoint> availableEndpoints) {
|
public void onAvailableCallEndpointsChanged(@NonNull List<CallEndpoint> availableEndpoints) {
|
||||||
|
@ -378,7 +373,9 @@ public class CallIntegration extends Connection {
|
||||||
requireAppRtcAudioManager().stopRingBack();
|
requireAppRtcAudioManager().stopRingBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state == STATE_DISCONNECTED) {
|
if (state == STATE_ACTIVE) {
|
||||||
|
startTone(DEFAULT_TONE_VOLUME, ToneGenerator.TONE_CDMA_ANSWER, 100 );
|
||||||
|
} else if (state == STATE_DISCONNECTED) {
|
||||||
final var audioManager = this.appRTCAudioManager;
|
final var audioManager = this.appRTCAudioManager;
|
||||||
if (audioManager != null) {
|
if (audioManager != null) {
|
||||||
audioManager.executeOnMain(audioManager::stop);
|
audioManager.executeOnMain(audioManager::stop);
|
||||||
|
@ -388,8 +385,8 @@ public class CallIntegration extends Connection {
|
||||||
|
|
||||||
public void success() {
|
public void success() {
|
||||||
Log.d(Config.LOGTAG, "CallIntegration.success()");
|
Log.d(Config.LOGTAG, "CallIntegration.success()");
|
||||||
startTone(DEFAULT_TONE_VOLUME, ToneGenerator.TONE_CDMA_CALLDROP_LITE, 375);
|
startTone(DEFAULT_TONE_VOLUME, ToneGenerator.TONE_CDMA_CONFIRM, 600);
|
||||||
this.destroyWithDelay(new DisconnectCause(DisconnectCause.LOCAL, null), 375);
|
this.destroyWithDelay(new DisconnectCause(DisconnectCause.LOCAL, null), 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void accepted() {
|
public void accepted() {
|
||||||
|
@ -403,8 +400,8 @@ public class CallIntegration extends Connection {
|
||||||
|
|
||||||
public void error() {
|
public void error() {
|
||||||
Log.d(Config.LOGTAG, "CallIntegration.error()");
|
Log.d(Config.LOGTAG, "CallIntegration.error()");
|
||||||
startTone(DEFAULT_TONE_VOLUME, ToneGenerator.TONE_CDMA_CALLDROP_LITE, 375);
|
startTone(DEFAULT_TONE_VOLUME, ToneGenerator.TONE_CDMA_CONFIRM, 600);
|
||||||
this.destroyWithDelay(new DisconnectCause(DisconnectCause.ERROR, null), 375);
|
this.destroyWithDelay(new DisconnectCause(DisconnectCause.ERROR, null), 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void retracted() {
|
public void retracted() {
|
||||||
|
@ -621,7 +618,5 @@ public class CallIntegration extends Connection {
|
||||||
void onCallIntegrationSilence();
|
void onCallIntegrationSilence();
|
||||||
|
|
||||||
void onCallIntegrationMicrophoneEnabled(boolean enabled);
|
void onCallIntegrationMicrophoneEnabled(boolean enabled);
|
||||||
|
|
||||||
boolean applyDtmfTone(final String dtmf);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue