only show app warning if debug is on
This commit is contained in:
parent
78e7af4372
commit
edd3195ec8
|
@ -24,6 +24,7 @@ import android.content.ServiceConnection;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.PackageManager.NameNotFoundException;
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
@ -282,18 +283,22 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
||||||
|
|
||||||
private void appConflictChecker ()
|
private void appConflictChecker ()
|
||||||
{
|
{
|
||||||
|
boolean debug = mPrefs.getBoolean("pref_enable_logging",false);
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
String[] badApps = {"com.sec.msc.nts.android.proxy"};
|
String[] badApps = {"com.sec.msc.nts.android.proxy"};
|
||||||
|
|
||||||
for (String badApp : badApps)
|
for (String badApp : badApps)
|
||||||
{
|
{
|
||||||
if (appInstalledOrNot(badApp))
|
if (appInstalledOrNot(badApp))
|
||||||
{
|
{
|
||||||
showAlert(getString(R.string.title_error),"Please uninstall or disable this app if you are having problems with Orbot: " + badApp,true);
|
showAlert("App Conflict","Please disable this app in Android settings if you are having problems with Orbot: " + badApp,true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -714,7 +719,8 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
|
||||||
boolean app_installed = false;
|
boolean app_installed = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
|
PackageInfo pi = pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
|
||||||
|
|
||||||
app_installed = true;
|
app_installed = true;
|
||||||
}
|
}
|
||||||
catch (PackageManager.NameNotFoundException e)
|
catch (PackageManager.NameNotFoundException e)
|
||||||
|
|
Loading…
Reference in New Issue