// Path: src/com/dexode/util/log/Logger.java
// public class Logger {
// 
// 	/**
// 	 * This method should be removed in release code by proguard
// 	 */
// 	public static void d(final String text, Object... args) {
// 		if (_log != null) {
// 			_log.d(text, args);
// 		}
// 	}
// 
// 	/**
// 	 * This method should be removed in release code by proguard
// 	 */
// 	public static void i(final String text, Object... args) {
// 		if (_log != null) {
// 			_log.i(text, args);
// 		}
// 	}
// 
// 	/**
// 	 * This method should be removed in release code by proguard
// 	 */
// 	public static void w(final String text, Object... args) {
// 		if (_log != null) {
// 			_log.w(text, args);
// 		}
// 	}
// 
// 	public static void e(final String text, Object... args) {
// 		if (_log != null) {
// 			_log.e(text, args);
// 		}
// 	}
// 
// 	public static void e(final Exception exception, @Nullable final String text) {
// 		if (_log != null) {
// 			_log.e(exception, text);
// 		}
// 	}
// 
// 	public static void e(final Exception exception) {
// 		if (_log != null) {
// 			_log.e(exception, null);
// 		}
// 	}
// 
// 
// 	public static void setLog(Log log) {
// 		_log = log;
// 	}
// 
// 	@Nullable
// 	private static Log _log;
// 
// 	public interface Log {
// 		/**
// 		 * This method should be removed in release code by proguard
// 		 */
// 		public void d(final String text, Object... args);
// 
// 		/**
// 		 * This method should be removed in release code by proguard
// 		 */
// 		public void i(final String text, Object... args);
// 
// 		/**
// 		 * This method should be removed in release code by proguard
// 		 */
// 		public void w(final String text, Object... args);
// 
// 		public void e(final String text, Object... args);
// 
// 		public void e(final Exception exception, @Nullable final String text);
// 	}
// }


import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.LabeledIntent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.annotation.Nullable;
import com.dexode.util.log.Logger;
import com.google.android.gms.plus.PlusShare;
import java.util.ArrayList;
import java.util.List;

		final PackageManager packageManager = context.getPackageManager();

		ArrayList<LabeledIntent> extraIntents = new ArrayList<>(_intents.size() * 2);
		Intent mainIntent = null;

		for (int i = 0; i < _intents.size(); ++i) {
			Intent intent = _intents.get(i);

			List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0);
			if (resolveInfoList == null) {//Some devices return null...
				continue;
			}
			if (mainIntent == null && resolveInfoList.isEmpty() == false) {
				mainIntent = intent;
				//This will be main chooser so we don't want duplicates
				continue;
			}
			for (ResolveInfo info : resolveInfoList) {
				// Extract the label, append it, and repackage it in a LabeledIntent
				String packageName = info.activityInfo.packageName;

				intent.setComponent(new ComponentName(packageName, info.activityInfo.name));
				final LabeledIntent labeledIntent =
						new LabeledIntent(intent, packageName, info.loadLabel(packageManager), info.icon);
				extraIntents.add(labeledIntent);
			}
		}

		if (mainIntent == null) {
// Path: src/com/dexode/util/log/Logger.java
// public class Logger {
// 
// 	/**
// 	 * This method should be removed in release code by proguard
// 	 */
// 	public static void d(final String text, Object... args) {
// 		if (_log != null) {
// 			_log.d(text, args);
// 		}
// 	}
// 
// 	/**
// 	 * This method should be removed in release code by proguard
// 	 */
// 	public static void i(final String text, Object... args) {
// 		if (_log != null) {
// 			_log.i(text, args);
// 		}
// 	}
// 
// 	/**
// 	 * This method should be removed in release code by proguard
// 	 */
// 	public static void w(final String text, Object... args) {
// 		if (_log != null) {
// 			_log.w(text, args);
// 		}
// 	}
// 
// 	public static void e(final String text, Object... args) {
// 		if (_log != null) {
// 			_log.e(text, args);
// 		}
// 	}
// 
// 	public static void e(final Exception exception, @Nullable final String text) {
// 		if (_log != null) {
// 			_log.e(exception, text);
// 		}
// 	}
// 
// 	public static void e(final Exception exception) {
// 		if (_log != null) {
// 			_log.e(exception, null);
// 		}
// 	}
// 
// 
// 	public static void setLog(Log log) {
// 		_log = log;
// 	}
// 
// 	@Nullable
// 	private static Log _log;
// 
// 	public interface Log {
// 		/**
// 		 * This method should be removed in release code by proguard
// 		 */
// 		public void d(final String text, Object... args);
// 
// 		/**
// 		 * This method should be removed in release code by proguard
// 		 */
// 		public void i(final String text, Object... args);
// 
// 		/**
// 		 * This method should be removed in release code by proguard
// 		 */
// 		public void w(final String text, Object... args);
// 
// 		public void e(final String text, Object... args);
// 
// 		public void e(final Exception exception, @Nullable final String text);
// 	}
// }


// Path: src/com/dexode/util/ShareIntentBuilder.java
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.LabeledIntent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.annotation.Nullable;
import com.dexode.util.log.Logger;
import com.google.android.gms.plus.PlusShare;
import java.util.ArrayList;
import java.util.List;


		final PackageManager packageManager = context.getPackageManager();

		ArrayList<LabeledIntent> extraIntents = new ArrayList<>(_intents.size() * 2);
		Intent mainIntent = null;

		for (int i = 0; i < _intents.size(); ++i) {
			Intent intent = _intents.get(i);

			List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0);
			if (resolveInfoList == null) {//Some devices return null...
				continue;
			}
			if (mainIntent == null && resolveInfoList.isEmpty() == false) {
				mainIntent = intent;
				//This will be main chooser so we don't want duplicates
				continue;
			}
			for (ResolveInfo info : resolveInfoList) {
				// Extract the label, append it, and repackage it in a LabeledIntent
				String packageName = info.activityInfo.packageName;

				intent.setComponent(new ComponentName(packageName, info.activityInfo.name));
				final LabeledIntent labeledIntent =
						new LabeledIntent(intent, packageName, info.loadLabel(packageManager), info.icon);
				extraIntents.add(labeledIntent);
			}
		}

		if (mainIntent == null) {
			Logger.e("No app can't handle such share request");