From 660d4f0e0406acae08de50666f922e18df6223a5 Mon Sep 17 00:00:00 2001 From: Javran Cheng Date: Thu, 2 Oct 2014 11:46:56 -0400 Subject: [PATCH] make the agent picker remember the previous value Saying you might sometimes accidentally click "yes" when editing user agent string and then the previous setting goes away or there is a typo in the customized string and you want to modify it slightly. And making the agent picker remember the previous value solves all the problems above :) --- src/acr/browser/lightning/SettingsActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/acr/browser/lightning/SettingsActivity.java b/src/acr/browser/lightning/SettingsActivity.java index 966c5c0..6b9e19c 100644 --- a/src/acr/browser/lightning/SettingsActivity.java +++ b/src/acr/browser/lightning/SettingsActivity.java @@ -721,6 +721,7 @@ public class SettingsActivity extends Activity { agentStringPicker.setTitle(getResources().getString(R.string.title_user_agent)); final EditText getAgent = new EditText(this); + getAgent.append(mPreferences.getString(PreferenceConstants.USER_AGENT_STRING, "")); agentStringPicker.setView(getAgent); agentStringPicker.setPositiveButton(getResources().getString(R.string.action_ok), new DialogInterface.OnClickListener() {