session-android/src/org/thoughtcrime/securesms/notifications/MasterSecretBroadcastReceiver.java

20 lines
664 B
Java
Raw Normal View History

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);
}