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

Commit 4a2623f8 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9195661 from 67f51aca to tm-qpr2-release

Change-Id: I02e77a495bc86fb0d22b2de338809af446388f5f
parents c9930f55 67f51aca
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5104,6 +5104,7 @@ public class AdapterService extends Service {
    private static final String GATT_ROBUST_CACHING_CLIENT_FLAG = "INIT_gatt_robust_caching_client";
    private static final String GATT_ROBUST_CACHING_SERVER_FLAG = "INIT_gatt_robust_caching_server";
    private static final String IRK_ROTATION_FLAG = "INIT_irk_rotation";
    private static final String PASS_PHY_UPDATE_CALLBACK_FLAG = "INIT_pass_phy_update_callback";

    /**
     * Logging flags logic (only applies to DEBUG and VERBOSE levels):
@@ -5167,6 +5168,10 @@ public class AdapterService extends Service {
        if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, IRK_ROTATION_FLAG, false)) {
            initFlags.add(String.format("%s=%s", IRK_ROTATION_FLAG, "true"));
        }
        if (DeviceConfig.getBoolean(
                DeviceConfig.NAMESPACE_BLUETOOTH, PASS_PHY_UPDATE_CALLBACK_FLAG, true)) {
            initFlags.add(String.format("%s=%s", PASS_PHY_UPDATE_CALLBACK_FLAG, "true"));
        }
        if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH,
                LOGGING_DEBUG_ENABLED_FOR_ALL_FLAG, false)) {
            initFlags.add(String.format("%s=%s", LOGGING_DEBUG_ENABLED_FOR_ALL_FLAG, "true"));
+10 −0
Original line number Diff line number Diff line
@@ -326,9 +326,19 @@ final class BondStateMachine extends StateMachine {
            boolean result;
            // If we have some data
            if (remoteP192Data != null || remoteP256Data != null) {
                BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_BOND_STATE_CHANGED,
                      mAdapterService.obfuscateAddress(dev), transport, dev.getType(),
                      BluetoothDevice.BOND_BONDING,
                      BluetoothProtoEnums.BOND_SUB_STATE_LOCAL_START_PAIRING_OOB,
                      BluetoothProtoEnums.UNBOND_REASON_UNKNOWN);
                result = mAdapterService.createBondOutOfBandNative(addr, transport,
                    remoteP192Data, remoteP256Data);
            } else {
                BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_BOND_STATE_CHANGED,
                      mAdapterService.obfuscateAddress(dev), transport, dev.getType(),
                      BluetoothDevice.BOND_BONDING,
                      BluetoothProtoEnums.BOND_SUB_STATE_LOCAL_START_PAIRING,
                      BluetoothProtoEnums.UNBOND_REASON_UNKNOWN);
                result = mAdapterService.createBondNative(addr, transport);
            }
            BluetoothStatsLog.write(BluetoothStatsLog.BLUETOOTH_DEVICE_NAME_REPORTED,
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ public class BluetoothOppBatch {
     */

    /** register a listener for the batch change */
    public void registerListern(BluetoothOppBatchListener listener) {
    public void registerListener(BluetoothOppBatchListener listener) {
        mListener = listener;
    }

+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch
        mBatch = batch;
        mSession = session;

        mBatch.registerListern(this);
        mBatch.registerListener(this);
        mAdapter = BluetoothAdapter.getDefaultAdapter();

    }
+26 −3
Original line number Diff line number Diff line
@@ -654,9 +654,21 @@ public class VolumeControlService extends ProfileService {
        Integer groupVolume = mGroupVolumeCache.getOrDefault(groupId,
                IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME);
        if (groupVolume != IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME) {
            // Correct the volume level only if device was already reported as connected.
            boolean can_change_volume = false;
            synchronized (mStateMachines) {
                VolumeControlStateMachine sm = mStateMachines.get(device);
                if (sm != null) {
                    can_change_volume =
                            (sm.getConnectionState() == BluetoothProfile.STATE_CONNECTED);
                }
            }
            if (can_change_volume) {
                Log.i(TAG, "Setting value:" + groupVolume + " to " + device);
                mVolumeControlNativeInterface.setVolume(device, groupVolume);
            }
        }
    }

    void handleVolumeControlChanged(BluetoothDevice device, int groupId,
                                    int volume, boolean mute, boolean isAutonomous) {
@@ -696,8 +708,19 @@ public class VolumeControlService extends ProfileService {

            if (device != null && groupVolume
                            != IBluetoothVolumeControl.VOLUME_CONTROL_UNKNOWN_VOLUME) {
                // Correct the volume level only if device was already reported as connected.
                boolean can_change_volume = false;
                synchronized (mStateMachines) {
                    VolumeControlStateMachine sm = mStateMachines.get(device);
                    if (sm != null) {
                        can_change_volume =
                                (sm.getConnectionState() == BluetoothProfile.STATE_CONNECTED);
                    }
                }
                if (can_change_volume) {
                    Log.i(TAG, "Setting value:" + groupVolume + " to " + device);
                    mVolumeControlNativeInterface.setVolume(device, groupVolume);
                }
            } else {
                Log.e(TAG, "Volume changed did not succeed. Volume: " + volume
                                + " expected volume: " + groupVolume);
Loading