DroidFish: More efficient way to detect if scid on the go is installed.

This commit is contained in:
Peter Osterlund 2015-12-26 22:28:20 +01:00
parent bb0f757403
commit 37875c0311

View File

@ -3198,12 +3198,13 @@ public class DroidFish extends Activity implements GUIInterface {
}
private final boolean hasScidProvider() {
List<ProviderInfo> providers = getPackageManager().queryContentProviders(null, 0, 0);
for (ProviderInfo info : providers)
if (info.authority.equals("org.scid.database.scidprovider"))
try {
getPackageManager().getPackageInfo("org.scid.android", 0);
return true;
} catch (PackageManager.NameNotFoundException ex) {
return false;
}
}
private final void selectScidFile() {
setAutoMode(AutoMode.OFF);