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

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

Merge "Bluetooth: Set SCO volume to 0."

parents 17826c88 74027b34
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import android.os.Message;
import android.os.ParcelUuid;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.PowerManager;
import android.os.UserHandle;
import android.os.PowerManager.WakeLock;
@@ -1753,8 +1754,15 @@ final class HeadsetStateMachine extends StateMachine {
            int volumeValue = intent.getIntExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, 0);
            if (mPhoneState.getSpeakerVolume() != volumeValue) {
                mPhoneState.setSpeakerVolume(volumeValue);
            boolean scoVolume =
                    SystemProperties.getBoolean("bt.pts.certification", false);
                if (!scoVolume) {
                    setVolumeNative(HeadsetHalConstants.VOLUME_TYPE_SPK,
                                        volumeValue, getByteAddress(device));
                } else {
                    setVolumeNative(HeadsetHalConstants.VOLUME_TYPE_SPK,
                                        0, getByteAddress(device));
                }
            }
        }

@@ -2310,8 +2318,15 @@ final class HeadsetStateMachine extends StateMachine {
            int volumeValue = intent.getIntExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, 0);
            if (mPhoneState.getSpeakerVolume() != volumeValue) {
                mPhoneState.setSpeakerVolume(volumeValue);
            boolean scoVolume =
                    SystemProperties.getBoolean("bt.pts.certification", false);
                if (!scoVolume) {
                    setVolumeNative(HeadsetHalConstants.VOLUME_TYPE_SPK,
                                        volumeValue, getByteAddress(device));
                } else {
                    setVolumeNative(HeadsetHalConstants.VOLUME_TYPE_SPK,
                                        0, getByteAddress(device));
                }
            }
        }
    }
+2 −3
Original line number Diff line number Diff line
@@ -217,9 +217,8 @@ public class SapServer extends Thread implements Callback {
        /* For PTS TC_SERVER_DCN_BV_03_I we need to expose the option to send immediate disconnect
         * without first sending a graceful disconnect.
         * To enable this option set
         * bt.sap.pts="true" */
        String pts_enabled = SystemProperties.get("bt.sap.pts");
        Boolean pts_test = Boolean.parseBoolean(pts_enabled);
         * bt.pts.certification="true" */
        Boolean pts_test = SystemProperties.getBoolean("bt.pts.certification", false);

        /* put notification up for the user to be able to disconnect from the client*/
        Intent sapDisconnectIntent = new Intent(SapServer.SAP_DISCONNECT_ACTION);