diff --git a/oeffi/AndroidManifest.xml b/oeffi/AndroidManifest.xml
index 41ee599..6fa7150 100644
--- a/oeffi/AndroidManifest.xml
+++ b/oeffi/AndroidManifest.xml
@@ -20,7 +20,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="de.schildbach.oeffi"
android:versionCode="653"
- android:versionName="10.5.9-aosp" >
+ android:versionName="10.5.9" >
-
diff --git a/oeffi/res/xml/preference_headers_donate.xml b/oeffi/res/xml/preference_headers_donate.xml
new file mode 100644
index 0000000..1b0b600
--- /dev/null
+++ b/oeffi/res/xml/preference_headers_donate.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/oeffi/src-aosp/de/schildbach/oeffi/Variants.java b/oeffi/src-aosp/de/schildbach/oeffi/Variants.java
new file mode 100644
index 0000000..8f26f91
--- /dev/null
+++ b/oeffi/src-aosp/de/schildbach/oeffi/Variants.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright the original author or authors.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package de.schildbach.oeffi;
+
+public class Variants {
+ public static final boolean ENABLE_DONATE = true;
+}
diff --git a/oeffi/src-google/de/schildbach/oeffi/Variants.java b/oeffi/src-google/de/schildbach/oeffi/Variants.java
new file mode 100644
index 0000000..3fe9f90
--- /dev/null
+++ b/oeffi/src-google/de/schildbach/oeffi/Variants.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright the original author or authors.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package de.schildbach.oeffi;
+
+public class Variants {
+ public static final boolean ENABLE_DONATE = false;
+}
diff --git a/oeffi/src/de/schildbach/oeffi/OeffiMainActivity.java b/oeffi/src/de/schildbach/oeffi/OeffiMainActivity.java
index 9f4c80c..9ba245e 100644
--- a/oeffi/src/de/schildbach/oeffi/OeffiMainActivity.java
+++ b/oeffi/src/de/schildbach/oeffi/OeffiMainActivity.java
@@ -277,6 +277,9 @@ public abstract class OeffiMainActivity extends OeffiActivity {
final MenuItem plansItem = menu.findItem(R.id.global_options_plans);
plansItem.setChecked(this instanceof PlansPickerActivity);
+ final MenuItem donateItem = menu.findItem(R.id.global_options_donate);
+ donateItem.setVisible(Variants.ENABLE_DONATE);
+
return super.onPrepareOptionsMenu(menu);
}
@@ -326,7 +329,8 @@ public abstract class OeffiMainActivity extends OeffiActivity {
}
case R.id.global_options_donate: {
- PreferenceActivity.start(this, DonateFragment.class.getName());
+ if (Variants.ENABLE_DONATE)
+ PreferenceActivity.start(this, DonateFragment.class.getName());
return true;
}
diff --git a/oeffi/src/de/schildbach/oeffi/preference/PreferenceActivity.java b/oeffi/src/de/schildbach/oeffi/preference/PreferenceActivity.java
index 10ab988..ff08703 100644
--- a/oeffi/src/de/schildbach/oeffi/preference/PreferenceActivity.java
+++ b/oeffi/src/de/schildbach/oeffi/preference/PreferenceActivity.java
@@ -21,6 +21,7 @@ import android.app.Activity;
import android.content.Intent;
import android.view.MenuItem;
import de.schildbach.oeffi.R;
+import de.schildbach.oeffi.Variants;
import java.util.List;
@@ -38,6 +39,8 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
@Override
public void onBuildHeaders(final List target) {
loadHeadersFromResource(R.xml.preference_headers, target);
+ if (Variants.ENABLE_DONATE)
+ loadHeadersFromResource(R.xml.preference_headers_donate, target);
}
@Override
@@ -56,6 +59,6 @@ public class PreferenceActivity extends android.preference.PreferenceActivity {
return CommonFragment.class.getName().equals(fragmentName)
|| DirectionsFragment.class.getName().equals(fragmentName)
|| AboutFragment.class.getName().equals(fragmentName)
- || DonateFragment.class.getName().equals(fragmentName);
+ || (Variants.ENABLE_DONATE && DonateFragment.class.getName().equals(fragmentName));
}
}