Projects >> platform_frameworks_base >>d7e5947c62e55aef973b5a31354a343fe3ee55b1

Chunk
Conflicting content
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
<<<<<<< HEAD
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
=======
import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
>>>>>>> 323d8ef30a7dea00f524338f119af4ddbd38db3c
import android.os.ParcelUuid;
import android.os.RemoteException;
import android.os.ServiceManager;
Solution content
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.content.Context;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.ParcelUuid;
import android.os.RemoteException;
import android.os.ServiceManager;
File
BluetoothAdapter.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
                return false;
            }
            mAdvertisingGattCallback.stopAdvertising();
<<<<<<< HEAD
=======
            mAdvertisingGattCallback = null;
>>>>>>> 323d8ef30a7dea00f524338f119af4ddbd38db3c
            return true;
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
Solution content
                return false;
            }
            mAdvertisingGattCallback.stopAdvertising();
            return true;
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
File
BluetoothAdapter.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
                    try {
                        IBluetoothGatt iGatt = adapter.getBluetoothManager().getBluetoothGatt();
                        iGatt.stopAdvertising();
<<<<<<< HEAD
=======
                        Log.d(TAG, "unregistering client " + mLeHandle);
                        iGatt.unregisterClient(mLeHandle);
>>>>>>> 323d8ef30a7dea00f524338f119af4ddbd38db3c
                    } catch (RemoteException e) {
                        Log.e(TAG, "Failed to stop advertising" + e);
                    }
Solution content
                    try {
                        IBluetoothGatt iGatt = adapter.getBluetoothManager().getBluetoothGatt();
                        iGatt.stopAdvertising();
                    } catch (RemoteException e) {
                        Log.e(TAG, "Failed to stop advertising" + e);
                    }
File
BluetoothAdapter.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
            if (advertiseState == STATE_ADVERTISE_STARTED) {
                mAdvertiseCallback.onAdvertiseStart(status);
            } else {
<<<<<<< HEAD
                synchronized (this) {
                    if (status == ADVERTISE_CALLBACK_SUCCESS) {
                        BluetoothAdapter adapter = mBluetoothAdapter.get();
                        if (adapter != null) {
                            try {
                                IBluetoothGatt iGatt =
                                        adapter.getBluetoothManager().getBluetoothGatt();
                                Log.d(TAG, "unregistering client " + mLeHandle);
                                iGatt.unregisterClient(mLeHandle);
                                // Reset advertise app handle.
                                mLeHandle = -1;
                                adapter.mAdvertisingGattCallback = null;
                            } catch (RemoteException e) {
                                Log.e(TAG, "Failed to unregister client" + e);
                            }
                        } else {
                            Log.e(TAG, "cannot unregister client, BluetoothAdapter is null");
                        }
                    }
                }
=======
>>>>>>> 323d8ef30a7dea00f524338f119af4ddbd38db3c
                mAdvertiseCallback.onAdvertiseStop(status);
            }
        }
Solution content
            if (advertiseState == STATE_ADVERTISE_STARTED) {
                mAdvertiseCallback.onAdvertiseStart(status);
            } else {
                synchronized (this) {
                    if (status == ADVERTISE_CALLBACK_SUCCESS) {
                        BluetoothAdapter adapter = mBluetoothAdapter.get();
                        if (adapter != null) {
                            try {
                                IBluetoothGatt iGatt =
                                        adapter.getBluetoothManager().getBluetoothGatt();
                                Log.d(TAG, "unregistering client " + mLeHandle);
                                iGatt.unregisterClient(mLeHandle);
                                // Reset advertise app handle.
                                mLeHandle = -1;
                                adapter.mAdvertisingGattCallback = null;
                            } catch (RemoteException e) {
                                Log.e(TAG, "Failed to unregister client" + e);
                            }
                        } else {
                            Log.e(TAG, "cannot unregister client, BluetoothAdapter is null");
                        }
                    }
                }
                mAdvertiseCallback.onAdvertiseStop(status);
            }
        }
File
BluetoothAdapter.java
Developer's decision
Version 1
Kind of conflict
Synchronized statement