check if installed apps are enabled
This commit is contained in:
parent
60a822a218
commit
e80c3bf162
|
@ -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 ;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue