Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use root locale when converting string case #33028

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void onReceive(Context context, Intent intent) {
final String bundleFile = subclassTag + "ReactNativeDevBundle.js";
mJSBundleDownloadedFile = new File(applicationContext.getFilesDir(), bundleFile);

final String splitBundlesDir = subclassTag.toLowerCase() + "_dev_js_split_bundles";
final String splitBundlesDir = subclassTag.toLowerCase(Locale.ROOT) + "_dev_js_split_bundles";
mJSSplitBundlesDir = mApplicationContext.getDir(splitBundlesDir, Context.MODE_PRIVATE);

mDefaultNativeModuleCallExceptionHandler = new DefaultNativeModuleCallExceptionHandler();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import okhttp3.Call;
Expand Down Expand Up @@ -376,7 +377,7 @@ public void onProgress(
}

RequestBody requestBody;
if (data == null || method.toLowerCase().equals("get") || method.toLowerCase().equals("head")) {
if (data == null || method.toLowerCase(Locale.ROOT).equals("get") || method.toLowerCase(Locale.ROOT).equals("head")) {
requestBody = RequestBodyUtil.getEmptyBody(method);
} else if (handler != null) {
requestBody = handler.toRequestBody(data, contentType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.net.Uri;
import androidx.annotation.Nullable;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import javax.annotation.concurrent.ThreadSafe;

Expand Down Expand Up @@ -47,7 +48,7 @@ public int getResourceDrawableId(Context context, @Nullable String name) {
if (name == null || name.isEmpty()) {
return 0;
}
name = name.toLowerCase().replace("-", "_");
name = name.toLowerCase(Locale.ROOT).replace("-", "_");

// name could be a resource id.
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Map;

/** Manages instances of TextInput. */
Expand Down Expand Up @@ -569,7 +570,7 @@ public void setCursorColor(ReactEditText view, @Nullable Integer color) {
}

private static boolean shouldHideCursorForEmailTextInput() {
String manufacturer = Build.MANUFACTURER.toLowerCase();
String manufacturer = Build.MANUFACTURER.toLowerCase(Locale.ROOT);
return (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q && manufacturer.contains("xiaomi"));
}

Expand Down