| Index: src/org/adblockplus/android/Preferences.java |
| =================================================================== |
| --- a/src/org/adblockplus/android/Preferences.java |
| +++ b/src/org/adblockplus/android/Preferences.java |
| @@ -45,6 +45,7 @@ |
| import android.preference.PreferenceManager; |
| import android.text.Html; |
| import android.text.format.DateFormat; |
| +import android.text.method.LinkMovementMethod; |
| import android.util.Log; |
| import android.view.View; |
| import android.view.ViewGroup; |
| @@ -151,8 +152,15 @@ |
| if (firstRun && current != null) |
| { |
| - new AlertDialog.Builder(this).setTitle(R.string.app_name) |
| - .setMessage(String.format(getString(R.string.msg_subscription_offer, current.title))) |
| + final String message = String.format(getString(R.string.msg_subscription_offer, current.title)) |
| + .replace("<a>", "<a href=\"" + getString(R.string.acceptable_ads_url) + "\">"); |
|
Wladimir Palant
2013/11/26 09:35:54
This is a security vulnerability, please don't all
Felix Dahlke
2013/11/26 10:25:50
Done. I had a feeling I wouldn't get away with thi
|
| + final TextView messageView = new TextView(this); |
| + messageView.setText(Html.fromHtml(message)); |
| + messageView.setMovementMethod(LinkMovementMethod.getInstance()); |
| + final int padding = 10; |
|
Felix Dahlke
2013/11/26 09:21:52
I'm not a big fan of hard coding style properties,
|
| + messageView.setPadding(padding, padding, padding, padding); |
| + new AlertDialog.Builder(this).setTitle(R.string.install_name) |
| + .setView(messageView) |
| .setIcon(android.R.drawable.ic_dialog_info) |
| .setPositiveButton(R.string.ok, null).create().show(); |
| } |