Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ android {
dependencies {
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.qiniu:happy-dns:0.2.7'
// compile 'com.android.support:appcompat-v7:21.0.3'
compile fileTree(include: ['*.jar'], dir: 'libs')
}

Expand Down
3 changes: 2 additions & 1 deletion library/src/main/java/com/qiniu/android/http/UserAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.qiniu.android.common.Constants;
import com.qiniu.android.utils.StringUtils;

import java.nio.charset.Charset;
import java.util.Locale;
import java.util.Random;

Expand Down Expand Up @@ -72,7 +73,7 @@ private static String deviceName(String manufacturer, String model) {
public String getUa(String part) {
String _part = ("" + part).trim();
_part = _part.substring(0, Math.min(16, _part.length()));
return ua + "; " + _part + ")";
return new String((ua + "; " + _part + ")").getBytes(Charset.forName("ISO-8859-1")));
}

}