Skip to content

Commit 64140a0

Browse files
committed
Fix Music import for Turkish locales.
For non-localized strings like the keywords in SQL statements, we shouldn't use locale-specific case transformations. (Cherry pick of 03f8f84c345e7c861a6de889d434b9d82cf04c8d.) Bug: 4284951 Change-Id: If5b7154f70a7db22837d071d1c57e929729b7d35
1 parent 7944704 commit 64140a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/java/android/database/DatabaseUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import java.io.PrintStream;
4040
import java.text.Collator;
4141
import java.util.HashMap;
42+
import java.util.Locale;
4243
import java.util.Map;
4344

4445
/**
@@ -1318,7 +1319,7 @@ public static int getSqlStatementType(String sql) {
13181319
if (sql.length() < 3) {
13191320
return STATEMENT_OTHER;
13201321
}
1321-
String prefixSql = sql.substring(0, 3).toUpperCase();
1322+
String prefixSql = sql.substring(0, 3).toUpperCase(Locale.US);
13221323
if (prefixSql.equals("SEL")) {
13231324
return STATEMENT_SELECT;
13241325
} else if (prefixSql.equals("INS") ||

0 commit comments

Comments
 (0)