1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 03:11:30 +00:00

Update zxing-android-embedded and small related fixes (#1642)

This commit is contained in:
Simon Frei 2021-04-19 16:20:20 +02:00 committed by GitHub
parent 2f83612774
commit 517c5ca73d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 2 deletions

View file

@ -13,7 +13,7 @@ dependencies {
implementation 'com.annimon:stream:1.2.2' implementation 'com.annimon:stream:1.2.2'
implementation 'com.android.volley:volley:1.2.0' implementation 'com.android.volley:volley:1.2.0'
implementation ('com.journeyapps:zxing-android-embedded:3.6.0') { transitive = false } implementation ('com.journeyapps:zxing-android-embedded:4.1.0') { transitive = false }
implementation 'com.google.zxing:core:3.3.0' implementation 'com.google.zxing:core:3.3.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

View file

@ -26,6 +26,8 @@
<!-- CAMERA is required for the QR Code Scanner --> <!-- CAMERA is required for the QR Code Scanner -->
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
<uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
<application <application
android:allowBackup="false" android:allowBackup="false"
android:fullBackupContent="false" android:fullBackupContent="false"

View file

@ -395,6 +395,8 @@ public class DeviceActivity extends SyncthingActivity implements View.OnClickLis
*/ */
@Override @Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) { public void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
if (requestCode == QR_SCAN_REQUEST_CODE) { if (requestCode == QR_SCAN_REQUEST_CODE) {
if (resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) {
String scanResult = intent.getStringExtra(QRScannerActivity.QR_RESULT_ARG); String scanResult = intent.getStringExtra(QRScannerActivity.QR_RESULT_ARG);

View file

@ -514,6 +514,8 @@ public class FolderActivity extends SyncthingActivity
@Override @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) { public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == Activity.RESULT_OK && requestCode == CHOOSE_FOLDER_REQUEST) { if (resultCode == Activity.RESULT_OK && requestCode == CHOOSE_FOLDER_REQUEST) {
// This result case only occurs on API level >= Build.VERSION_CODES.LOLLIPOP (21) // This result case only occurs on API level >= Build.VERSION_CODES.LOLLIPOP (21)
mFolderUri = data.getData(); mFolderUri = data.getData();

View file

@ -34,7 +34,6 @@ public class QRScannerActivity extends ThemedAppCompatActivity implements Barcod
private final int RC_HANDLE_CAMERA_PERM = 888; private final int RC_HANDLE_CAMERA_PERM = 888;
private DecoratedBarcodeView barcodeView; private DecoratedBarcodeView barcodeView;
private TextView cancleButton;
// region === Activity Lifecycle === // region === Activity Lifecycle ===
@Override @Override