From e53e03a7277f1b54c664eb5a4c994871c67d45c1 Mon Sep 17 00:00:00 2001 From: Nathan Freitas Date: Fri, 22 Aug 2014 11:09:11 -0400 Subject: [PATCH] tuning Orbot app conflict checker code --- src/org/torproject/android/Orbot.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/torproject/android/Orbot.java b/src/org/torproject/android/Orbot.java index d603d890..e88e14de 100644 --- a/src/org/torproject/android/Orbot.java +++ b/src/org/torproject/android/Orbot.java @@ -296,13 +296,13 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic { SharedPreferences sprefs = TorServiceUtils.getSharedPrefs(getApplicationContext()); - boolean showAppConflict = sprefs.getBoolean("pref_show_conflict",true); + boolean showAppConflict = true;//sprefs.getBoolean("pref_show_conflict",true); - String[] badApps = {"com.sec.msc.nts.android.proxy|com.sec.msc.nts.android.proxy","com.sec.pcw|Samsung Link"}; + String[] badApps = {"com.sec.msc.nts.android.proxy:com.sec.msc.nts.android.proxy","com.sec.pcw:Samsung Link"}; for (String badApp : badApps) { - String[] badAppParts = badApp.split("|"); + String[] badAppParts = badApp.split(":"); if (appInstalledOrNot(badAppParts[0])) { @@ -742,7 +742,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic PackageManager pm = getPackageManager(); try { - PackageInfo pi = pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); + PackageInfo pi = pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); return pi.applicationInfo.enabled; } catch (PackageManager.NameNotFoundException e)