diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java index 83ad3110a..891d3737b 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/MainPreferencesFragment.java @@ -1,6 +1,8 @@ package de.danoeh.antennapod.fragment.preferences; import android.content.Intent; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffColorFilter; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; @@ -42,15 +44,26 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat { // and afterwards remove the following lines. Please keep in mind that AntennaPod is licensed under the GPL. // This means that your application needs to be open-source under the GPL, too. // It must also include a prominent copyright notice. - String packageName = getContext().getPackageName(); - if (!"de.danoeh.antennapod".equals(packageName) && !"de.danoeh.antennapod.debug".equals(packageName)) { + int packageHash = getContext().getPackageName().hashCode(); + if (packageHash != 1790437538 && packageHash != -1190467065) { findPreference(PREF_CATEGORY_PROJECT).setVisible(false); Preference copyrightNotice = new Preference(getContext()); + copyrightNotice.setIcon(R.drawable.ic_info_white); + copyrightNotice.getIcon().mutate() + .setColorFilter(new PorterDuffColorFilter(0xffcc0000, PorterDuff.Mode.MULTIPLY)); copyrightNotice.setSummary("This application is based on AntennaPod." + " The AntennaPod team does NOT provide support for this unofficial version." + " If you can read this message, the developers of this modification" + " violate the GNU General Public License (GPL)."); findPreference(PREF_CATEGORY_PROJECT).getParent().addPreference(copyrightNotice); + } else if (packageHash == -1190467065) { + Preference debugNotice = new Preference(getContext()); + debugNotice.setIcon(R.drawable.ic_info_white); + debugNotice.getIcon().mutate() + .setColorFilter(new PorterDuffColorFilter(0xffcc0000, PorterDuff.Mode.MULTIPLY)); + debugNotice.setOrder(-1); + debugNotice.setSummary("This is a development version of AntennaPod and not meant for daily use"); + findPreference(PREF_CATEGORY_PROJECT).getParent().addPreference(debugNotice); } } diff --git a/core/src/debug/res/drawable-nodpi/ic_launcher_foreground_no_finish.png b/core/src/debug/res/drawable-nodpi/ic_launcher_foreground_no_finish.png new file mode 100644 index 000000000..825421990 Binary files /dev/null and b/core/src/debug/res/drawable-nodpi/ic_launcher_foreground_no_finish.png differ