Fix locale bug for string conversions
Use Locale.ROOT to be consistent with the constants. Test: manual test with Turkish locale Bug: 248068481 Change-Id: Ieb5678016e00e3b6d60b9d07bb08ccc5c0623f3d
This commit is contained in:
@@ -23,6 +23,7 @@ import android.hardware.radio.V1_5.AccessNetwork;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Contains access network related constants.
|
||||
@@ -114,7 +115,7 @@ public final class AccessNetworkConstants {
|
||||
|
||||
/** @hide */
|
||||
public static @RadioAccessNetworkType int fromString(@NonNull String str) {
|
||||
switch (str.toUpperCase()) {
|
||||
switch (str.toUpperCase(Locale.ROOT)) {
|
||||
case "UNKNOWN": return UNKNOWN;
|
||||
case "GERAN": return GERAN;
|
||||
case "UTRAN": return UTRAN;
|
||||
|
||||
Reference in New Issue
Block a user