Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java

Issue 29430610: Issue 5193 - Apply Samsung Internet UI changes to the frist run slide (Closed)
Left Patch Set: Created May 5, 2017, 2:58 p.m.
Right Patch Set: Changes according to Diegos comments Created May 9, 2017, 9:44 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 21 matching lines...) Expand all
32 import android.os.Bundle; 32 import android.os.Bundle;
33 import android.preference.PreferenceActivity; 33 import android.preference.PreferenceActivity;
34 import android.preference.PreferenceManager; 34 import android.preference.PreferenceManager;
35 import android.text.Html; 35 import android.text.Html;
36 import android.util.Log; 36 import android.util.Log;
37 37
38 public class MainPreferences extends PreferenceActivity implements 38 public class MainPreferences extends PreferenceActivity implements
39 EngineService.OnEngineCreatedCallback, SharedPreferences.OnSharedPreferenceC hangeListener 39 EngineService.OnEngineCreatedCallback, SharedPreferences.OnSharedPreferenceC hangeListener
40 { 40 {
41 private static final String TAG = MainPreferences.class.getSimpleName(); 41 private static final String TAG = MainPreferences.class.getSimpleName();
42 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.
43 private Engine engine = null; 42 private Engine engine = null;
44 private Dialog dialog; 43 private Dialog dialog;
45 private int dialogTitleResId; 44 private int dialogTitleResId;
46 45
47 private SharedPreferences getSharedPreferences() 46 private SharedPreferences getSharedPreferences()
48 { 47 {
49 return PreferenceManager.getDefaultSharedPreferences(this.getApplicationCont ext()); 48 return PreferenceManager.getDefaultSharedPreferences(this.getApplicationCont ext());
50 } 49 }
51 50
52 @Override 51 @Override
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 .setTitle(this.dialogTitleResId) 118 .setTitle(this.dialogTitleResId)
120 .setMessage(Html.fromHtml(getString(R.string.sbrowser_dialog_message)) ) 119 .setMessage(Html.fromHtml(getString(R.string.sbrowser_dialog_message)) )
121 .setNeutralButton(R.string.sbrowser_dialog_button, new OnClickListener () 120 .setNeutralButton(R.string.sbrowser_dialog_button, new OnClickListener ()
122 { 121 {
123 @Override 122 @Override
124 public void onClick(DialogInterface dialog, int which) 123 public void onClick(DialogInterface dialog, int which)
125 { 124 {
126 try 125 try
127 { 126 {
128 startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market:/ /details?id=" 127 startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market:/ /details?id="
129 + SBROWSER_APP_ID))); 128 + Engine.SBROWSER_APP_ID)));
130 } 129 }
131 catch (final Throwable t) 130 catch (final Throwable t)
132 { 131 {
133 startActivity(new Intent(Intent.ACTION_VIEW, Uri 132 startActivity(new Intent(Intent.ACTION_VIEW, Uri
134 .parse("https://play.google.com/store/apps/details?id=" + SB ROWSER_APP_ID))); 133 .parse("https://play.google.com/store/apps/details?id=" + En gine.SBROWSER_APP_ID)));
135 } 134 }
136 } 135 }
137 }).create(); 136 }).create();
138 this.dialog.show(); 137 this.dialog.show();
139 } 138 }
140 else 139 else
141 { 140 {
142 this.checkAAStatusAndProceed(); 141 this.checkAAStatusAndProceed();
143 } 142 }
144 } 143 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 229 }
231 else if (this.getString(R.string.key_application_activated).equals(key)) 230 else if (this.getString(R.string.key_application_activated).equals(key))
232 { 231 {
233 if (this.dialogTitleResId == R.string.setup_dialog_title) 232 if (this.dialogTitleResId == R.string.setup_dialog_title)
234 { 233 {
235 this.dismissDialog(); 234 this.dismissDialog();
236 } 235 }
237 } 236 }
238 } 237 }
239 } 238 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld