This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SessionsManager { | |
private Context mContext; | |
@Inject | |
SessionsManager(Context context) { | |
mContext = context; | |
} | |
public boolean isInMySchedule() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void injectCallbacks(Fragment fragment) { | |
injectCallbacks(fragment, fragment.getActivity()); | |
} | |
public static void injectCallbacks(Object obj, Activity activity) { | |
Field[] fields = obj.getClass().getDeclaredFields(); | |
for (Field field : fields) { | |
if (field.isAnnotationPresent(InjectCallback.class)) { | |
try { | |
field.setAccessible(true); |