Commit d5b5b733 authored by Clark DuVall's avatar Clark DuVall Committed by Chromium LUCI CQ

Revert "Remove custom library resolver for feed libraries"

This reverts commit c2bd53d8.

Reason for revert: This seems to have caused the crash in crbug.com/1143321 to happen again.

Original change's description:
> Remove custom library resolver for feed libraries
>
> This was needed because the libraries were in the feed module, but have
> now been moved to the base module. This will hopefully fix a crash
> loading the libs on some devices.
>
> Bug: 1160654
> Change-Id: Ie33114d6f5963325c096dea9f60e029d7d40e19e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606187
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Commit-Queue: Clark DuVall <cduvall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#839654}

TBR=agrieve@chromium.org,cduvall@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I2f8353a58a6200c9a8ee5475c3b1798c5b4e0f22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1160654
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2607672Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839807}
parent 5980e6f1
......@@ -8,6 +8,7 @@ import android.content.Context;
import androidx.annotation.VisibleForTesting;
import org.chromium.base.BundleUtils;
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
......@@ -33,6 +34,7 @@ public class FeedProcessScopeDependencyProvider implements ProcessScopeDependenc
private Context mContext;
private ImageFetchClient mImageFetchClient;
private LibraryResolver mLibraryResolver;
@VisibleForTesting
static PrivacyPreferencesManager sPrivacyPreferencesManagerForTest;
......@@ -40,6 +42,11 @@ public class FeedProcessScopeDependencyProvider implements ProcessScopeDependenc
FeedProcessScopeDependencyProvider() {
mContext = createFeedContext(ContextUtils.getApplicationContext());
mImageFetchClient = new FeedImageFetchClient();
if (BundleUtils.isIsolatedSplitInstalled(mContext, FEED_SPLIT_NAME)) {
mLibraryResolver = (libName) -> {
return BundleUtils.getNativeLibraryPath(libName, FEED_SPLIT_NAME);
};
}
}
@Override
......@@ -104,6 +111,11 @@ public class FeedProcessScopeDependencyProvider implements ProcessScopeDependenc
PostTask.postDelayedTask(traits, task, delayMs);
}
@Override
public LibraryResolver getLibraryResolver() {
return mLibraryResolver;
}
@Override
public boolean isXsurfaceUsageAndCrashReportingEnabled() {
PrivacyPreferencesManager manager = sPrivacyPreferencesManagerForTest;
......
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