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

Fixes #6314
// FREEBIE
pull/1/head
Moxie Marlinspike 9 years ago
parent 9b8719e2d5
commit cb6e048070

@ -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) {

Loading…
Cancel
Save