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

Unified Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java

Issue 29430610: Issue 5193 - Apply Samsung Internet UI changes to the frist run slide (Closed)
Patch Set: Changes according to Diegos comments Created May 9, 2017, 9:44 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,16 @@
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";
private Engine engine = null;
private Dialog dialog;
private int dialogTitleResId;
private SharedPreferences getSharedPreferences()
{
return PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());
}
@@ -125,22 +120,22 @@
.setNeutralButton(R.string.sbrowser_dialog_button, new OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
try
{
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="
- + SBROWSER_APP_ID)));
+ + Engine.SBROWSER_APP_ID)));
}
catch (final Throwable t)
{
startActivity(new Intent(Intent.ACTION_VIEW, Uri
- .parse("https://play.google.com/store/apps/details?id=" + SBROWSER_APP_ID)));
+ .parse("https://play.google.com/store/apps/details?id=" + Engine.SBROWSER_APP_ID)));
}
}
}).create();
this.dialog.show();
}
else
{
this.checkAAStatusAndProceed();
@@ -185,17 +180,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 +230,9 @@
else if (this.getString(R.string.key_application_activated).equals(key))
{
if (this.dialogTitleResId == R.string.setup_dialog_title)
{
this.dismissDialog();
}
}
}
-}
+}

Powered by Google App Engine
This is Rietveld