LG8n: app: MtkInCallService: Adjust gain values in all situations

Signed-off-by: LinkBoi00 <linkdevel@protonmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
This commit is contained in:
LinkBoi00 2022-08-01 01:13:08 +03:00 committed by Shirayuki39
parent 664ce73570
commit df9b347312

View file

@ -22,10 +22,6 @@ public class VolumeChangeReceiver extends BroadcastReceiver {
private void handleVolumeStateChange(Intent intent) { private void handleVolumeStateChange(Intent intent) {
if (intent.getIntExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE, -1) == AudioManager.STREAM_VOICE_CALL) { if (intent.getIntExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE, -1) == AudioManager.STREAM_VOICE_CALL) {
AudioDeviceInfo callDevice = mAudioManager.getCommunicationDevice(); AudioDeviceInfo callDevice = mAudioManager.getCommunicationDevice();
if (callDevice.getInternalType() != AudioDeviceInfo.TYPE_BUILTIN_EARPIECE) {
// Device is not the built in earpiece, we don't need to do anything.
return;
}
// Try to get volumeIndex // Try to get volumeIndex
int volumeIndex = intent.getIntExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, -1); int volumeIndex = intent.getIntExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, -1);