diff --git a/software/android/app/src/main/java/com/rookiedev/hexapod/DeviceListActivity.kt b/software/android/app/src/main/java/com/rookiedev/hexapod/DeviceListActivity.kt index 87babe8..5cd6ba8 100644 --- a/software/android/app/src/main/java/com/rookiedev/hexapod/DeviceListActivity.kt +++ b/software/android/app/src/main/java/com/rookiedev/hexapod/DeviceListActivity.kt @@ -2,6 +2,7 @@ package com.rookiedev.hexapod import android.annotation.SuppressLint import android.app.Activity +import android.bluetooth.BluetoothAdapter import android.bluetooth.BluetoothDevice import android.bluetooth.BluetoothManager import android.content.Context @@ -57,11 +58,10 @@ class DeviceAdapter(mContext: Context?, private val devices: ArrayList = bluetoothManager!!.adapter.bondedDevices - + val pairedDevices: Set = bluetoothAdapter!!.bondedDevices val deviceList: ArrayList = ArrayList(pairedDevices) - - val bluetoothAdapter = DeviceAdapter(this, deviceList) + val deviceAdapter = DeviceAdapter(this, deviceList) // Find and set up the ListView for paired devices - val pairedListView: ListView = findViewById(R.id.paired_devices) - pairedListView.adapter = bluetoothAdapter + val pairedListView: ListView = findViewById(R.id.paired_devices) + pairedListView.adapter = deviceAdapter pairedListView.onItemClickListener = mDeviceClickListener val cancelPicker = findViewById(R.id.cancel_picker) @@ -119,11 +116,6 @@ class DeviceListActivity : Activity() { companion object { - /** - * Tag for Log - */ - private const val TAG = "DeviceListActivity" - /** * Return Intent extra */