[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] fix lint DefaultLocale: ensure that ASCII chars are lowercased
commit 37a88fd5e92bc6fb976638a7475e9d248f42e973
Author: Hans-Christoph Steiner <hans@xxxxxxx>
Date: Wed Dec 18 16:17:52 2019 +0100
fix lint DefaultLocale: ensure that ASCII chars are lowercased
---
app/src/main/java/org/torproject/android/OrbotMainActivity.java | 2 +-
.../torproject/android/ui/hiddenservices/ClientCookiesActivity.java | 3 ++-
.../torproject/android/ui/hiddenservices/HiddenServicesActivity.java | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/OrbotMainActivity.java b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
index 00ef9721..1ee58106 100644
--- a/app/src/main/java/org/torproject/android/OrbotMainActivity.java
+++ b/app/src/main/java/org/torproject/android/OrbotMainActivity.java
@@ -703,7 +703,7 @@ public class OrbotMainActivity extends AppCompatActivity implements OrbotConstan
if (urlString != null) {
- if (urlString.toLowerCase().startsWith("bridge://")) {
+ if (urlString.toLowerCase(Locale.ENGLISH).startsWith("bridge://")) {
String newBridgeValue = urlString.substring(9); //remove the bridge protocol piece
try {
newBridgeValue = URLDecoder.decode(newBridgeValue, "UTF-8"); //decode the value here
diff --git a/app/src/main/java/org/torproject/android/ui/hiddenservices/ClientCookiesActivity.java b/app/src/main/java/org/torproject/android/ui/hiddenservices/ClientCookiesActivity.java
index d221bd21..4c43d897 100644
--- a/app/src/main/java/org/torproject/android/ui/hiddenservices/ClientCookiesActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/hiddenservices/ClientCookiesActivity.java
@@ -32,6 +32,7 @@ import org.torproject.android.ui.hiddenservices.dialogs.CookieActionsDialog;
import org.torproject.android.ui.hiddenservices.providers.CookieContentProvider;
import java.io.File;
+import java.util.Locale;
public class ClientCookiesActivity extends AppCompatActivity {
public static final String BUNDLE_KEY_ID = "_id",
@@ -115,7 +116,7 @@ public class ClientCookiesActivity extends AppCompatActivity {
File backupDir = DiskUtils.getOrCreateLegacyBackupDir();
try {
- File[] files = backupDir.listFiles((dir, name) -> name.toLowerCase().endsWith(".json"));
+ File[] files = backupDir.listFiles((dir, name) -> name.toLowerCase(Locale.ENGLISH).endsWith(".json"));
if (files != null) {
if (files.length == 0) {
Toast.makeText(this, R.string.create_a_backup_first, Toast.LENGTH_LONG).show();
diff --git a/app/src/main/java/org/torproject/android/ui/hiddenservices/HiddenServicesActivity.java b/app/src/main/java/org/torproject/android/ui/hiddenservices/HiddenServicesActivity.java
index 2bf3eeda..62b3613b 100644
--- a/app/src/main/java/org/torproject/android/ui/hiddenservices/HiddenServicesActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/hiddenservices/HiddenServicesActivity.java
@@ -31,6 +31,7 @@ import org.torproject.android.ui.hiddenservices.permissions.PermissionManager;
import org.torproject.android.ui.hiddenservices.providers.HSContentProvider;
import java.io.File;
+import java.util.Locale;
public class HiddenServicesActivity extends AppCompatActivity {
public static final String BUNDLE_KEY_ID = "_id",
@@ -111,7 +112,7 @@ public class HiddenServicesActivity extends AppCompatActivity {
private void doRestoreLegacy() { // API 16, 17, 18
File backupDir = DiskUtils.getOrCreateLegacyBackupDir();
- File[] files = backupDir.listFiles((dir, name) -> name.toLowerCase().endsWith(".zip"));
+ File[] files = backupDir.listFiles((dir, name) -> name.toLowerCase(Locale.ENGLISH).endsWith(".zip"));
if (files != null) {
if (files.length == 0) {
Toast.makeText(this, R.string.create_a_backup_first, Toast.LENGTH_LONG).show();
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits