aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/utils/BundleUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/utils/BundleUtils.java')
-rw-r--r--main/src/cgeo/geocaching/utils/BundleUtils.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/utils/BundleUtils.java b/main/src/cgeo/geocaching/utils/BundleUtils.java
new file mode 100644
index 0000000..9c4255b
--- /dev/null
+++ b/main/src/cgeo/geocaching/utils/BundleUtils.java
@@ -0,0 +1,17 @@
+package cgeo.geocaching.utils;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+import android.os.Bundle;
+
+public class BundleUtils {
+
+ @NonNull
+ public static String getString(Bundle bundle, @NonNull String key, @NonNull String defaultValue) {
+ String res = bundle.getString(key);
+ if (res != null) {
+ return res;
+ }
+ return defaultValue;
+ }
+}