| Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
| index ca9f1157491aa02d1e15a203accb9992a2c63559..abb449c381f0d6bfe2d12600e353d1d8cdfbb8e8 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
| @@ -100,7 +100,6 @@ import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza
|
| import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
|
| import org.chromium.chrome.browser.preferences.PrefServiceBridge;
|
| import org.chromium.chrome.browser.preferences.PreferencesLauncher;
|
| -import org.chromium.chrome.browser.printing.PrintShareActivity;
|
| import org.chromium.chrome.browser.printing.TabPrinter;
|
| import org.chromium.chrome.browser.share.ShareHelper;
|
| import org.chromium.chrome.browser.snackbar.BottomContainer;
|
| @@ -1130,7 +1129,8 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
|
|
|
| /**
|
| * Triggered when the share menu item is selected.
|
| - * This creates and shows a share intent picker dialog or starts a share intent directly.
|
| + * This enables shareActivities, creates and shows a share intent picker dialog or starts
|
| + * a share intent directly.
|
| * @param shareDirectly Whether it should share directly with the activity that was most
|
| * recently used to share.
|
| * @param isIncognito Whether currentTab is incognito.
|
| @@ -1140,19 +1140,12 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
|
| final Tab currentTab = getActivityTab();
|
| if (currentTab == null) return;
|
|
|
| - PrintingController printingController = PrintingControllerImpl.getInstance();
|
| - if (printingController != null && !currentTab.isNativePage() && !printingController.isBusy()
|
| - && PrefServiceBridge.getInstance().isPrintingEnabled()) {
|
| - PrintShareActivity.enablePrintShareOption(this, new Runnable() {
|
| - @Override
|
| - public void run() {
|
| - triggerShare(currentTab, shareDirectly, isIncognito);
|
| - }
|
| - });
|
| - return;
|
| - }
|
| -
|
| - triggerShare(currentTab, shareDirectly, isIncognito);
|
| + ShareHelper.enableShareActivitiesAndStartShareIntent(this, currentTab, new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + triggerShare(currentTab, shareDirectly, isIncognito);
|
| + }
|
| + });
|
| }
|
|
|
| private void triggerShare(
|
|
|