Projects >> android-frameworks-base-with-remote-control-service >>72cd64b20ed7118a6c0ed12f4924659abb5dcd0d

Chunk
Conflicting content
        mContext.registerReceiver(mBroadcastReceiver, filter);

        IntentFilter filter = new IntentFilter();
        // Fine-grained state broadcasts
        filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
<<<<<<< HEAD
        filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothInputDevice.ACTION_INPUT_DEVICE_STATE_CHANGED);
=======
        filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
>>>>>>> bbb90d134a3f3a8561a6b3315b6944be939b3778
Solution content
        IntentFilter filter = new IntentFilter();
        // Fine-grained state broadcasts
        filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
        filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothInputDevice.ACTION_INPUT_DEVICE_STATE_CHANGED);
        filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);

        mContext.registerReceiver(mBroadcastReceiver, filter);
File
BluetoothDeviceProfileState.java
Developer's decision
Concatenation
Kind of conflict
Method invocation
Chunk
Conflicting content
    static final int TRANSITION_TO_STABLE = 100;


    public static final int HFP = 0;
    public static final int A2DP = 1;
<<<<<<< HEAD
    public static final int HID = 2;
=======
>>>>>>> bbb90d134a3f3a8561a6b3315b6944be939b3778
Solution content
    public static final int HFP = 0;
    public static final int A2DP = 1;
    public static final int HID = 2;

    static final int TRANSITION_TO_STABLE = 100;
File
BluetoothProfileState.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
<<<<<<< HEAD

            if (action.equals(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)) {
                int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);
                if (mProfile == HFP && (newState == BluetoothProfile.STATE_CONNECTED ||
                    newState == BluetoothProfile.STATE_DISCONNECTED)) {
=======
            BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
            if (action.equals(BluetoothHeadset.ACTION_STATE_CHANGED)) {
                int newState = intent.getIntExtra(BluetoothHeadset.EXTRA_STATE, 0);
                if (mProfile == HFP && (newState == BluetoothHeadset.STATE_CONNECTED ||
                    newState == BluetoothHeadset.STATE_DISCONNECTED)) {
>>>>>>> bbb90d134a3f3a8561a6b3315b6944be939b3778
                    sendMessage(TRANSITION_TO_STABLE);
                }
            } else if (action.equals(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED)) {
Solution content
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);

            if (action.equals(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED)) {
                int newState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);
                if (mProfile == HFP && (newState == BluetoothProfile.STATE_CONNECTED ||
                    newState == BluetoothProfile.STATE_DISCONNECTED)) {
                    sendMessage(TRANSITION_TO_STABLE);
                }
            } else if (action.equals(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED)) {
File
BluetoothProfileState.java
Developer's decision
Combination
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
        setInitialState(mStableState);

        IntentFilter filter = new IntentFilter();
<<<<<<< HEAD
        filter.addAction(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothInputDevice.ACTION_INPUT_DEVICE_STATE_CHANGED);
=======
        filter.addAction(BluetoothA2dp.ACTION_SINK_STATE_CHANGED);
        filter.addAction(BluetoothHeadset.ACTION_STATE_CHANGED);
        filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
>>>>>>> bbb90d134a3f3a8561a6b3315b6944be939b3778
        context.registerReceiver(mBroadcastReceiver, filter);
    }
Solution content
        setInitialState(mStableState);

        IntentFilter filter = new IntentFilter();
        filter.addAction(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothInputDevice.ACTION_INPUT_DEVICE_STATE_CHANGED);
        filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
        context.registerReceiver(mBroadcastReceiver, filter);
    }
File
BluetoothProfileState.java
Developer's decision
Combination
Kind of conflict
Method invocation