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

Commit 62be861e authored by Hermann Czedik-Eysenberg's avatar Hermann Czedik-Eysenberg
Browse files

Make Bluetooth discoverability timeout configurable (also supporting infinite timeout).

This fixes http://code.google.com/p/cyanogenmod/issues/detail?id=2597

Change-Id: Ifa390856b27dfb123e8addfae2bbb721e61e91f8
parent 42b7da86
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -999,9 +999,13 @@ public class BluetoothService extends IBluetooth.Stub {
            mHandler.removeMessages(MESSAGE_DISCOVERABLE_TIMEOUT);
            pairable = true;
            discoverable = true;
            if (duration != 0) {
                Message msg = mHandler.obtainMessage(MESSAGE_DISCOVERABLE_TIMEOUT);
                mHandler.sendMessageDelayed(msg, duration * 1000);
                if (DBG) Log.d(TAG, "BT Discoverable for " + duration + " seconds");
            } else {
                if (DBG) Log.d(TAG, "BT Discoverable infinitely");
            }
            break;
        default:
            Log.w(TAG, "Requested invalid scan mode " + mode);