1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 02:06:21 +02:00

Start discovery activity automatically when no devices available (#33)

This commit is contained in:
cpfeiffer 2015-05-06 22:59:31 +02:00
parent 0629d6aa5d
commit 0c039b8a46

View File

@ -110,7 +110,13 @@ public class ControlCenter extends Activity {
startIntent.setAction(BluetoothCommunicationService.ACTION_START); startIntent.setAction(BluetoothCommunicationService.ACTION_START);
startService(startIntent); startService(startIntent);
requestDeviceInfo();
if (deviceList.isEmpty()) {
// start discovery when no devices are present
startActivity(new Intent(this, DiscoveryActivity.class));
} else {
requestDeviceInfo();
}
} }
/** /**