Added Log.e when Config is not initialised but accessed

This commit is contained in:
arudenko 2013-07-25 11:23:05 +08:00 committed by Andrew Grieve
parent 137eb40fab
commit d260d0c182

View File

@ -204,6 +204,7 @@ public class Config {
*/
public static void addWhiteListEntry(String origin, boolean subdomains) {
if (self == null) {
Log.e(TAG, "Config was not initialised. Did you forget to Config.init(this)?");
return;
}
self.whitelist.addWhiteListEntry(origin, subdomains);
@ -217,6 +218,7 @@ public class Config {
*/
public static boolean isUrlWhiteListed(String url) {
if (self == null) {
Log.e(TAG, "Config was not initialised. Did you forget to Config.init(this)?");
return false;
}
return self.whitelist.isUrlWhiteListed(url);