4646public final class BluetoothHeadset implements BluetoothProfile {
4747 private static final String TAG = "BluetoothHeadset" ;
4848 private static final boolean DBG = true ;
49+ private static final boolean VDBG = false ;
4950
5051 /**
5152 * Intent used to broadcast the change in connection state of the Headset
@@ -226,7 +227,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
226227 public void onBluetoothStateChange (boolean up ) {
227228 if (DBG ) Log .d (TAG , "onBluetoothStateChange: up=" + up );
228229 if (!up ) {
229- if (DBG ) Log .d (TAG ,"Unbinding service..." );
230+ if (VDBG ) Log .d (TAG ,"Unbinding service..." );
230231 synchronized (mConnection ) {
231232 try {
232233 mService = null ;
@@ -239,7 +240,7 @@ public void onBluetoothStateChange(boolean up) {
239240 synchronized (mConnection ) {
240241 try {
241242 if (mService == null ) {
242- if (DBG ) Log .d (TAG ,"Binding service..." );
243+ if (VDBG ) Log .d (TAG ,"Binding service..." );
243244 if (!mContext .bindService (new Intent (IBluetoothHeadset .class .getName ()), mConnection , 0 )) {
244245 Log .e (TAG , "Could not bind to Bluetooth Headset Service" );
245246 }
@@ -281,7 +282,7 @@ public void onBluetoothStateChange(boolean up) {
281282 * are ok.
282283 */
283284 /*package*/ void close () {
284- if (DBG ) log ("close()" );
285+ if (VDBG ) log ("close()" );
285286
286287 IBluetoothManager mgr = mAdapter .getBluetoothManager ();
287288 if (mgr != null ) {
@@ -387,7 +388,7 @@ public boolean disconnect(BluetoothDevice device) {
387388 * {@inheritDoc}
388389 */
389390 public List <BluetoothDevice > getConnectedDevices () {
390- if (DBG ) log ("getConnectedDevices()" );
391+ if (VDBG ) log ("getConnectedDevices()" );
391392 if (mService != null && isEnabled ()) {
392393 try {
393394 return mService .getConnectedDevices ();
@@ -404,7 +405,7 @@ public List<BluetoothDevice> getConnectedDevices() {
404405 * {@inheritDoc}
405406 */
406407 public List <BluetoothDevice > getDevicesMatchingConnectionStates (int [] states ) {
407- if (DBG ) log ("getDevicesMatchingStates()" );
408+ if (VDBG ) log ("getDevicesMatchingStates()" );
408409 if (mService != null && isEnabled ()) {
409410 try {
410411 return mService .getDevicesMatchingConnectionStates (states );
@@ -421,7 +422,7 @@ public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
421422 * {@inheritDoc}
422423 */
423424 public int getConnectionState (BluetoothDevice device ) {
424- if (DBG ) log ("getConnectionState(" + device + ")" );
425+ if (VDBG ) log ("getConnectionState(" + device + ")" );
425426 if (mService != null && isEnabled () &&
426427 isValidDevice (device )) {
427428 try {
@@ -483,7 +484,7 @@ public boolean setPriority(BluetoothDevice device, int priority) {
483484 * @hide
484485 */
485486 public int getPriority (BluetoothDevice device ) {
486- if (DBG ) log ("getPriority(" + device + ")" );
487+ if (VDBG ) log ("getPriority(" + device + ")" );
487488 if (mService != null && isEnabled () &&
488489 isValidDevice (device )) {
489490 try {
@@ -566,7 +567,7 @@ public boolean stopVoiceRecognition(BluetoothDevice device) {
566567 * false otherwise or on error
567568 */
568569 public boolean isAudioConnected (BluetoothDevice device ) {
569- if (DBG ) log ("isAudioConnected()" );
570+ if (VDBG ) log ("isAudioConnected()" );
570571 if (mService != null && isEnabled () &&
571572 isValidDevice (device )) {
572573 try {
@@ -594,7 +595,7 @@ public boolean isAudioConnected(BluetoothDevice device) {
594595 * @hide
595596 */
596597 public int getBatteryUsageHint (BluetoothDevice device ) {
597- if (DBG ) log ("getBatteryUsageHint()" );
598+ if (VDBG ) log ("getBatteryUsageHint()" );
598599 if (mService != null && isEnabled () &&
599600 isValidDevice (device )) {
600601 try {
@@ -661,7 +662,7 @@ public boolean rejectIncomingConnect(BluetoothDevice device) {
661662 * @hide
662663 */
663664 public int getAudioState (BluetoothDevice device ) {
664- if (DBG ) log ("getAudioState" );
665+ if (VDBG ) log ("getAudioState" );
665666 if (mService != null && !isDisabled ()) {
666667 try {
667668 return mService .getAudioState (device );
@@ -683,7 +684,7 @@ public int getAudioState(BluetoothDevice device) {
683684 * @hide
684685 */
685686 public boolean isAudioOn () {
686- if (DBG ) log ("isAudioOn()" );
687+ if (VDBG ) log ("isAudioOn()" );
687688 if (mService != null && isEnabled ()) {
688689 try {
689690 return mService .isAudioOn ();
0 commit comments