mirror of https://github.com/m2049r/xmrwallet.git
don't try to generate 0-size qrcodes (#267)
This commit is contained in:
parent
425246beb1
commit
d18999e731
|
@ -335,6 +335,7 @@ public class ReceiveFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bitmap generate(String text, int width, int height) {
|
public Bitmap generate(String text, int width, int height) {
|
||||||
|
if ((width <= 0) || (height <= 0)) return null;
|
||||||
Map<EncodeHintType, Object> hints = new HashMap<>();
|
Map<EncodeHintType, Object> hints = new HashMap<>();
|
||||||
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
|
||||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M);
|
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M);
|
||||||
|
|
Loading…
Reference in New Issue