Skip to content

Commit

Permalink
[android] Add command line parameters to Cobalt.apk
Browse files Browse the repository at this point in the history
  • Loading branch information
borongc committed Oct 29, 2024
1 parent e16ed1e commit c572ed5
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;
import org.chromium.base.CommandLine;
import org.chromium.content_shell_apk.ContentShellActivity;
import org.chromium.content_shell_apk.ContentShellApplication;
// import dev.cobalt.media.AudioOutputManager;

/** Native activity that has the required JNI methods called by the Starboard implementation. */
Expand Down Expand Up @@ -100,6 +102,17 @@ protected void onCreate(Bundle savedInstanceState) {
}

super.setStartupUrl("https://www.youtube.com/tv");
if (!CommandLine.isInitialized()) {
((ContentShellApplication) getApplication()).initCommandLine();
String[] commandLineParams = new String[]{"",
"--disable-fre", "--no-first-run",
"--single-process", "--kiosk",
"--force-video-overlays",
// remove below if Cobalt rebase to m120+
"--user-level-memory-pressure-signal-params",
""};
CommandLine.getInstance().appendSwitchesAndArguments(commandLineParams);
}
super.onCreate(savedInstanceState);

videoSurfaceView = new VideoSurfaceView(this);
Expand Down

0 comments on commit c572ed5

Please sign in to comment.