Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Julian Dehm
briar
Commits
7327029f
Unverified
Commit
7327029f
authored
8 years ago
by
akwizgran
Browse files
Options
Downloads
Patches
Plain Diff
Log the QR code payload length.
parent
7c380526
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/org/briarproject/android/keyagreement/ShowQrCodeFragment.java
+9
-5
9 additions, 5 deletions
...briarproject/android/keyagreement/ShowQrCodeFragment.java
with
9 additions
and
5 deletions
briar-android/src/org/briarproject/android/keyagreement/ShowQrCodeFragment.java
+
9
−
5
View file @
7327029f
...
...
@@ -57,6 +57,7 @@ import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
import
static
android
.
view
.
View
.
INVISIBLE
;
import
static
android
.
view
.
View
.
VISIBLE
;
import
static
android
.
widget
.
Toast
.
LENGTH_LONG
;
import
static
java
.
util
.
logging
.
Level
.
INFO
;
import
static
java
.
util
.
logging
.
Level
.
WARNING
;
public
class
ShowQrCodeFragment
extends
BaseEventFragment
...
...
@@ -244,8 +245,10 @@ public class ShowQrCodeFragment extends BaseEventFragment
@UiThread
private
void
qrCodeScanned
(
String
content
)
{
try
{
Payload
remotePayload
=
payloadParser
.
parse
(
Base64
.
decode
(
content
,
0
));
byte
[]
encoded
=
Base64
.
decode
(
content
,
0
);
if
(
LOG
.
isLoggable
(
INFO
))
LOG
.
info
(
"Remote payload is "
+
encoded
.
length
+
" bytes"
);
Payload
remotePayload
=
payloadParser
.
parse
(
encoded
);
cameraView
.
setVisibility
(
INVISIBLE
);
statusView
.
setVisibility
(
VISIBLE
);
status
.
setText
(
R
.
string
.
connecting_to_device
);
...
...
@@ -293,9 +296,10 @@ public class ShowQrCodeFragment extends BaseEventFragment
@Override
protected
Bitmap
doInBackground
(
Void
...
params
)
{
String
input
=
Base64
.
encodeToString
(
payloadEncoder
.
encode
(
payload
),
0
);
byte
[]
encoded
=
payloadEncoder
.
encode
(
payload
);
if
(
LOG
.
isLoggable
(
INFO
))
LOG
.
info
(
"Local payload is "
+
encoded
.
length
+
" bytes"
);
String
input
=
Base64
.
encodeToString
(
encoded
,
0
);
return
QrCodeUtils
.
createQrCode
(
dm
,
input
);
}
...
...
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