mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +01:00
Fixed a receiver leak, added a FIXME.
This commit is contained in:
@@ -58,6 +58,7 @@ implements InvitationListener {
|
|||||||
private AuthorId localAuthorId = null;
|
private AuthorId localAuthorId = null;
|
||||||
private String networkName = null;
|
private String networkName = null;
|
||||||
private boolean bluetoothEnabled = false;
|
private boolean bluetoothEnabled = false;
|
||||||
|
private BluetoothWifiStateReceiver receiver = null;
|
||||||
private int localInvitationCode = -1, remoteInvitationCode = -1;
|
private int localInvitationCode = -1, remoteInvitationCode = -1;
|
||||||
private int localConfirmationCode = -1, remoteConfirmationCode = -1;
|
private int localConfirmationCode = -1, remoteConfirmationCode = -1;
|
||||||
private boolean connectionFailed = false;
|
private boolean connectionFailed = false;
|
||||||
@@ -145,7 +146,7 @@ implements InvitationListener {
|
|||||||
filter.addAction(ACTION_STATE_CHANGED);
|
filter.addAction(ACTION_STATE_CHANGED);
|
||||||
filter.addAction(ACTION_SCAN_MODE_CHANGED);
|
filter.addAction(ACTION_SCAN_MODE_CHANGED);
|
||||||
filter.addAction(NETWORK_STATE_CHANGED_ACTION);
|
filter.addAction(NETWORK_STATE_CHANGED_ACTION);
|
||||||
BluetoothWifiStateReceiver receiver = new BluetoothWifiStateReceiver();
|
receiver = new BluetoothWifiStateReceiver();
|
||||||
registerReceiver(receiver, filter);
|
registerReceiver(receiver, filter);
|
||||||
|
|
||||||
// Get the current Bluetooth and WiFi state
|
// Get the current Bluetooth and WiFi state
|
||||||
@@ -188,6 +189,7 @@ implements InvitationListener {
|
|||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
if(task != null) task.removeListener(this);
|
if(task != null) task.removeListener(this);
|
||||||
|
unregisterReceiver(receiver);
|
||||||
unbindService(serviceConnection);
|
unbindService(serviceConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ implements OnEditorActionListener, OnClickListener {
|
|||||||
continueButton.setEnabled(getText().length() == 6);
|
continueButton.setEnabled(getText().length() == 6);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
codeEntry.setId(1);
|
codeEntry.setId(1); // FIXME: State is not saved and restored
|
||||||
codeEntry.setTextSize(26);
|
codeEntry.setTextSize(26);
|
||||||
codeEntry.setOnEditorActionListener(this);
|
codeEntry.setOnEditorActionListener(this);
|
||||||
codeEntry.setMinEms(5);
|
codeEntry.setMinEms(5);
|
||||||
|
|||||||
Reference in New Issue
Block a user