tuning Orbot app conflict checker code

This commit is contained in:
Nathan Freitas 2014-08-22 11:09:11 -04:00
parent c2672cc95f
commit e53e03a727
1 changed files with 4 additions and 4 deletions

View File

@ -296,13 +296,13 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
{ {
SharedPreferences sprefs = TorServiceUtils.getSharedPrefs(getApplicationContext()); 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) for (String badApp : badApps)
{ {
String[] badAppParts = badApp.split("|"); String[] badAppParts = badApp.split(":");
if (appInstalledOrNot(badAppParts[0])) if (appInstalledOrNot(badAppParts[0]))
{ {
@ -742,7 +742,7 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
PackageManager pm = getPackageManager(); PackageManager pm = getPackageManager();
try try
{ {
PackageInfo pi = pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); PackageInfo pi = pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
return pi.applicationInfo.enabled; return pi.applicationInfo.enabled;
} }
catch (PackageManager.NameNotFoundException e) catch (PackageManager.NameNotFoundException e)