mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-20 13:01:29 +00:00
Don't completely disable GCM.
// FREEBIE
This commit is contained in:
parent
bf69a90b69
commit
4ccb7ebab6
@ -62,8 +62,6 @@ public class GcmRefreshJob extends ContextJob {
|
|||||||
|
|
||||||
if (result != ConnectionResult.SUCCESS) {
|
if (result != ConnectionResult.SUCCESS) {
|
||||||
notifyGcmFailure();
|
notifyGcmFailure();
|
||||||
accountManager.setGcmId(Optional.<String>absent());
|
|
||||||
TextSecurePreferences.setPushRegistered(context, false);
|
|
||||||
} else {
|
} else {
|
||||||
String gcmId = GoogleCloudMessaging.getInstance(context).register(REGISTRATION_ID);
|
String gcmId = GoogleCloudMessaging.getInstance(context).register(REGISTRATION_ID);
|
||||||
accountManager.setGcmId(Optional.of(gcmId));
|
accountManager.setGcmId(Optional.of(gcmId));
|
||||||
@ -94,6 +92,7 @@ public class GcmRefreshJob extends ContextJob {
|
|||||||
builder.setContentTitle(context.getString(R.string.GcmRefreshJob_Permanent_TextSecure_communication_failure));
|
builder.setContentTitle(context.getString(R.string.GcmRefreshJob_Permanent_TextSecure_communication_failure));
|
||||||
builder.setContentText(context.getString(R.string.GcmRefreshJob_TextSecure_was_unable_to_register_with_Google_Play_Services));
|
builder.setContentText(context.getString(R.string.GcmRefreshJob_TextSecure_was_unable_to_register_with_Google_Play_Services));
|
||||||
builder.setTicker(context.getString(R.string.GcmRefreshJob_Permanent_TextSecure_communication_failure));
|
builder.setTicker(context.getString(R.string.GcmRefreshJob_Permanent_TextSecure_communication_failure));
|
||||||
|
builder.setVibrate(new long[] {0, 1000});
|
||||||
builder.setContentIntent(pendingIntent);
|
builder.setContentIntent(pendingIntent);
|
||||||
|
|
||||||
((NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE))
|
((NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user