Skip to content

Commit 81be44f

Browse files
author
hardbacknutter
committed
report 'cancelled' not as an error
1 parent 65d4dc6 commit 81be44f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

example/src/main/java/com/hardbacknutter/tinyzxingwrapper/example/MainActivity.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ public class MainActivity
4242
vb.lastScan.setText(R.string.err_inactivity);
4343
break;
4444
default:
45-
vb.lastScan.setText(
46-
getString(R.string.err_unknown, reason));
45+
vb.lastScan.setText(getString(R.string.err_unknown, reason));
4746
break;
4847
}
4948
} else {
50-
vb.lastScan.setText(
51-
getString(R.string.err_unknown, "???"));
49+
vb.lastScan.setText(R.string.err_cancelled);
5250
}
5351
}
5452
});

example/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<string name="btn_scan_inverted">Scan Inverted</string>
99
<string name="btn_front_camera">Use front Camera</string>
1010

11+
<string name="err_cancelled">Cancelled</string>
1112
<string name="err_permission">Cancelled due to missing camera permission</string>
1213
<string name="err_hard_timeout">Cancelled due to hard timeout</string>
1314
<string name="err_inactivity">Cancelled due to inactivity</string>

0 commit comments

Comments
 (0)