Search in sources :

Example 1 with TaskResult

use of net.vrallev.android.task.TaskResult in project Notes by lguipeng.

the class EvernoteLoginFragment method onResult.

@SuppressWarnings("unused")
@TaskResult
public final synchronized void onResult(Boolean result, EvernoteLoginTask task) {
    if (mResultPosted || (task != null && task.getKey() != mTaskKey)) {
        return;
    }
    mResultPosted = true;
    dismiss();
    FragmentActivity activity = getActivity();
    if (activity instanceof ResultCallback) {
        ((ResultCallback) activity).onLoginFinished(result);
    } else {
        onLoginFinished(result);
    }
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity) TaskResult(net.vrallev.android.task.TaskResult)

Aggregations

FragmentActivity (android.support.v4.app.FragmentActivity)1 TaskResult (net.vrallev.android.task.TaskResult)1