From 1485d5944e27d4484a80b70fe0d33bdb0c5495e8 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 6 Jul 2019 19:52:19 -0700 Subject: [PATCH] hide show-fcm-receives pref when FCM not built in I just spent an hour trying to understand why fcm wasn't working against the f-droid build. This should make that less likely to happen again. --- .../src/main/java/org/eehouse/android/xw4/PrefsDelegate.java | 4 ++++ xwords4/android/app/src/main/res/xml/xwprefs.xml | 1 + 2 files changed, 5 insertions(+) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/PrefsDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/PrefsDelegate.java index a9a8dcdf5..ce85ac314 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/PrefsDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/PrefsDelegate.java @@ -383,6 +383,10 @@ public class PrefsDelegate extends DelegateBase if ( ! BuildConfig.WIDIR_ENABLED ) { hideOne( R.string.key_enable_p2p, R.string.key_network_behavior ); } + + if ( null == FBMService.getFCMDevID( m_activity ) ) { + hideOne( R.string.key_show_fcm, R.string.pref_group_relay_title ); + } } public static void launch( Context context ) diff --git a/xwords4/android/app/src/main/res/xml/xwprefs.xml b/xwords4/android/app/src/main/res/xml/xwprefs.xml index 3440b09db..ed84bf7bd 100644 --- a/xwords4/android/app/src/main/res/xml/xwprefs.xml +++ b/xwords4/android/app/src/main/res/xml/xwprefs.xml @@ -398,6 +398,7 @@