Index: chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java |
diff --git a/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java b/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java |
index d3ea8eaebfa07d2f38d749b24b5a6dd7a14aec74..f9e593291a0d7f0bf2de26fed0695e68b6cc1aea 100644 |
--- a/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java |
+++ b/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java |
@@ -7,7 +7,6 @@ package org.chromium.chromecast.shell; |
import android.app.Activity; |
import android.content.Context; |
import android.content.Intent; |
-import android.os.Build; |
import android.os.Debug; |
import android.util.Log; |
@@ -15,6 +14,7 @@ import org.chromium.base.BaseSwitches; |
import org.chromium.base.CommandLine; |
import org.chromium.base.library_loader.LibraryLoader; |
import org.chromium.base.library_loader.ProcessInitException; |
+import org.chromium.content.app.ContentApplication; |
import org.chromium.content.browser.BrowserStartupController; |
import org.chromium.content.browser.DeviceUtils; |
import org.chromium.content.common.ContentSwitches; |
@@ -25,7 +25,6 @@ import org.chromium.content.common.ContentSwitches; |
public class CastBrowserHelper { |
private static final String TAG = "CastBrowserHelper"; |
- public static final String COMMAND_LINE_FILE = "/data/local/tmp/castshell-command-line"; |
public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs"; |
private static boolean sIsBrowserInitialized = false; |
@@ -44,12 +43,7 @@ public class CastBrowserHelper { |
// Initializing the command line must occur before loading the library. |
if (!CommandLine.isInitialized()) { |
- if (allowCommandLineImport()) { |
- Log.d(TAG, "Initializing command line from " + COMMAND_LINE_FILE); |
- CommandLine.initFromFile(COMMAND_LINE_FILE); |
- } else { |
- CommandLine.init(null); |
- } |
+ ContentApplication.initCommandLine(context); |
if (context instanceof Activity) { |
Intent launchingIntent = ((Activity) context).getIntent(); |
@@ -81,10 +75,6 @@ public class CastBrowserHelper { |
} |
} |
- private static boolean allowCommandLineImport() { |
- return !Build.TYPE.equals("user"); |
- } |
- |
private static String[] getCommandLineParamsFromIntent(Intent intent) { |
return intent != null ? intent.getStringArrayExtra(COMMAND_LINE_ARGS_KEY) : null; |
} |