Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import java.util.Map; * @hide */ public class A2dpService extends ProfileService { private static final boolean DBG = true; private static final boolean DBG = false; private static final String TAG="A2dpService"; private A2dpStateMachine mStateMachine; Loading android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +11 −19 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ import java.util.Set; final class A2dpStateMachine extends StateMachine { private static final String TAG = "A2dpStateMachine"; private static final boolean DBG = true; private static final boolean DBG = false; static final int CONNECT = 1; static final int DISCONNECT = 2; Loading Loading @@ -154,12 +154,10 @@ final class A2dpStateMachine extends StateMachine { @Override public boolean processMessage(Message message) { log("Disconnected process message: " + message.what); if (DBG) { if (mCurrentDevice != null || mTargetDevice != null || mIncomingDevice != null) { log("ERROR: current, target, or mIncomingDevice not null in Disconnected"); Log.e(TAG, "ERROR: current, target, or mIncomingDevice not null in Disconnected"); return NOT_HANDLED; } } boolean retValue = HANDLED; switch(message.what) { Loading Loading @@ -415,10 +413,8 @@ final class A2dpStateMachine extends StateMachine { // The stack is connecting to target device or // there is an incoming connection from the target device at the same time // we already broadcasted the intent, doing nothing here if (DBG) { log("Stack and target device are connecting"); } } else if (mIncomingDevice != null && mIncomingDevice.equals(device)) { Log.e(TAG, "Another connecting event on the incoming device"); } else { Loading Loading @@ -461,12 +457,10 @@ final class A2dpStateMachine extends StateMachine { @Override public boolean processMessage(Message message) { log("Connected process message: " + message.what); if (DBG) { if (mCurrentDevice == null) { log("ERROR: mCurrentDevice is null in Connected"); Log.e(TAG, "ERROR: mCurrentDevice is null in Connected"); return NOT_HANDLED; } } boolean retValue = HANDLED; switch(message.what) { Loading Loading @@ -690,7 +684,7 @@ final class A2dpStateMachine extends StateMachine { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mContext.sendBroadcast(intent, A2dpService.BLUETOOTH_PERM); if (DBG) log("A2DP Playing state : device: " + device + " State:" + prevState + "->" + state); log("A2DP Playing state : device: " + device + " State:" + prevState + "->" + state); } private byte[] getByteAddress(BluetoothDevice device) { Loading @@ -715,10 +709,8 @@ final class A2dpStateMachine extends StateMachine { } private void log(String msg) { if (DBG) { Log.d(TAG, msg); } } private class StackEvent { int type = EVENT_TYPE_NONE; Loading @@ -739,7 +731,7 @@ final class A2dpStateMachine extends StateMachine { intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mContext.sendBroadcast(intent, ProfileService.BLUETOOTH_PERM); if (DBG) log("Connection state " + device + ": " + prevState + "->" + state); log("Connection state " + device + ": " + prevState + "->" + state); mService.notifyProfileConnectionStateChanged(device, BluetoothProfile.A2DP, state, prevState); } Loading android/app/src/com/android/bluetooth/btservice/AdapterApp.java +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ import android.util.Log; public class AdapterApp extends Application { private static final String TAG = "BluetoothAdapterApp"; private static final boolean DBG = true; private static final boolean DBG = false; //For Debugging only private static int sRefCount=0; Loading android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +4 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ import java.util.HashMap; import java.util.ArrayList; class AdapterProperties { private static final boolean DBG = true; private static final boolean DBG = false; private static final String TAG = "BluetoothAdapterProperties"; private static final int BD_ADDR_LEN = 6; // 6 bytes Loading Loading @@ -180,7 +180,7 @@ class AdapterProperties { */ void setState(int mState) { synchronized (mObject) { Log.d(TAG,"Setting state to " + mState); debugLog("Setting state to " + mState); this.mState = mState; } } Loading @@ -190,7 +190,7 @@ class AdapterProperties { */ int getState() { synchronized (mObject) { Log.d(TAG,"State = " + mState); debugLog("State = " + mState); return mState; } } Loading Loading @@ -300,7 +300,7 @@ class AdapterProperties { convertToAdapterState(prevState)); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mService.sendBroadcast(intent, mService.BLUETOOTH_PERM); debugLog("CONNECTION_STATE_CHANGE: " + device + ": " Log.d(TAG, "CONNECTION_STATE_CHANGE: " + device + ": " + prevState + " -> " + state); } } Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ import android.os.ServiceManager; public class AdapterService extends Service { private static final String TAG = "BluetoothAdapterService"; private static final boolean DBG = true; private static final boolean DBG = false; private static final boolean TRACE_REF = true; //For Debugging only private static int sRefCount=0; Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import java.util.Map; * @hide */ public class A2dpService extends ProfileService { private static final boolean DBG = true; private static final boolean DBG = false; private static final String TAG="A2dpService"; private A2dpStateMachine mStateMachine; Loading
android/app/src/com/android/bluetooth/a2dp/A2dpStateMachine.java +11 −19 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ import java.util.Set; final class A2dpStateMachine extends StateMachine { private static final String TAG = "A2dpStateMachine"; private static final boolean DBG = true; private static final boolean DBG = false; static final int CONNECT = 1; static final int DISCONNECT = 2; Loading Loading @@ -154,12 +154,10 @@ final class A2dpStateMachine extends StateMachine { @Override public boolean processMessage(Message message) { log("Disconnected process message: " + message.what); if (DBG) { if (mCurrentDevice != null || mTargetDevice != null || mIncomingDevice != null) { log("ERROR: current, target, or mIncomingDevice not null in Disconnected"); Log.e(TAG, "ERROR: current, target, or mIncomingDevice not null in Disconnected"); return NOT_HANDLED; } } boolean retValue = HANDLED; switch(message.what) { Loading Loading @@ -415,10 +413,8 @@ final class A2dpStateMachine extends StateMachine { // The stack is connecting to target device or // there is an incoming connection from the target device at the same time // we already broadcasted the intent, doing nothing here if (DBG) { log("Stack and target device are connecting"); } } else if (mIncomingDevice != null && mIncomingDevice.equals(device)) { Log.e(TAG, "Another connecting event on the incoming device"); } else { Loading Loading @@ -461,12 +457,10 @@ final class A2dpStateMachine extends StateMachine { @Override public boolean processMessage(Message message) { log("Connected process message: " + message.what); if (DBG) { if (mCurrentDevice == null) { log("ERROR: mCurrentDevice is null in Connected"); Log.e(TAG, "ERROR: mCurrentDevice is null in Connected"); return NOT_HANDLED; } } boolean retValue = HANDLED; switch(message.what) { Loading Loading @@ -690,7 +684,7 @@ final class A2dpStateMachine extends StateMachine { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mContext.sendBroadcast(intent, A2dpService.BLUETOOTH_PERM); if (DBG) log("A2DP Playing state : device: " + device + " State:" + prevState + "->" + state); log("A2DP Playing state : device: " + device + " State:" + prevState + "->" + state); } private byte[] getByteAddress(BluetoothDevice device) { Loading @@ -715,10 +709,8 @@ final class A2dpStateMachine extends StateMachine { } private void log(String msg) { if (DBG) { Log.d(TAG, msg); } } private class StackEvent { int type = EVENT_TYPE_NONE; Loading @@ -739,7 +731,7 @@ final class A2dpStateMachine extends StateMachine { intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mContext.sendBroadcast(intent, ProfileService.BLUETOOTH_PERM); if (DBG) log("Connection state " + device + ": " + prevState + "->" + state); log("Connection state " + device + ": " + prevState + "->" + state); mService.notifyProfileConnectionStateChanged(device, BluetoothProfile.A2DP, state, prevState); } Loading
android/app/src/com/android/bluetooth/btservice/AdapterApp.java +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ import android.util.Log; public class AdapterApp extends Application { private static final String TAG = "BluetoothAdapterApp"; private static final boolean DBG = true; private static final boolean DBG = false; //For Debugging only private static int sRefCount=0; Loading
android/app/src/com/android/bluetooth/btservice/AdapterProperties.java +4 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ import java.util.HashMap; import java.util.ArrayList; class AdapterProperties { private static final boolean DBG = true; private static final boolean DBG = false; private static final String TAG = "BluetoothAdapterProperties"; private static final int BD_ADDR_LEN = 6; // 6 bytes Loading Loading @@ -180,7 +180,7 @@ class AdapterProperties { */ void setState(int mState) { synchronized (mObject) { Log.d(TAG,"Setting state to " + mState); debugLog("Setting state to " + mState); this.mState = mState; } } Loading @@ -190,7 +190,7 @@ class AdapterProperties { */ int getState() { synchronized (mObject) { Log.d(TAG,"State = " + mState); debugLog("State = " + mState); return mState; } } Loading Loading @@ -300,7 +300,7 @@ class AdapterProperties { convertToAdapterState(prevState)); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mService.sendBroadcast(intent, mService.BLUETOOTH_PERM); debugLog("CONNECTION_STATE_CHANGE: " + device + ": " Log.d(TAG, "CONNECTION_STATE_CHANGE: " + device + ": " + prevState + " -> " + state); } } Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ import android.os.ServiceManager; public class AdapterService extends Service { private static final String TAG = "BluetoothAdapterService"; private static final boolean DBG = true; private static final boolean DBG = false; private static final boolean TRACE_REF = true; //For Debugging only private static int sRefCount=0; Loading