session-android/src/org/thoughtcrime/securesms/notifications/MasterSecretBroadcastReceiver.java
Moxie Marlinspike 13eed3baa7 Fix up wearable reply stuff a little.
1) Don't include MasterSecret in PendingIntents.

2) Correctly reply to non-push group threads, rather than
   just an individual in that group.

// FREEBIE
2015-07-08 13:13:49 -07:00

20 lines
664 B
Java

package org.thoughtcrime.securesms.notifications;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.Nullable;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.service.KeyCachingService;
public abstract class MasterSecretBroadcastReceiver extends BroadcastReceiver {
@Override
public final void onReceive(Context context, Intent intent) {
onReceive(context, intent, KeyCachingService.getMasterSecret(context));
}
protected abstract void onReceive(Context context, Intent intent, @Nullable MasterSecret masterSecret);
}