From 42b7687cf9afd49aa03c0a82504d37a0713cb9bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=AD?=
Date: Thu, 8 Oct 2015 17:05:17 +0200
Subject: [PATCH] Remove trailing whitespaces from zxing code
---
.../integration/android/IntentIntegrator.java | 30 +++++++++----------
.../integration/android/IntentResult.java | 2 +-
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/F-Droid/src/com/google/zxing/integration/android/IntentIntegrator.java b/F-Droid/src/com/google/zxing/integration/android/IntentIntegrator.java
index 1aa0c6a38..07a63d4a0 100644
--- a/F-Droid/src/com/google/zxing/integration/android/IntentIntegrator.java
+++ b/F-Droid/src/com/google/zxing/integration/android/IntentIntegrator.java
@@ -75,7 +75,7 @@ import java.util.Map;
* user was prompted to download the application. This lets the calling app potentially manage the dialog.
* In particular, ideally, the app dismisses the dialog if it's still active in its {@link Activity#onPause()}
* method.
- *
+ *
* You can use {@link #setTitle(String)} to customize the title of this download prompt dialog (or, use
* {@link #setTitleByID(int)} to set the title by string resource ID.) Likewise, the prompt message, and
* yes/no button labels can be changed.
@@ -83,7 +83,7 @@ import java.util.Map;
* Finally, you can use {@link #addExtra(String, Object)} to add more parameters to the Intent used
* to invoke the scanner. This can be used to set additional options not directly exposed by this
* simplified API.
- *
+ *
* By default, this will only allow applications that are known to respond to this intent correctly
* do so. The apps that are allowed to response can be set with {@link #setTargetApplications(List)}.
* For example, set to {@link #TARGET_BARCODE_SCANNER_ONLY} to only target the Barcode Scanner app itself.
@@ -130,15 +130,15 @@ public class IntentIntegrator {
public static final Collection DATA_MATRIX_TYPES = Collections.singleton("DATA_MATRIX");
public static final Collection ALL_CODE_TYPES = null;
-
+
public static final List TARGET_BARCODE_SCANNER_ONLY = Collections.singletonList(BS_PACKAGE);
public static final List TARGET_ALL_KNOWN = list(
BSPLUS_PACKAGE, // Barcode Scanner+
BSPLUS_PACKAGE + ".simple", // Barcode Scanner+ Simple
- BS_PACKAGE // Barcode Scanner
+ BS_PACKAGE // Barcode Scanner
// What else supports this intent?
);
-
+
private final Activity activity;
private final Fragment fragment;
@@ -176,11 +176,11 @@ public class IntentIntegrator {
buttonNo = DEFAULT_NO;
targetApplications = TARGET_ALL_KNOWN;
}
-
+
public String getTitle() {
return title;
}
-
+
public void setTitle(String title) {
this.title = title;
}
@@ -224,18 +224,18 @@ public class IntentIntegrator {
public void setButtonNoByID(int buttonNoID) {
buttonNo = activity.getString(buttonNoID);
}
-
+
public Collection getTargetApplications() {
return targetApplications;
}
-
+
public final void setTargetApplications(List targetApplications) {
if (targetApplications.isEmpty()) {
throw new IllegalArgumentException("No target applications");
}
this.targetApplications = targetApplications;
}
-
+
public void setSingleTargetApplication(String targetApplication) {
this.targetApplications = Collections.singletonList(targetApplication);
}
@@ -257,7 +257,7 @@ public class IntentIntegrator {
public final AlertDialog initiateScan() {
return initiateScan(ALL_CODE_TYPES, -1);
}
-
+
/**
* Initiates a scan for all known barcode types with the specified camera.
*
@@ -281,7 +281,7 @@ public class IntentIntegrator {
public final AlertDialog initiateScan(Collection desiredBarcodeFormats) {
return initiateScan(desiredBarcodeFormats, -1);
}
-
+
/**
* Initiates a scan, using the specified camera, only for a certain set of barcode types, given as strings corresponding
* to their names in ZXing's {@code BarcodeFormat} class like "UPC_A". You can supply constants
@@ -342,7 +342,7 @@ public class IntentIntegrator {
fragment.startActivityForResult(intent, code);
}
}
-
+
private String findTargetAppPackage(Intent intent) {
PackageManager pm = activity.getPackageManager();
List availableApps = pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
@@ -355,7 +355,7 @@ public class IntentIntegrator {
}
return null;
}
-
+
private static boolean contains(Iterable availableApps, String targetApp) {
for (ResolveInfo availableApp : availableApps) {
String packageName = availableApp.activityInfo.packageName;
@@ -475,7 +475,7 @@ public class IntentIntegrator {
}
return null;
}
-
+
private static List list(String... values) {
return Collections.unmodifiableList(Arrays.asList(values));
}
diff --git a/F-Droid/src/com/google/zxing/integration/android/IntentResult.java b/F-Droid/src/com/google/zxing/integration/android/IntentResult.java
index 0ff095cb2..a7e73eb7d 100644
--- a/F-Droid/src/com/google/zxing/integration/android/IntentResult.java
+++ b/F-Droid/src/com/google/zxing/integration/android/IntentResult.java
@@ -79,7 +79,7 @@ public final class IntentResult {
public String getErrorCorrectionLevel() {
return errorCorrectionLevel;
}
-
+
@Override
public String toString() {
int rawBytesLength = rawBytes == null ? 0 : rawBytes.length;