mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-21 08:12:56 +08:00
Added Log.e when Config is not initialised but accessed
This commit is contained in:
parent
137eb40fab
commit
d260d0c182
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user