0
0
mirror of https://github.com/markusfisch/BinaryEye.git synced 2024-09-20 03:52:16 +02:00

Use logical operator instead of bitwise

This commit is contained in:
Markus Fisch 2022-06-16 13:17:34 +02:00
parent 072eec5306
commit a2bcd67568
2 changed files with 3 additions and 3 deletions

View File

@ -460,7 +460,7 @@ private fun generateDpTrackingLink(raw: ByteArray, format: String): String? {
//check for Deutsche Post Matrixcode stamp
var isStamp = false
var rawData = raw
if (format.equals("DATA_MATRIX") and raw.toString(Charsets.ISO_8859_1).startsWith("DEA5")) {
if (format.equals("DATA_MATRIX") && raw.toString(Charsets.ISO_8859_1).startsWith("DEA5")) {
if (raw.size == 47) {
isStamp = true
} else if (raw.size > 47) {

View File

@ -162,8 +162,8 @@ class DetectorView : View {
MotionEvent.ACTION_MOVE -> {
if (handleGrabbed) {
handlePos.set(x, y)
handleActive =
handleActive or (distSq(handlePos, touchDown) > minMoveThresholdSq)
handleActive = handleActive ||
distSq(handlePos, touchDown) > minMoveThresholdSq
if (handleActive) {
updateClipRect()
invalidate()