check if installed apps are enabled

This commit is contained in:
Nathan Freitas 2014-05-05 00:00:01 -04:00
parent 60a822a218
commit e80c3bf162
1 changed files with 2 additions and 5 deletions

View File

@ -728,18 +728,15 @@ public class Orbot extends ActionBarActivity implements TorConstants, OnLongClic
private boolean appInstalledOrNot(String uri)
{
PackageManager pm = getPackageManager();
boolean app_installed = false;
try
{
PackageInfo pi = pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
app_installed = true;
return pi.applicationInfo.enabled;
}
catch (PackageManager.NameNotFoundException e)
{
app_installed = false;
return false;
}
return app_installed ;
}
/*