From 879c80e11c256db941f48d779b6cf49411ec21ae Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 27 Feb 2015 12:40:27 +0100 Subject: [PATCH] Revert "Only show Bluetooth dialog if Bluetooth is disabled." This reverts commit 6a546d97a361ee9e7c1d6dc1a120e53e05d1642f. Looks like discovery only works if we explicitly request Bluetooth. --- .../com/nutomic/ensichat/activities/MainActivity.scala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/scala/com/nutomic/ensichat/activities/MainActivity.scala b/app/src/main/scala/com/nutomic/ensichat/activities/MainActivity.scala index 33ba1b2..d33b4cc 100644 --- a/app/src/main/scala/com/nutomic/ensichat/activities/MainActivity.scala +++ b/app/src/main/scala/com/nutomic/ensichat/activities/MainActivity.scala @@ -35,11 +35,10 @@ class MainActivity extends EnsiChatActivity { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) - if (BluetoothAdapter.getDefaultAdapter.isEnabled) { - val intent: Intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE) - intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0) - startActivityForResult(intent, RequestSetDiscoverable) - } + val intent: Intent = new + Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE) + intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0) + startActivityForResult(intent, RequestSetDiscoverable) val fm = getFragmentManager if (savedInstanceState != null) {