Don't try to unregister for GCM if Play Services doesn't exist

Fixes #6314
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-02-28 16:59:15 -08:00
parent 9b8719e2d5
commit cb6e048070

View File

@ -234,7 +234,9 @@ public class AdvancedPreferenceFragment extends PreferenceFragment {
Log.w(TAG, e); Log.w(TAG, e);
} }
GoogleCloudMessaging.getInstance(context).unregister(); if (!TextSecurePreferences.isGcmDisabled(context)) {
GoogleCloudMessaging.getInstance(context).unregister();
}
return SUCCESS; return SUCCESS;
} catch (IOException ioe) { } catch (IOException ioe) {