diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2014-12-21 07:14:08 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2014-12-21 07:14:08 +0100 |
commit | bd0862b5cd56ff71427f4b776624fd5479ee77e0 (patch) | |
tree | 295133b58d3a438e3c73e6881823d54e1ad15bc5 /main | |
parent | 74daa3ebbf94a66b47149ba0428f2c4af838aa15 (diff) | |
download | cgeo-bd0862b5cd56ff71427f4b776624fd5479ee77e0.zip cgeo-bd0862b5cd56ff71427f4b776624fd5479ee77e0.tar.gz cgeo-bd0862b5cd56ff71427f4b776624fd5479ee77e0.tar.bz2 |
validate navigation app preferences
Diffstat (limited to 'main')
-rw-r--r-- | main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java index f346fc0..d542541 100644 --- a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java +++ b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java @@ -80,6 +80,9 @@ public final class NavigationAppFactory extends AbstractAppFactory { this.app = app; this.id = id; this.preferenceKey = preferenceKey; + if (preferenceKey == 0 || preferenceKey == -1) { + throw new IllegalStateException("Every navigation app must have a boolean preference in the settings to be enabled/disabled."); + } } /** |