mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-10 14:28:34 +00:00
Ensure feature flag is string before cast.
This commit is contained in:
parent
250402e9b9
commit
d625740ca4
@ -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.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user