Brion VIBBER has submitted this change and it was merged. Change subject: Fix UA to provide phone/tablet info ......................................................................
Fix UA to provide phone/tablet info Also change OS name to let UAParser parse it. Change-Id: I3ac919861270a08abc9cd995ddc4790886ca41a6 --- A wikipedia/res/values-sw600dp/device_prop.xml A wikipedia/res/values/device_prop.xml M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java 3 files changed, 13 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Looks good to me, approved diff --git a/wikipedia/res/values-sw600dp/device_prop.xml b/wikipedia/res/values-sw600dp/device_prop.xml new file mode 100644 index 0000000..42e158b --- /dev/null +++ b/wikipedia/res/values-sw600dp/device_prop.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="device_type">Tablet</string> +</resources> \ No newline at end of file diff --git a/wikipedia/res/values/device_prop.xml b/wikipedia/res/values/device_prop.xml new file mode 100644 index 0000000..22485b8 --- /dev/null +++ b/wikipedia/res/values/device_prop.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="device_type">Phone</string> +</resources> \ No newline at end of file diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java index 5714f02..f233a96 100644 --- a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java +++ b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java @@ -106,7 +106,11 @@ private String userAgent; public String getUserAgent() { if (userAgent == null) { - userAgent = String.format("WikipediaApp/%s (Android/%s)", WikipediaApp.APP_VERSION_STRING, Build.VERSION.RELEASE); + userAgent = String.format("WikipediaApp/%s (Android %s; %s)", + WikipediaApp.APP_VERSION_STRING, + Build.VERSION.RELEASE, + getString(R.string.device_type + )); } return userAgent; } -- To view, visit https://gerrit.wikimedia.org/r/126247 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ac919861270a08abc9cd995ddc4790886ca41a6 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda <yuvipa...@gmail.com> Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits