| Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java |
| =================================================================== |
| --- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java |
| +++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java |
| @@ -12,20 +12,16 @@ |
| * GNU General Public License for more details. |
| * |
| * You should have received a copy of the GNU General Public License |
| * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| package org.adblockplus.sbrowser.contentblocker; |
| -import java.io.BufferedReader; |
| -import java.io.IOException; |
| -import java.io.InputStreamReader; |
| - |
| import org.adblockplus.sbrowser.contentblocker.engine.Engine; |
| import org.adblockplus.sbrowser.contentblocker.engine.EngineService; |
| import org.adblockplus.adblockplussbrowser.R; |
| import android.app.AlertDialog; |
| import android.app.Dialog; |
| import android.app.ProgressDialog; |
| import android.content.DialogInterface; |
| @@ -38,17 +34,17 @@ |
| import android.preference.PreferenceManager; |
| import android.text.Html; |
| import android.util.Log; |
| public class MainPreferences extends PreferenceActivity implements |
| EngineService.OnEngineCreatedCallback, SharedPreferences.OnSharedPreferenceChangeListener |
| { |
| private static final String TAG = MainPreferences.class.getSimpleName(); |
| - private static final String SBROWSER_APP_ID = "com.sec.android.app.sbrowser"; |
| + public static final String SBROWSER_APP_ID = "com.sec.android.app.sbrowser"; |
|
diegocarloslima
2017/05/05 17:44:11
I think it will be better to move this field to En
jens
2017/05/09 09:44:45
Acknowledged.
|
| private Engine engine = null; |
| private Dialog dialog; |
| private int dialogTitleResId; |
| private SharedPreferences getSharedPreferences() |
| { |
| return PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext()); |
| } |
| @@ -185,17 +181,18 @@ |
| if (!applicationActivated) |
| { |
| Log.d(TAG, "Showing setup dialog"); |
| this.dialogTitleResId = R.string.setup_dialog_title; |
| this.dialog = new AlertDialog.Builder(this) |
| .setCancelable(false) |
| .setTitle(this.dialogTitleResId) |
| - .setMessage(Html.fromHtml(getString(R.string.setup_dialog_message))) |
| + .setMessage(Html.fromHtml(getString(Engine.hasSamsungInternetVersion5OrNewer(MainPreferences.this) ? |
| + R.string.setup_dialog_message_sbrowser_5 : R.string.setup_dialog_message_sbrowser_4))) |
| .setNeutralButton(R.string.setup_dialog_button, new OnClickListener() |
| { |
| @Override |
| public void onClick(DialogInterface dialog, int which) |
| { |
| Engine.openSBrowserSettings(MainPreferences.this); |
| } |
| }) |
| @@ -234,9 +231,9 @@ |
| else if (this.getString(R.string.key_application_activated).equals(key)) |
| { |
| if (this.dialogTitleResId == R.string.setup_dialog_title) |
| { |
| this.dismissDialog(); |
| } |
| } |
| } |
| -} |
| +} |