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

Commit d82d7dac authored by Matthew Xie's avatar Matthew Xie Committed by Android (Google) Code Review
Browse files

Merge "Turn off dbg messages, be prepared for production build" into jb-mr1-dev

parents 2c3d70d7 f1e76c59
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+11 −19
Original line number Diff line number Diff line
@@ -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;
@@ -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) {
@@ -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 {
@@ -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) {
@@ -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) {
@@ -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;
@@ -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);
        }

+1 −1
Original line number Diff line number Diff line
@@ -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;

+4 −4
Original line number Diff line number Diff line
@@ -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
@@ -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;
        }
    }
@@ -190,7 +190,7 @@ class AdapterProperties {
     */
    int getState() {
        synchronized (mObject) {
            Log.d(TAG,"State = " + mState);
            debugLog("State = " + mState);
            return mState;
        }
    }
@@ -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);
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -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