diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-11-23 11:01:58 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-11-23 11:01:58 +0100 |
commit | 20d3a41b52b8c00a5e803eee4659527d22950b30 (patch) | |
tree | 9a60d1ac14cf2b83751bd3ede4b94d5af4213c4e /src/main/java/eu/siacs/conversations/services | |
parent | 839ef8e14b576e546a13942d72139248873f7fac (diff) |
explictly scan for aztec and qr codes only
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/BarcodeProvider.java | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/BarcodeProvider.java b/src/main/java/eu/siacs/conversations/services/BarcodeProvider.java index ccaa65c9..08ceb169 100644 --- a/src/main/java/eu/siacs/conversations/services/BarcodeProvider.java +++ b/src/main/java/eu/siacs/conversations/services/BarcodeProvider.java @@ -185,7 +185,7 @@ public class BarcodeProvider extends ContentProvider implements ServiceConnectio for (int y = 0; y < height; y++) { final int offset = y * width; for (int x = 0; x < width; x++) { - pixels[offset + x] = result.get(x, y) ? Color.BLACK : Color.TRANSPARENT; + pixels[offset + x] = result.get(x, y) ? Color.BLACK : Color.WHITE; } } final Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); @@ -195,32 +195,4 @@ public class BarcodeProvider extends ContentProvider implements ServiceConnectio return null; } } - - static class TransferThread extends Thread { - InputStream in; - OutputStream out; - - TransferThread(InputStream in, OutputStream out) { - this.in = in; - this.out = out; - } - - @Override - public void run() { - byte[] buf = new byte[1024]; - int len; - - try { - while ((len = in.read(buf)) >= 0) { - out.write(buf, 0, len); - } - - in.close(); - out.flush(); - out.close(); - } catch (IOException e) { - Log.e(Config.LOGTAG, "Exception transferring file", e); - } - } - } } |