package me.thekey.android.lib.util;

import static me.thekey.android.TheKey.ACTION_ATTRIBUTES_LOADED;
import static me.thekey.android.TheKey.ACTION_LOGIN;
import static me.thekey.android.TheKey.ACTION_LOGOUT;
import static me.thekey.android.TheKey.EXTRA_CHANGING_USER;
import static me.thekey.android.TheKey.EXTRA_GUID;
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;

public final class BroadcastUtils {
    public static void broadcastLogin(final Context context, final String guid) {
        LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(ACTION_LOGIN).putExtra(EXTRA_GUID, guid));
    }

    public static void broadcastLogout(final Context context, final String guid, final boolean changingUser) {
        LocalBroadcastManager.getInstance(context).sendBroadcast(
                new Intent(ACTION_LOGOUT).putExtra(EXTRA_GUID, guid).putExtra(EXTRA_CHANGING_USER, changingUser));
    }

    public static void broadcastAttributesLoaded(final Context context, final String guid) {
        LocalBroadcastManager.getInstance(context).sendBroadcast(
                new Intent(ACTION_ATTRIBUTES_LOADED).putExtra(EXTRA_GUID, guid));
    }
}

@@ -313,16 +313,17 @@
 A_GUID;%0A
+%0A
 import a
@@ -377,16 +377,59 @@
 Intent;%0A
+import android.support.annotation.NonNull;%0A
 import a
@@ -552,16 +552,25 @@
 stLogin(
+@NonNull 
 final Co
@@ -575,32 +575,41 @@
 Context context,
+ @NonNull
  final String gu
@@ -779,16 +779,25 @@
 tLogout(
+@NonNull 
 final Co
@@ -802,32 +802,41 @@
 Context context,
+ @NonNull
  final String gu
@@ -838,16 +838,55 @@
 ng guid,
+%0A                                      
  final b
@@ -1145,16 +1145,25 @@
 sLoaded(
+@NonNull 
 final Co
@@ -1176,16 +1176,25 @@
 context,
+ @NonNull
  final S

add some nonnull annotations