Commit 9b5d1091 authored by Jeffrey Cohen's avatar Jeffrey Cohen Committed by Chromium LUCI CQ

[Screenshot] only preload DFM if isolated splits is enabled

Bug: 1164076
Change-Id: I95c40a60e3d68958c5f3d0d7002534dafc332b3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616865
Commit-Queue: Jeffrey Cohen <jeffreycohen@chromium.org>
Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Auto-Submit: Jeffrey Cohen <jeffreycohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842643}
parent bbbddb5c
......@@ -37,6 +37,7 @@ import androidx.annotation.VisibleForTesting;
import org.chromium.base.ActivityState;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.BundleUtils;
import org.chromium.base.Callback;
import org.chromium.base.CommandLine;
import org.chromium.base.ContextUtils;
......@@ -1398,7 +1399,12 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
VrModuleProvider.getDelegate().onNewIntentWithNative(this, getIntent());
}
// The first launch of the screenshot feature benefits from this DFM being installed
// proactively. However without the isolated split feature there are performance regressions
// as a result of adding this extra code.
if (ChromeFeatureList.isEnabled(ChromeFeatureList.CHROME_SHARE_SCREENSHOT)
&& BundleUtils.isolatedSplitsEnabled()
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
&& AppHooks.get().getImageEditorModuleProvider() != null) {
AppHooks.get().getImageEditorModuleProvider().maybeInstallModuleDeferred();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment