return presenterDelegate.getPresenter();
}
public Activity getActivity() {
Context context = getContext();
while (!(context instanceof Activity) && context instanceof ContextWrapper)
<BUG>context = ((ContextWrapper)context).getBaseContext();
</BUG>
if (!(context instanceof Activity))
throw new IllegalStateException("Expected an activity context, got " + context.getClass().getSimpleName());
<BUG>return (Activity)context;
</BUG>
}

return presenterDelegate.getPresenter();
}
public Activity getActivity() {
Context context = getContext();
while (!(context instanceof Activity) && context instanceof ContextWrapper)
context = ((ContextWrapper) context).getBaseContext();
if (!(context instanceof Activity))
throw new IllegalStateException("Expected an activity context, got " + context.getClass().getSimpleName());
return (Activity) context;
}
