Skip to content

Commit

Permalink
Merge pull request #62 from longbai/fix-multi-call
Browse files Browse the repository at this point in the history
add client id
  • Loading branch information
longbai committed Jul 22, 2014
2 parents cc08f46 + 1e5a712 commit 4ebbbba
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/com/qiniu/conf/Conf.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
package com.qiniu.conf;

import java.util.Random;

public class Conf {
public static final String VERSION = "6.0.5";
public static String UP_HOST = "http://upload.qiniu.com";
public static String UP_HOST2 = "http://up.qiniu.com";

private static String id = genId();

public static String getUserAgent() {
return "QiniuAndroid/" + VERSION + " (" + android.os.Build.VERSION.RELEASE + "; " + android.os.Build.MODEL+ ")";
return "QiniuAndroid/" + VERSION + " (" + android.os.Build.VERSION.RELEASE + "; "
+ android.os.Build.MODEL+ "; " + id +")";
}

private static String genId(){
Random r = new Random();
int rnum = r.nextInt(999);
return System.currentTimeMillis() + "" + rnum;
}
}

0 comments on commit 4ebbbba

Please sign in to comment.