Commit 9e4b4571 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Fix crash when trying to select a photo from an <input>

Bug: 831953
Change-Id: I9e3c697d25a0754fad18a45f7a0a19c721e54e9c
Reviewed-on: https://chromium-review.googlesource.com/1011667
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551640}
parent f9331623
...@@ -13,6 +13,7 @@ import android.os.ParcelFileDescriptor; ...@@ -13,6 +13,7 @@ import android.os.ParcelFileDescriptor;
import android.os.RemoteException; import android.os.RemoteException;
import android.os.SystemClock; import android.os.SystemClock;
import org.chromium.base.CommandLine;
import org.chromium.base.Log; import org.chromium.base.Log;
import org.chromium.base.PathUtils; import org.chromium.base.PathUtils;
import org.chromium.base.ThreadUtils; import org.chromium.base.ThreadUtils;
...@@ -46,6 +47,12 @@ public class DecoderService extends Service { ...@@ -46,6 +47,12 @@ public class DecoderService extends Service {
@Override @Override
public void onCreate() { public void onCreate() {
// DecoderService does not require flags, but LibraryLoader.ensureInitialized() checks for
// --enable-low-end-device-mode. Rather than forwarding the flags from the browser process,
// just assume no flags.
if (!CommandLine.isInitialized()) {
CommandLine.init(null);
}
try { try {
// The decoder service relies on PathUtils. // The decoder service relies on PathUtils.
ThreadUtils.runOnUiThreadBlocking(() -> { ThreadUtils.runOnUiThreadBlocking(() -> {
......
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