From cb6e0480708f162820164a49256c2f9524916e46 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 28 Feb 2017 16:59:15 -0800 Subject: [PATCH] Don't try to unregister for GCM if Play Services doesn't exist Fixes #6314 // FREEBIE --- .../securesms/preferences/AdvancedPreferenceFragment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java b/src/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java index 77b46276ae..534aa50a7e 100644 --- a/src/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java +++ b/src/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java @@ -234,7 +234,9 @@ public class AdvancedPreferenceFragment extends PreferenceFragment { Log.w(TAG, e); } - GoogleCloudMessaging.getInstance(context).unregister(); + if (!TextSecurePreferences.isGcmDisabled(context)) { + GoogleCloudMessaging.getInstance(context).unregister(); + } return SUCCESS; } catch (IOException ioe) {