mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-21 16:34:23 +01:00
#8 fixed again
This commit is contained in:
@@ -278,7 +278,7 @@ public abstract class BleProfileActivity extends AppCompatActivity implements Bl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
mDeviceConnected = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ public abstract class BleProfileExpandableListActivity extends ExpandableListAct
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
mDeviceConnected = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -424,7 +424,7 @@ public abstract class BleProfileService extends Service implements BleManagerCal
|
||||
|
||||
// Note 2: if BleManager#shouldAutoConnect() for this device returned true, this callback will be
|
||||
// invoked ONLY when user requested disconnection (using Disconnect button). If the device
|
||||
// disconnects due to a link loss, the onLinklossOccurred(BluetoothDevice) method will be called instead.
|
||||
// disconnects due to a link loss, the onLinkLossOccurred(BluetoothDevice) method will be called instead.
|
||||
|
||||
final Intent broadcast = new Intent(BROADCAST_CONNECTION_STATE);
|
||||
broadcast.putExtra(EXTRA_DEVICE, mBluetoothDevice);
|
||||
@@ -442,7 +442,7 @@ public abstract class BleProfileService extends Service implements BleManagerCal
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
final Intent broadcast = new Intent(BROADCAST_CONNECTION_STATE);
|
||||
broadcast.putExtra(EXTRA_DEVICE, mBluetoothDevice);
|
||||
broadcast.putExtra(EXTRA_CONNECTION_STATE, STATE_LINK_LOSS);
|
||||
|
||||
@@ -112,7 +112,7 @@ public abstract class BleProfileServiceReadyActivity<E extends BleProfileService
|
||||
break;
|
||||
}
|
||||
case BleProfileService.STATE_LINK_LOSS: {
|
||||
onLinklossOccurred(bluetoothDevice);
|
||||
onLinkLossOccurred(bluetoothDevice);
|
||||
break;
|
||||
}
|
||||
case BleProfileService.STATE_CONNECTING: {
|
||||
@@ -521,7 +521,7 @@ public abstract class BleProfileServiceReadyActivity<E extends BleProfileService
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
// empty default implementation
|
||||
}
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ public abstract class BleMulticonnectProfileService extends Service implements B
|
||||
public void onDeviceDisconnected(final BluetoothDevice device) {
|
||||
// Note: if BleManager#shouldAutoConnect() for this device returned true, this callback will be
|
||||
// invoked ONLY when user requested disconnection (using Disconnect button). If the device
|
||||
// disconnects due to a link loss, the onLinklossOccurred(BluetoothDevice) method will be called instead.
|
||||
// disconnects due to a link loss, the onLinkLossOccurred(BluetoothDevice) method will be called instead.
|
||||
|
||||
// We no longer want to keep the device in the service
|
||||
mManagedDevices.remove(device);
|
||||
@@ -455,7 +455,7 @@ public abstract class BleMulticonnectProfileService extends Service implements B
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
final Intent broadcast = new Intent(BROADCAST_CONNECTION_STATE);
|
||||
broadcast.putExtra(EXTRA_DEVICE, device);
|
||||
broadcast.putExtra(EXTRA_CONNECTION_STATE, STATE_LINK_LOSS);
|
||||
|
||||
@@ -99,7 +99,7 @@ public abstract class BleMulticonnectProfileServiceReadyActivity<E extends BleMu
|
||||
break;
|
||||
}
|
||||
case BleMulticonnectProfileService.STATE_LINK_LOSS: {
|
||||
onLinklossOccurred(bluetoothDevice);
|
||||
onLinkLossOccurred(bluetoothDevice);
|
||||
break;
|
||||
}
|
||||
case BleMulticonnectProfileService.STATE_CONNECTING: {
|
||||
@@ -415,7 +415,7 @@ public abstract class BleMulticonnectProfileServiceReadyActivity<E extends BleMu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
// empty default implementation
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public class ProximityActivity extends BleMulticonnectProfileServiceReadyActivit
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
if (mAdapter != null)
|
||||
mAdapter.onDeviceStateChanged(device);
|
||||
|
||||
|
||||
@@ -274,10 +274,10 @@ public class ProximityService extends BleMulticonnectProfileService implements P
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
mServerManager.cancelConnection(device);
|
||||
stopAlarm(device);
|
||||
super.onLinklossOccurred(device);
|
||||
super.onLinkLossOccurred(device);
|
||||
|
||||
if (!mBound) {
|
||||
createBackgroundNotification();
|
||||
|
||||
@@ -156,8 +156,8 @@ public class UARTService extends BleProfileService implements UARTManagerCallbac
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinklossOccurred(final BluetoothDevice device) {
|
||||
super.onLinklossOccurred(device);
|
||||
public void onLinkLossOccurred(final BluetoothDevice device) {
|
||||
super.onLinkLossOccurred(device);
|
||||
sendMessageToWearables(Constants.UART.DEVICE_LINKLOSS, notNull(getDeviceName()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user