| Index: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
|
| index 426c1b5808e65162a4d13d741c9292a12cf4f5c6..84dd7e6dbc512a9618a494c0863cf90455d29352 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
|
| @@ -60,7 +60,6 @@ import org.chromium.chrome.browser.notifications.NotificationPlatformBridge;
|
| import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
|
| import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations;
|
| import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
|
| -import org.chromium.chrome.browser.preferences.DocumentModeManager;
|
| import org.chromium.chrome.browser.tab.Tab;
|
| import org.chromium.chrome.browser.tab.TabIdManager;
|
| import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager;
|
| @@ -80,7 +79,6 @@ import org.chromium.ui.base.PageTransition;
|
|
|
| import java.lang.ref.WeakReference;
|
| import java.net.URI;
|
| -import java.util.List;
|
| import java.util.UUID;
|
|
|
| /**
|
| @@ -171,7 +169,6 @@ public class ChromeLauncherActivity extends Activity
|
| // show homepage, which might require reading PartnerBrowserCustomizations provider.
|
| PartnerBrowserCustomizations.initializeAsync(getApplicationContext(),
|
| PARTNER_BROWSER_CUSTOMIZATIONS_TIMEOUT_MS);
|
| - maybePerformMigrationTasks();
|
| recordIntentMetrics();
|
|
|
| mIsInLegacyMultiInstanceMode =
|
| @@ -279,18 +276,6 @@ public class ChromeLauncherActivity extends Activity
|
| }
|
| }
|
|
|
| - /**
|
| - * If we have just opted in or opted out of document mode, perform pending migration tasks
|
| - * such as cleaning up the recents.
|
| - */
|
| - private void maybePerformMigrationTasks() {
|
| - if (DocumentModeManager.getInstance(this).isOptOutCleanUpPending()) {
|
| - cleanUpChromeRecents(
|
| - DocumentModeManager.getInstance(this).isOptedOutOfDocumentMode());
|
| - DocumentModeManager.getInstance(this).setOptOutCleanUpPending(false);
|
| - }
|
| - }
|
| -
|
| @Override
|
| public void processWebSearchIntent(String query) {
|
| Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);
|
| @@ -890,31 +875,6 @@ public class ChromeLauncherActivity extends Activity
|
| }
|
|
|
| /**
|
| - * On opting out, remove all the old tasks from the recents.
|
| - * @param fromDocument Whether any possible migration was from document mode to classic.
|
| - */
|
| - @TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
| - private void cleanUpChromeRecents(boolean fromDocument) {
|
| - ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
|
| - List<ActivityManager.AppTask> taskList = am.getAppTasks();
|
| - PackageManager pm = getPackageManager();
|
| - for (int i = 0; i < taskList.size(); i++) {
|
| - AppTask task = taskList.get(i);
|
| - String className = DocumentUtils.getTaskClassName(task, pm);
|
| - if (className == null) continue;
|
| -
|
| - RecentTaskInfo taskInfo = DocumentUtils.getTaskInfoFromTask(task);
|
| - if (taskInfo == null) continue;
|
| -
|
| - // Skip the document activities if we are migrating from classic to document.
|
| - boolean skip = !fromDocument && DocumentActivity.isDocumentActivity(className);
|
| - if (!skip && (taskInfo.id != getTaskId())) {
|
| - taskList.get(i).finishAndRemoveTask();
|
| - }
|
| - }
|
| - }
|
| -
|
| - /**
|
| * Set flags that ensure that we control when our Activities disappear from Recents.
|
| * @param intent Intent to set the flags on.
|
| * @param extraFlags Other flags to add to the Intent, 0 if there's nothing to add.
|
|
|