mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Compare commits
5 Commits
beta-0.16.
...
beta-0.16.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aafddcd0f0 | ||
|
|
69bfb72171 | ||
|
|
1aa33ec9b2 | ||
|
|
6702df1e22 | ||
|
|
0ee6197d7f |
@@ -78,8 +78,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 22
|
targetSdkVersion 22
|
||||||
versionCode 1607
|
versionCode 1608
|
||||||
versionName "0.16.7"
|
versionName "0.16.8"
|
||||||
applicationId "org.briarproject.briar.beta"
|
applicationId "org.briarproject.briar.beta"
|
||||||
resValue "string", "app_package", "org.briarproject.briar.beta"
|
resValue "string", "app_package", "org.briarproject.briar.beta"
|
||||||
buildConfigField "String", "GitHash", "\"${getGitHash()}\""
|
buildConfigField "String", "GitHash", "\"${getGitHash()}\""
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import static java.util.logging.Level.INFO;
|
import static java.util.logging.Level.INFO;
|
||||||
|
import static java.util.logging.Level.WARNING;
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@MethodsNotNullByDefault
|
@MethodsNotNullByDefault
|
||||||
@@ -60,8 +61,12 @@ class QrCodeDecoder implements PreviewConsumer, PreviewCallback {
|
|||||||
@Override
|
@Override
|
||||||
public void onPreviewFrame(byte[] data, Camera camera) {
|
public void onPreviewFrame(byte[] data, Camera camera) {
|
||||||
if (camera == this.camera) {
|
if (camera == this.camera) {
|
||||||
Size size = camera.getParameters().getPreviewSize();
|
try {
|
||||||
new DecoderTask(data, size.width, size.height).execute();
|
Size size = camera.getParameters().getPreviewSize();
|
||||||
|
new DecoderTask(data, size.width, size.height).execute();
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
LOG.log(WARNING, "Error getting camera parameters.", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +75,7 @@ class QrCodeDecoder implements PreviewConsumer, PreviewCallback {
|
|||||||
private final byte[] data;
|
private final byte[] data;
|
||||||
private final int width, height;
|
private final int width, height;
|
||||||
|
|
||||||
DecoderTask(byte[] data, int width, int height) {
|
private DecoderTask(byte[] data, int width, int height) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.width = width;
|
this.width = width;
|
||||||
this.height = height;
|
this.height = height;
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ public class ShowQrCodeFragment extends BaseEventFragment
|
|||||||
statusView.setVisibility(VISIBLE);
|
statusView.setVisibility(VISIBLE);
|
||||||
status.setText(R.string.connecting_to_device);
|
status.setText(R.string.connecting_to_device);
|
||||||
task.connectAndRunProtocol(remotePayload);
|
task.connectAndRunProtocol(remotePayload);
|
||||||
} catch (IOException e) {
|
} catch (IOException | IllegalArgumentException e) {
|
||||||
// TODO show failure
|
// TODO show failure
|
||||||
Toast.makeText(getActivity(), R.string.qr_code_invalid,
|
Toast.makeText(getActivity(), R.string.qr_code_invalid,
|
||||||
LENGTH_LONG).show();
|
LENGTH_LONG).show();
|
||||||
|
|||||||
Reference in New Issue
Block a user