mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
a4e18c515c
Closes #2647 // FREEBIE
29 lines
825 B
Java
29 lines
825 B
Java
package org.thoughtcrime.securesms.crypto;
|
|
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
|
|
import org.thoughtcrime.securesms.service.KeyCachingService;
|
|
|
|
/**
|
|
* This class processes key exchange interactions.
|
|
*
|
|
* @author Moxie Marlinspike
|
|
*/
|
|
|
|
public class SecurityEvent {
|
|
|
|
public static final String SECURITY_UPDATE_EVENT = "org.thoughtcrime.securesms.KEY_EXCHANGE_UPDATE";
|
|
|
|
public static void broadcastSecurityUpdateEvent(Context context) {
|
|
broadcastSecurityUpdateEvent(context, -2);
|
|
}
|
|
|
|
public static void broadcastSecurityUpdateEvent(Context context, long threadId) {
|
|
Intent intent = new Intent(SECURITY_UPDATE_EVENT);
|
|
intent.putExtra("thread_id", threadId);
|
|
intent.setPackage(context.getPackageName());
|
|
context.sendBroadcast(intent, KeyCachingService.KEY_PERMISSION);
|
|
}
|
|
|
|
}
|