Skip to content

Commit

Permalink
Another hacky attempt to make user agent closer to perfection
Browse files Browse the repository at this point in the history
  • Loading branch information
yeriomin committed Jul 24, 2018
1 parent caf62da commit bdd0b09
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ public String getAuthUserAgentString() {
}

public String getUserAgentString() {
return "Android-Finsky/" + URLEncoder.encode(gsfVersionProvider.getVendingVersionString(true)) + " ("
return "Android-Finsky/" + URLEncoder.encode(gsfVersionProvider.getVendingVersionString(true)).replace("+", "%20") + " ("
+ "api=3"
+ ",versionCode=" + gsfVersionProvider.getVendingVersionCode(true)
+ ",sdk=" + Build.VERSION.SDK_INT
+ ",device=" + Build.DEVICE
+ ",hardware=" + (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO ? Build.HARDWARE : Build.PRODUCT)
+ ",product=" + Build.PRODUCT
+ ",platformVersionRelease=" + Build.VERSION.RELEASE
+ ",model=" + URLEncoder.encode(Build.MODEL)
+ ",model=" + URLEncoder.encode(Build.MODEL).replace("+", "%20")
+ ",buildId=" + Build.ID
+ ",isWideScreen=" + (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? "1" : "0")
+ ",supportedAbis=" + TextUtils.join(";", getPlatforms())
Expand Down

0 comments on commit bdd0b09

Please sign in to comment.