Skip to content

Commit

Permalink
[android] Fix CommandLine initialization
Browse files Browse the repository at this point in the history
Removed initializing CommandLine from the file `content-shell-command-line`, as Cobalt doesn't need it.

b/387917915
  • Loading branch information
borongc committed Jan 6, 2025
1 parent 173ecc3 commit ce418d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion cobalt/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ content_shell_apk_tmpl("cobalt_apk") {
":cobalt_apk_java",
]
shared_libraries = [ ":libcobalt_content_shell_content_view" ]
command_line_flags_file = "content-shell-command-line"
include_size_info = is_official_build
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import android.widget.LinearLayout;
import android.widget.Toast;
import androidx.annotation.Nullable;
import dev.cobalt.app.CobaltApplication;
import dev.cobalt.coat.javabridge.CobaltJavaScriptAndroidObject;
import dev.cobalt.coat.javabridge.CobaltJavaScriptInterface;
import dev.cobalt.coat.javabridge.H5vccPlatformService;
Expand Down Expand Up @@ -102,7 +101,7 @@ public abstract class CobaltActivity extends Activity {
protected void createContent(final Bundle savedInstanceState) {
// Initializing the command line must occur before loading the library.
if (!CommandLine.isInitialized()) {
((CobaltApplication) getApplication()).initCommandLine();
CommandLine.init(null);

String[] cobaltCommandLineParams =
new String[] {
Expand Down Expand Up @@ -476,7 +475,9 @@ protected void onStop() {
super.onStop();

WebContents webContents = getActiveWebContents();
if (webContents != null) webContents.onHide();
if (webContents != null) {
webContents.onHide();
}

if (VideoSurfaceView.getCurrentSurface() != null) {
forceCreateNewVideoSurfaceView = true;
Expand Down

0 comments on commit ce418d7

Please sign in to comment.