diff options
| author | Jules Aguillon | 2024-02-10 18:03:09 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-02-10 18:10:49 +0100 |
| commit | f4d88cc0876ec29ff46dbda0159168ebee637afb (patch) | |
| tree | 72c96a25e03f187307c1e738ca4aeb990ce3ba85 /srcs/juloo.keyboard2/Utils.java | |
| parent | d5676d683f031a2d23f4e01e0ada0afd58dc9b89 (diff) | |
| download | unexpected-keyboard-f4d88cc0876ec29ff46dbda0159168ebee637afb.tar.gz unexpected-keyboard-f4d88cc0876ec29ff46dbda0159168ebee637afb.zip | |
Fix various linter warnings
Among others:
- Use `apply` instead of `commit` when saving shared preferences.
- Avoid inlined Api
- Remove unused resources
Diffstat (limited to 'srcs/juloo.keyboard2/Utils.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Utils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/Utils.java b/srcs/juloo.keyboard2/Utils.java index 712c83d..f0f3036 100644 --- a/srcs/juloo.keyboard2/Utils.java +++ b/srcs/juloo.keyboard2/Utils.java @@ -6,6 +6,7 @@ import android.view.Window; import android.view.WindowManager; import java.io.InputStream; import java.io.InputStreamReader; +import java.util.Locale; public final class Utils { @@ -16,7 +17,7 @@ public final class Utils return s; // Make sure not to cut a code point in half int i = s.offsetByCodePoints(0, 1); - return s.substring(0, i).toUpperCase() + s.substring(i); + return s.substring(0, i).toUpperCase(Locale.getDefault()) + s.substring(i); } /** Like [dialog.show()] but properly configure layout params when called |
