// Path: app/src/main/java/io/github/droidkaigi/confsched2017/view/activity/ContributorsActivity.java
// public class ContributorsActivity extends BaseActivity {
// 
//     private ActivityContributorsBinding binding;
// 
//     @Inject
//     ToolbarViewModel viewModel;
// 
//     public static Intent createIntent(Context context) {
//         return new Intent(context, ContributorsActivity.class);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         getComponent().inject(this);
// 
//         binding = DataBindingUtil.setContentView(this, R.layout.activity_contributors);
//         binding.setViewModel(viewModel);
// 
//         initBackToolbar(binding.toolbar);
//         viewModel.setToolbarTitle(getString(R.string.contributors));
//         replaceFragment(ContributorsFragment.newInstance(), R.id.content_view);
//     }
// }
// 
// Path: app/src/main/java/io/github/droidkaigi/confsched2017/view/activity/SessionDetailActivity.java
// public class SessionDetailActivity extends BaseActivity {
// 
//     private static final String EXTRA_SESSION_ID = "session_id";
//     private static final String EXTRA_PARENT = "parent";
// 
//     private Class parentClass;
// 
//     public static Intent createIntent(@NonNull Context context, int sessionId, @Nullable Class<? extends Activity> parentClass) {
//         Intent intent = new Intent(context, SessionDetailActivity.class);
//         intent.putExtra(EXTRA_SESSION_ID, sessionId);
//         if (parentClass != null) {
//             intent.putExtra(EXTRA_PARENT, parentClass.getName());
//         }
//         return intent;
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         DataBindingUtil.setContentView(this, R.layout.activity_session_detail);
//         getComponent().inject(this);
// 
//         final int sessionId = getIntent().getIntExtra(EXTRA_SESSION_ID, 0);
//         String parentClassName = getIntent().getStringExtra(EXTRA_PARENT);
//         if (TextUtils.isEmpty(parentClassName)) {
//             parentClass = MainActivity.class;
//         } else {
//             try {
//                 parentClass = Class.forName(parentClassName);
//             } catch (ClassNotFoundException e) {
//                 Timber.e(e);
//             }
//         }
//         replaceFragment(SessionDetailFragmentCreator.newBuilder(sessionId).build(), R.id.content_view);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         switch (item.getItemId()) {
//             case android.R.id.home:
//                 upToParentActivity();
//                 return true;
//         }
//         return super.onOptionsItemSelected(item);
//     }
// 
//     private void upToParentActivity() {
//         Intent upIntent = new Intent(getApplicationContext(), parentClass);
//         upIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
//         startActivity(upIntent);
//         finish();
//     }
// 
// }


import android.app.Activity;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.customtabs.CustomTabsIntent;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.webkit.URLUtil;
import javax.inject.Inject;
import io.github.droidkaigi.confsched2017.R;
import io.github.droidkaigi.confsched2017.di.scope.ActivityScope;
import io.github.droidkaigi.confsched2017.model.Session;
import io.github.droidkaigi.confsched2017.view.activity.ContributorsActivity;
import io.github.droidkaigi.confsched2017.view.activity.LicensesActivity;
import io.github.droidkaigi.confsched2017.view.activity.SessionDetailActivity;
import io.github.droidkaigi.confsched2017.view.activity.SessionFeedbackActivity;
import io.github.droidkaigi.confsched2017.view.activity.SponsorsActivity;
package io.github.droidkaigi.confsched2017.view.helper;




/**
 * Created by shihochan on 2017/02/15.
 */

@ActivityScope
public class Navigator {

    private final Activity activity;

    @Inject
    public Navigator(AppCompatActivity activity) {
        this.activity = activity;
    }

    public void navigateToSessionDetail(@NonNull Session session, @Nullable Class<? extends Activity> parentClass) {
// Path: app/src/main/java/io/github/droidkaigi/confsched2017/view/activity/ContributorsActivity.java
// public class ContributorsActivity extends BaseActivity {
// 
//     private ActivityContributorsBinding binding;
// 
//     @Inject
//     ToolbarViewModel viewModel;
// 
//     public static Intent createIntent(Context context) {
//         return new Intent(context, ContributorsActivity.class);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         getComponent().inject(this);
// 
//         binding = DataBindingUtil.setContentView(this, R.layout.activity_contributors);
//         binding.setViewModel(viewModel);
// 
//         initBackToolbar(binding.toolbar);
//         viewModel.setToolbarTitle(getString(R.string.contributors));
//         replaceFragment(ContributorsFragment.newInstance(), R.id.content_view);
//     }
// }
// 
// Path: app/src/main/java/io/github/droidkaigi/confsched2017/view/activity/SessionDetailActivity.java
// public class SessionDetailActivity extends BaseActivity {
// 
//     private static final String EXTRA_SESSION_ID = "session_id";
//     private static final String EXTRA_PARENT = "parent";
// 
//     private Class parentClass;
// 
//     public static Intent createIntent(@NonNull Context context, int sessionId, @Nullable Class<? extends Activity> parentClass) {
//         Intent intent = new Intent(context, SessionDetailActivity.class);
//         intent.putExtra(EXTRA_SESSION_ID, sessionId);
//         if (parentClass != null) {
//             intent.putExtra(EXTRA_PARENT, parentClass.getName());
//         }
//         return intent;
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         DataBindingUtil.setContentView(this, R.layout.activity_session_detail);
//         getComponent().inject(this);
// 
//         final int sessionId = getIntent().getIntExtra(EXTRA_SESSION_ID, 0);
//         String parentClassName = getIntent().getStringExtra(EXTRA_PARENT);
//         if (TextUtils.isEmpty(parentClassName)) {
//             parentClass = MainActivity.class;
//         } else {
//             try {
//                 parentClass = Class.forName(parentClassName);
//             } catch (ClassNotFoundException e) {
//                 Timber.e(e);
//             }
//         }
//         replaceFragment(SessionDetailFragmentCreator.newBuilder(sessionId).build(), R.id.content_view);
//     }
// 
//     @Override
//     public boolean onOptionsItemSelected(MenuItem item) {
//         switch (item.getItemId()) {
//             case android.R.id.home:
//                 upToParentActivity();
//                 return true;
//         }
//         return super.onOptionsItemSelected(item);
//     }
// 
//     private void upToParentActivity() {
//         Intent upIntent = new Intent(getApplicationContext(), parentClass);
//         upIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
//         startActivity(upIntent);
//         finish();
//     }
// 
// }


// Path: app/src/main/java/io/github/droidkaigi/confsched2017/view/helper/Navigator.java
import android.app.Activity;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.customtabs.CustomTabsIntent;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.webkit.URLUtil;
import javax.inject.Inject;
import io.github.droidkaigi.confsched2017.R;
import io.github.droidkaigi.confsched2017.di.scope.ActivityScope;
import io.github.droidkaigi.confsched2017.model.Session;
import io.github.droidkaigi.confsched2017.view.activity.ContributorsActivity;
import io.github.droidkaigi.confsched2017.view.activity.LicensesActivity;
import io.github.droidkaigi.confsched2017.view.activity.SessionDetailActivity;
import io.github.droidkaigi.confsched2017.view.activity.SessionFeedbackActivity;
import io.github.droidkaigi.confsched2017.view.activity.SponsorsActivity;

package io.github.droidkaigi.confsched2017.view.helper;




/**
 * Created by shihochan on 2017/02/15.
 */

@ActivityScope
public class Navigator {

    private final Activity activity;

    @Inject
    public Navigator(AppCompatActivity activity) {
        this.activity = activity;
    }

    public void navigateToSessionDetail(@NonNull Session session, @Nullable Class<? extends Activity> parentClass) {
        activity.startActivity(SessionDetailActivity.createIntent(activity, session.id, parentClass));