Commit 17a7e1eb authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Fix dark mode in feed v2 with isolated splits enabled

There were two definitions of createFeedContext(), and one did not have
the original dark mode fix. See bug for more details.

Bug: 1147705
Change-Id: Id930163d69cedbe07dcd272cf88246b5bb7da3ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2552642
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Reviewed-by: default avatarDan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829833}
parent 18d63d42
......@@ -12,6 +12,7 @@ import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskTraits;
import org.chromium.chrome.browser.base.SplitCompatUtils;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.signin.IdentityServicesProvider;
import org.chromium.chrome.browser.xsurface.ImageFetchClient;
......@@ -108,9 +109,6 @@ public class FeedProcessScopeDependencyProvider implements ProcessScopeDependenc
}
public static Context createFeedContext(Context context) {
if (!BundleUtils.isIsolatedSplitInstalled(context, FEED_SPLIT_NAME)) {
return context;
}
return BundleUtils.createIsolatedSplitContext(context, FEED_SPLIT_NAME);
return SplitCompatUtils.createContextForInflation(context, FEED_SPLIT_NAME);
}
}
......@@ -30,7 +30,6 @@ import org.chromium.base.supplier.Supplier;
import org.chromium.base.task.PostTask;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.AppHooks;
import org.chromium.chrome.browser.base.SplitCompatUtils;
import org.chromium.chrome.browser.feed.shared.ScrollTracker;
import org.chromium.chrome.browser.feed.shared.stream.Stream.ContentChangedListener;
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncher;
......@@ -87,8 +86,6 @@ import java.util.Map;
public class FeedStreamSurface implements SurfaceActionsHandler, FeedActionsHandler {
private static final String TAG = "FeedStreamSurface";
private static final String FEED_SPLIT_NAME = "feedv2";
private static final int SNACKBAR_DURATION_MS_SHORT = 4000;
private static final int SNACKBAR_DURATION_MS_LONG = 10000;
......@@ -1019,10 +1016,6 @@ public class FeedStreamSurface implements SurfaceActionsHandler, FeedActionsHand
mIsPlaceholderShown = false;
}
private static Context createFeedContext(Context context) {
return SplitCompatUtils.createContextForInflation(context, FEED_SPLIT_NAME);
}
// Detects animation finishes in RecyclerView.
// https://stackoverflow.com/questions/33710605/detect-animation-finish-in-androids-recyclerview
private class RecyclerViewAnimationFinishDetector implements ItemAnimatorFinishedListener {
......
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