|
|
@ -43,33 +43,22 @@ public class AddOnService {
|
|
|
|
/** Astrid Power Pack label */
|
|
|
|
/** Astrid Power Pack label */
|
|
|
|
public static final String POWER_PACK_LABEL = "Astrid Power Pack";
|
|
|
|
public static final String POWER_PACK_LABEL = "Astrid Power Pack";
|
|
|
|
|
|
|
|
|
|
|
|
/** cached is power pack value */
|
|
|
|
|
|
|
|
private static Boolean isPowerPack = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Checks whether power pack should be enabled */
|
|
|
|
/** Checks whether power pack should be enabled */
|
|
|
|
public boolean isPowerPack() {
|
|
|
|
public boolean isPowerPack() {
|
|
|
|
if (isPowerPack == null) {
|
|
|
|
if (Preferences.getBoolean(PREF_OEM, false))
|
|
|
|
isPowerPack = false;
|
|
|
|
return true;
|
|
|
|
if (Preferences.getBoolean(PREF_OEM, false))
|
|
|
|
else if(isInstalled(POWER_PACK_PACKAGE, true))
|
|
|
|
isPowerPack = true;
|
|
|
|
return true;
|
|
|
|
else if(isInstalled(POWER_PACK_PACKAGE, true))
|
|
|
|
return false;
|
|
|
|
isPowerPack = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return isPowerPack;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** Checks whether locale plugin should be enabled */
|
|
|
|
/** Checks whether locale plugin should be enabled */
|
|
|
|
public boolean hasLocalePlugin() {
|
|
|
|
public boolean hasLocalePlugin() {
|
|
|
|
if (isPowerPack == null) {
|
|
|
|
if (Preferences.getBoolean(PREF_OEM, false))
|
|
|
|
isPowerPack = false;
|
|
|
|
return true;
|
|
|
|
if (Preferences.getBoolean(PREF_OEM, false))
|
|
|
|
else if(isInstalled(LOCALE_PACKAGE, true))
|
|
|
|
isPowerPack = true;
|
|
|
|
return true;
|
|
|
|
else if(isInstalled(LOCALE_PACKAGE, true))
|
|
|
|
return false;
|
|
|
|
isPowerPack = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return isPowerPack;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|