mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Use correct request code when retrying Bluetooth connection.
This commit is contained in:
@@ -3,6 +3,7 @@ package org.briarproject.android.invitation;
|
|||||||
import static android.bluetooth.BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE;
|
import static android.bluetooth.BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE;
|
||||||
import static android.bluetooth.BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION;
|
import static android.bluetooth.BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION;
|
||||||
import static android.view.Gravity.CENTER;
|
import static android.view.Gravity.CENTER;
|
||||||
|
import static org.briarproject.android.invitation.AddContactActivity.REQUEST_BLUETOOTH;
|
||||||
import static org.briarproject.android.util.CommonLayoutParams.WRAP_WRAP;
|
import static org.briarproject.android.util.CommonLayoutParams.WRAP_WRAP;
|
||||||
|
|
||||||
import org.briarproject.R;
|
import org.briarproject.R;
|
||||||
@@ -57,6 +58,6 @@ class CodesDoNotMatchView extends AddContactView implements OnClickListener {
|
|||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
Intent i = new Intent(ACTION_REQUEST_DISCOVERABLE);
|
Intent i = new Intent(ACTION_REQUEST_DISCOVERABLE);
|
||||||
i.putExtra(EXTRA_DISCOVERABLE_DURATION, 120);
|
i.putExtra(EXTRA_DISCOVERABLE_DURATION, 120);
|
||||||
container.startActivityForResult(i, 0);
|
container.startActivityForResult(i, REQUEST_BLUETOOTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package org.briarproject.android.invitation;
|
|||||||
import static android.bluetooth.BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE;
|
import static android.bluetooth.BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE;
|
||||||
import static android.bluetooth.BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION;
|
import static android.bluetooth.BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION;
|
||||||
import static android.view.Gravity.CENTER;
|
import static android.view.Gravity.CENTER;
|
||||||
|
import static org.briarproject.android.invitation.AddContactActivity.REQUEST_BLUETOOTH;
|
||||||
import static org.briarproject.android.util.CommonLayoutParams.WRAP_WRAP;
|
import static org.briarproject.android.util.CommonLayoutParams.WRAP_WRAP;
|
||||||
|
|
||||||
import org.briarproject.R;
|
import org.briarproject.R;
|
||||||
@@ -59,6 +60,6 @@ class ConnectionFailedView extends AddContactView implements OnClickListener {
|
|||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
Intent i = new Intent(ACTION_REQUEST_DISCOVERABLE);
|
Intent i = new Intent(ACTION_REQUEST_DISCOVERABLE);
|
||||||
i.putExtra(EXTRA_DISCOVERABLE_DURATION, 120);
|
i.putExtra(EXTRA_DISCOVERABLE_DURATION, 120);
|
||||||
container.startActivityForResult(i, 0);
|
container.startActivityForResult(i, REQUEST_BLUETOOTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user