// Path: src/org/sagemath/droid/utils/BusProvider.java
// public class BusProvider {
// 
//     private static Bus bus;
// 
//     public static Bus getInstance() {
//         if (bus == null) {
//             bus = new Bus();
//         }
// 
//         return bus;
//     }
// }


import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.*;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.widget.Toast;
import org.sagemath.droid.R;
import org.sagemath.droid.utils.BusProvider;
package org.sagemath.droid.dialogs;


/**
 * <p>The {@link android.support.v4.app.DialogFragment} which displays the share options</p>
 * @author Nikhil Peter Raj
 */
public class ShareDialogFragment extends DialogFragment {
    private static final String TAG = "SageDroid:ShareDialogFragment";

    public static interface OnRequestOutputListener {
        public void onRequestOutput();
    }

    private OnRequestOutputListener listener;

    private String shareUrl;
    private int selected = -1;

    private static final String ARG_URL = "shareURL";

    public static ShareDialogFragment getInstance(String permalinkUrl) {
        ShareDialogFragment fragment = new ShareDialogFragment();
        Bundle args = new Bundle();
        args.putString(ARG_URL, permalinkUrl);

        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onPause() {
        super.onPause();
// Path: src/org/sagemath/droid/utils/BusProvider.java
// public class BusProvider {
// 
//     private static Bus bus;
// 
//     public static Bus getInstance() {
//         if (bus == null) {
//             bus = new Bus();
//         }
// 
//         return bus;
//     }
// }


// Path: src/org/sagemath/droid/dialogs/ShareDialogFragment.java
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.*;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.widget.Toast;
import org.sagemath.droid.R;
import org.sagemath.droid.utils.BusProvider;

package org.sagemath.droid.dialogs;


/**
 * <p>The {@link android.support.v4.app.DialogFragment} which displays the share options</p>
 * @author Nikhil Peter Raj
 */
public class ShareDialogFragment extends DialogFragment {
    private static final String TAG = "SageDroid:ShareDialogFragment";

    public static interface OnRequestOutputListener {
        public void onRequestOutput();
    }

    private OnRequestOutputListener listener;

    private String shareUrl;
    private int selected = -1;

    private static final String ARG_URL = "shareURL";

    public static ShareDialogFragment getInstance(String permalinkUrl) {
        ShareDialogFragment fragment = new ShareDialogFragment();
        Bundle args = new Bundle();
        args.putString(ARG_URL, permalinkUrl);

        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onPause() {
        super.onPause();
        BusProvider.getInstance().register(this);