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

Commit d7f5e198 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 56c021fd: Merge "Clean up debug messages" into jb-mr1.1-dev

* commit '56c021fd':
  Clean up debug messages
parents b1766e7c 56c021fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -547,7 +547,7 @@ class AdapterProperties {
    }

    private void infoLog(String msg) {
        Log.i(TAG, msg);
        if (DBG) Log.i(TAG, msg);
    }

    private void debugLog(String msg) {
+10 −10
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ public abstract class ProfileService extends Service {
                    refCount = refCount+1;
                }
                sReferenceCount.put(mName, refCount);
                log("REFCOUNT: CREATED. INSTANCE_COUNT=" +refCount);
                if (DBG) log("REFCOUNT: CREATED. INSTANCE_COUNT=" +refCount);
            }
        }
    }
@@ -99,14 +99,14 @@ public abstract class ProfileService extends Service {

    @Override
    public void onCreate() {
        log("onCreate");
        if (DBG) log("onCreate");
        super.onCreate();
        mAdapter = BluetoothAdapter.getDefaultAdapter();
        mBinder = initBinder();
    }

    public int onStartCommand(Intent intent, int flags, int startId) {
        log("onStartCommand()");
        if (DBG) log("onStartCommand()");
        if (mStartError || mAdapter == null) {
            Log.w(mName, "Stopping profile service: device does not have BT");
            doStop(intent);
@@ -138,22 +138,22 @@ public abstract class ProfileService extends Service {
    }

    public IBinder onBind(Intent intent) {
        log("onBind");
        if (DBG) log("onBind");
        return mBinder;
    }

    public boolean onUnbind(Intent intent) {
        log("onUnbind");
        if (DBG) log("onUnbind");
        return super.onUnbind(intent);
    }

    @Override
    public void onDestroy() {
        log("Destroying service.");
        if (DBG) log("Destroying service.");
        if (mCleaningUp) {
            log("Cleanup already started... Skipping cleanup()...");
            if (DBG) log("Cleanup already started... Skipping cleanup()...");
        } else {
            log("cleanup()");
            if (DBG) log("cleanup()");
            mCleaningUp = true;
            cleanup();
            if (mBinder != null) {
@@ -170,7 +170,7 @@ public abstract class ProfileService extends Service {
        if (mAdapter == null) {
            Log.e(mName, "Error starting profile. BluetoothAdapter is null");
        } else {
            log("start()");
            if (DBG) log("start()");
            mStartError = !start();
            if (!mStartError) {
                notifyProfileServiceStateChanged(BluetoothAdapter.STATE_ON);
@@ -182,7 +182,7 @@ public abstract class ProfileService extends Service {

    private void doStop(Intent intent) {
        if (stop()) {
            log("stop()");
            if (DBG) log("stop()");
            notifyProfileServiceStateChanged(BluetoothAdapter.STATE_OFF);
            stopSelf();
        } else {
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ public class HidService extends ProfileService {
                    if(halState == CONN_STATE_CONNECTED &&
                       prevState == BluetoothInputDevice.STATE_DISCONNECTED &&
                       (!okToConnect(device))) {
                        Log.d(TAG,"Incoming HID connection rejected");
                        if (DBG) Log.d(TAG,"Incoming HID connection rejected");
                        disconnectHidNative(Utils.getByteAddress(device));
                    } else {
                        broadcastConnectionState(device, convertHalState(halState));
+1 −1
Original line number Diff line number Diff line
@@ -680,7 +680,7 @@ public class BluetoothOppService extends Service {
            info.mUri = Uri.parse(stringFromCursor(info.mUri.toString(), cursor,
                    BluetoothShare.URI));
        } else {
            Log.d(TAG, "updateShare() called for ID " + info.mId + " with null URI");
            Log.w(TAG, "updateShare() called for ID " + info.mId + " with null URI");
        }
        info.mHint = stringFromCursor(info.mHint, cursor, BluetoothShare.FILENAME_HINT);
        info.mFilename = stringFromCursor(info.mFilename, cursor, BluetoothShare._DATA);