mirror of
https://github.com/oxen-io/session-android.git
synced 2025-05-08 14:36:52 +00:00
Handle voice GCM intents in AsyncTask.
// FREEBIE
This commit is contained in:
parent
c041495834
commit
ccbe856ffb
@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.gcm;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.v4.content.WakefulBroadcastReceiver;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
@ -62,7 +63,10 @@ public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
|
||||
.add(new PushNotificationReceiveJob(context));
|
||||
}
|
||||
|
||||
private void handleReceivedCall(Context context, String data) {
|
||||
private void handleReceivedCall(final Context context, final String data) {
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
try {
|
||||
String signalingKey = TextSecurePreferences.getSignalingKey(context);
|
||||
EncryptedSignalMessage encryptedSignalMessage = new EncryptedSignalMessage(data, signalingKey);
|
||||
@ -84,5 +88,9 @@ public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
|
||||
} catch (InvalidEncryptedSignalException | IOException e) {
|
||||
Log.w(TAG, e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}.execute();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user