Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc369ccc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "audio: Volume can't adjust during HFP call when screen is off."

parents 02f22862 dc13d5e2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -3959,6 +3959,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        final boolean down = event.getAction() == KeyEvent.ACTION_DOWN;
        final boolean canceled = event.isCanceled();
        final int keyCode = event.getKeyCode();
        AudioManager audioManager = (AudioManager) mContext.getSystemService(
                Context.AUDIO_SERVICE);

        if (SystemProperties.getInt("sys.quickboot.enable", 0) == 1) {

@@ -4092,7 +4094,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                                    && (result & ACTION_PASS_TO_USER) == 0) {
                                // If we are in call but we decided not to pass the key to
                                // the application, handle the volume change here.
                                if(audioManager.isBluetoothScoOn()) {
                                    handleVolumeKey(AudioManager.STREAM_BLUETOOTH_SCO, keyCode);
                                } else {
                                    handleVolumeKey(AudioManager.STREAM_VOICE_CALL, keyCode);
                                }
                                break;
                            }
                        } catch (RemoteException ex) {