diff --git a/src/com/android/bluetooth/btservice/AdapterProperties.java b/src/com/android/bluetooth/btservice/AdapterProperties.java
index 0c00ffd..9b3c20a 100755
--- a/src/com/android/bluetooth/btservice/AdapterProperties.java
+++ b/src/com/android/bluetooth/btservice/AdapterProperties.java
@@ -547,7 +547,7 @@
     }
 
     private void infoLog(String msg) {
-        Log.i(TAG, msg);
+        if (DBG) Log.i(TAG, msg);
     }
 
     private void debugLog(String msg) {
diff --git a/src/com/android/bluetooth/btservice/ProfileService.java b/src/com/android/bluetooth/btservice/ProfileService.java
index 8339418..e3d9196 100644
--- a/src/com/android/bluetooth/btservice/ProfileService.java
+++ b/src/com/android/bluetooth/btservice/ProfileService.java
@@ -77,7 +77,7 @@
                     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 @@
 
     @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 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 @@
         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 @@
 
     private void doStop(Intent intent) {
         if (stop()) {
-            log("stop()");
+            if (DBG) log("stop()");
             notifyProfileServiceStateChanged(BluetoothAdapter.STATE_OFF);
             stopSelf();
         } else {
diff --git a/src/com/android/bluetooth/hid/HidService.java b/src/com/android/bluetooth/hid/HidService.java
index 2e67154..8f2051f 100755
--- a/src/com/android/bluetooth/hid/HidService.java
+++ b/src/com/android/bluetooth/hid/HidService.java
@@ -179,7 +179,7 @@
                     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));
diff --git a/src/com/android/bluetooth/opp/BluetoothOppService.java b/src/com/android/bluetooth/opp/BluetoothOppService.java
index 9020006..421ad2e 100755
--- a/src/com/android/bluetooth/opp/BluetoothOppService.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppService.java
@@ -680,7 +680,7 @@
             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);
