OSDN Git Service

Revert "Terminate PBAP service cleanly during BT off"
authorMatthew Xie <mattx@google.com>
Mon, 10 Sep 2012 21:10:59 +0000 (14:10 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Mon, 10 Sep 2012 21:10:59 +0000 (14:10 -0700)
This reverts commit f5d88a7b8659bb9ce49edc4faea6bf56f2158572

Change-Id: I67a4950831dce7392d63edad6f693abcc69d2ffe

src/com/android/bluetooth/pbap/BluetoothPbapService.java

index 21714c8..80cd8ee 100755 (executable)
@@ -347,14 +347,6 @@ public class BluetoothPbapService extends Service {
                 initSocketOK = false;
             }
             if (!initSocketOK) {
-                // Need to break out of this loop if BT is being turned off.
-                if (mAdapter == null) break;
-                int state = mAdapter.getState();
-                if ((mAdapter.getState() != BluetoothAdapter.STATE_TURNING_ON) &&
-                     (mAdapter.getState() != BluetoothAdapter.STATE_ON)) {
-                    Log.w(TAG, "initServerSocket failed as BT is (being) turned off");
-                    break;
-                }
                 synchronized (this) {
                     try {
                         if (VERBOSE) Log.v(TAG, "wait 300 ms");