[Modify]修改Accept-Language字段
This commit is contained in:
@@ -98,6 +98,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@@ -396,6 +397,7 @@ public class XChatApplication extends BaseApp {
|
||||
httpParams.put("deviceId", DeviceUuidFactory.getDeviceId(context));
|
||||
httpParams.put("androidId", MD5Utils.getMD5String(Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID)));
|
||||
httpParams.put("channel", AppMetaDataUtil.getChannelID());
|
||||
httpParams.put("Accept-Language", Locale.getDefault().getLanguage());
|
||||
RxNet.init(context)
|
||||
.debug(BuildConfig.DEBUG)
|
||||
.setBaseUrl(url)
|
||||
|
@@ -474,7 +474,7 @@ public class JSInterface {
|
||||
jsonObject.put("appVersionCode", String.valueOf(AppUtils.getVersionCode(context)));
|
||||
jsonObject.put("deviceId", DeviceUtil.getDeviceId(context));
|
||||
jsonObject.put("channel", AppMetaDataUtil.getChannelID());
|
||||
jsonObject.put("accept-language", Locale.getDefault().getLanguage());
|
||||
jsonObject.put("Accept-Language", Locale.getDefault().getLanguage());
|
||||
Log.e(TAG, "getDeviceInfo: " + jsonObject);
|
||||
return jsonObject.toJSONString();
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ public class SimpleJSInterface {
|
||||
jsonObject.put("appVersion", VersionUtil.getLocalName(context));
|
||||
jsonObject.put("appVersionCode", String.valueOf(AppUtils.getVersionCode(context)));
|
||||
jsonObject.put("channel", getChannel());
|
||||
jsonObject.put("accept-language", Locale.getDefault().getLanguage());
|
||||
jsonObject.put("Accept-Language", Locale.getDefault().getLanguage());
|
||||
Log.e(TAG, "getDeviceInfo: " + jsonObject);
|
||||
return jsonObject.toJSONString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user