mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-02 23:25:10 +00:00
Removed unused var. Fixed comments. Fixed typo.
This commit is contained in:
@@ -31,11 +31,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
|||||||
public abstract class BaseLinkProvider {
|
public abstract class BaseLinkProvider {
|
||||||
|
|
||||||
private final CopyOnWriteArrayList<ConnectionReceiver> connectionReceivers = new CopyOnWriteArrayList<>();
|
private final CopyOnWriteArrayList<ConnectionReceiver> connectionReceivers = new CopyOnWriteArrayList<>();
|
||||||
protected BasePairingHandler pairingHandler;
|
|
||||||
|
|
||||||
public BasePairingHandler getPairingHandler() {
|
|
||||||
return pairingHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface ConnectionReceiver {
|
public interface ConnectionReceiver {
|
||||||
void onConnectionReceived(NetworkPackage identityPackage, BaseLink link);
|
void onConnectionReceived(NetworkPackage identityPackage, BaseLink link);
|
||||||
|
@@ -98,18 +98,16 @@ public class LanPairingHandler extends BasePairingHandler {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/**
|
// If device is already paired, accept pairing silently
|
||||||
* If device is already paired, accept pairing silently
|
|
||||||
*/
|
|
||||||
if (mDevice.isPaired()) {
|
if (mDevice.isPaired()) {
|
||||||
acceptPairing();
|
acceptPairing();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Pairing notifications are still managed by device as there is no other way to
|
||||||
* Pairing notifications are still managed by device as there is no other way to know about notificationId to cancel notification when PairActivity is started
|
// know about notificationId to cancel notification when PairActivity is started
|
||||||
* Even putting notificationId in intent does not work because PairActivity can be started from MainActivity too, so then notificationId cannot be set
|
// Even putting notificationId in intent does not work because PairActivity can be
|
||||||
*/
|
// started from MainActivity too, so then notificationId cannot be set
|
||||||
hidePairingNotification();
|
hidePairingNotification();
|
||||||
mDevice.displayPairingNotification();
|
mDevice.displayPairingNotification();
|
||||||
|
|
||||||
|
@@ -203,7 +203,7 @@ public class MaterialActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
//TODO: Make it accept two parameters, a constant with the type of screen and the device id in
|
//TODO: Make it accept two parameters, a constant with the type of screen and the device id in
|
||||||
//case the screen is for a device, or even three parameters and the third one be the plugin id?
|
//case the screen is for a device, or even three parameters and the third one be the plugin id?
|
||||||
//This way we can keep adding more options with null plugin id (eg: about)
|
//This way we can keep adding more options with null device id (eg: about, help...)
|
||||||
public void onDeviceSelected(String deviceId, boolean stack) {
|
public void onDeviceSelected(String deviceId, boolean stack) {
|
||||||
|
|
||||||
mCurrentDevice = deviceId;
|
mCurrentDevice = deviceId;
|
||||||
|
Reference in New Issue
Block a user