Ensure feature flag is string before cast.

fork-5.53.8
Alan Evans 2020-09-02 12:08:20 -03:00 zatwierdzone przez Cody Henthorne
rodzic 250402e9b9
commit d625740ca4
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -442,10 +442,10 @@ public final class FeatureFlags {
return forced;
}
String remote = (String) REMOTE_VALUES.get(key);
if (remote != null) {
Object remote = REMOTE_VALUES.get(key);
if (remote instanceof String) {
try {
return Integer.parseInt(remote);
return Integer.parseInt((String) remote);
} catch (NumberFormatException e) {
Log.w(TAG, "Expected an int for key '" + key + "', but got something else! Falling back to the default.");
}