Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public static synchronized JSONObject createRequestCommonPropsJSONObject(Context
}

try {
commonProps.put(USER_LANG_KEY, ctx.getResources().getConfiguration().locale.toString());
// Locale can be transiently null on some Samsung devices during a locale change.
Locale locale = ctx.getResources().getConfiguration().locale;
if (locale != null) {
commonProps.put(USER_LANG_KEY, locale.toString());
}
} catch (JSONException e) {
Log.e(TracksClient.LOGTAG, "Cannot add the device language property to request commons.");
}
Expand Down
Loading