Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
BriarWithLoRa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas
BriarWithLoRa
Commits
1aa33ec9
Verified
Commit
1aa33ec9
authored
8 years ago
by
Torsten Grote
Browse files
Options
Downloads
Patches
Plain Diff
Catch RuntimeException when getting camera parameters
parent
6702df1e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
briar-android/src/main/java/org/briarproject/briar/android/keyagreement/QrCodeDecoder.java
+8
-3
8 additions, 3 deletions
...riarproject/briar/android/keyagreement/QrCodeDecoder.java
with
8 additions
and
3 deletions
briar-android/src/main/java/org/briarproject/briar/android/keyagreement/QrCodeDecoder.java
+
8
−
3
View file @
1aa33ec9
...
@@ -22,6 +22,7 @@ import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
...
@@ -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 {
...
@@ -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 {
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment