| Index: chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastApplication.java
|
| diff --git a/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastApplication.java b/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastApplication.java
|
| index 65ad319c7ca7e40f7964f96955602df46dfa2a08..2fb50a3201ec61cbec4188406df1388406d95437 100644
|
| --- a/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastApplication.java
|
| +++ b/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastApplication.java
|
| @@ -4,6 +4,10 @@
|
|
|
| package org.chromium.chromecast.shell;
|
|
|
| +import android.os.Build;
|
| +import android.util.Log;
|
| +
|
| +import org.chromium.base.CommandLine;
|
| import org.chromium.base.PathUtils;
|
| import org.chromium.base.ResourceExtractor;
|
| import org.chromium.content.app.ContentApplication;
|
| @@ -17,9 +21,11 @@ import org.chromium.content.app.ContentApplication;
|
| * require a few basic pieces (found here).
|
| */
|
| public class CastApplication extends ContentApplication {
|
| + private static final String TAG = "CastApplication";
|
|
|
| private static final String[] MANDATORY_PAK_FILES = new String[] {"cast_shell.pak"};
|
| private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "cast_shell";
|
| + private static final String COMMAND_LINE_FILE = "/data/local/tmp/castshell-command-line";
|
|
|
| @Override
|
| public void onCreate() {
|
| @@ -32,4 +38,17 @@ public class CastApplication extends ContentApplication {
|
| PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX);
|
| }
|
|
|
| + @Override
|
| + public void initCommandLine() {
|
| + if (allowCommandLineImport()) {
|
| + Log.d(TAG, "Initializing command line from " + COMMAND_LINE_FILE);
|
| + CommandLine.initFromFile(COMMAND_LINE_FILE);
|
| + } else {
|
| + CommandLine.init(null);
|
| + }
|
| + }
|
| +
|
| + private static boolean allowCommandLineImport() {
|
| + return !Build.TYPE.equals("user");
|
| + }
|
| }
|
|
|