Revert "Only show Bluetooth dialog if Bluetooth is disabled."
This reverts commit 6a546d97a3
.
Looks like discovery only works if we explicitly request Bluetooth.
This commit is contained in:
parent
8688f973e8
commit
879c80e11c
1 changed files with 4 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Reference in a new issue