Restore user agent for WebViewActivity #9627
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the Site → Blog Posts part of #9625.
Findings
The changes in Automattic/wp-calypso#31160 expected the Android app to have
"wp-android"in its user agent. You can see this being done in the Automattic/wp-calypso#31830 PR. See also related discussion in p4TIVU-9dz-p2.It looks like for
WebViewActivity, we never change the user agent at all. We removed that in #1312. At that time, the user agent fully replaced the default. It looked like this:After the changes in #3410, the user agent is now the default plus the custom
"wp-android"text. It looks like this:Solution
I believe it is now safe to restore the user agent and that's what was done here. This appends
"wp-android/<version>"to the default user agent.Testing
Validate that the Calypso UI is no longer shown.
Please also test for possible regressions that you can remember that's related to the removal of the user agent.
Release notes
RELEASE-NOTES.txt.