]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/fragments/DomainSettingsFragment.java
Fix custom user agents. https://redmine.stoutner.com/issues/810
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / fragments / DomainSettingsFragment.java
index 1ce0e3cccd5a7668b52f85738652ec8692f344a7..45e2b035a0d16c9f5a0e40e2d2141a63b3425f92 100644 (file)
@@ -601,7 +601,8 @@ public class DomainSettingsFragment extends Fragment {
                     // Get the user agent string from the user agent data array.
                     userAgentTextView.setText(userAgentDataArray[defaultUserAgentArrayPosition]);
             }
-        } else if (userAgentArrayPosition == MainWebViewActivity.UNRECOGNIZED_USER_AGENT) {  // A custom user agent is stored in the current user agent name.
+        } else if (userAgentArrayPosition == MainWebViewActivity.UNRECOGNIZED_USER_AGENT || currentUserAgentName.equals(getString(R.string.custom_user_agent))) {
+            // A custom user agent is stored in the current user agent name.  The second check is necessary in case the user did not change the default custom text.
             // Set the user agent spinner to `Custom user agent`.
             userAgentSpinner.setSelection(MainWebViewActivity.DOMAINS_CUSTOM_USER_AGENT);