Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: mojo/shell/android/shell_apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java

Issue 38993002: Build mojo_shell on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Darin's comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/shell/android/shell_apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java
diff --git a/mojo/shell/android/shell_apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java b/mojo/shell/android/shell_apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..966ea278942b82cc3d48b8adab5bb9bb519ddf3d
--- /dev/null
+++ b/mojo/shell/android/shell_apk/src/org/chromium/mojo_shell_apk/MojoShellActivity.java
@@ -0,0 +1,36 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.mojo_shell_apk;
+
+import java.lang.UnsatisfiedLinkError;
bulach 2013/10/24 12:58:04 nit: no need, afaict java.lang is implicit.
abarth-chromium 2013/10/24 13:43:05 Oh, that's nice. I'm a Java noob.
+
+import android.os.Bundle;
+import android.app.Activity;
+import android.util.Log;
+
+import org.chromium.mojo_shell_apk.LibraryLoader;
+
+/**
+ * Activity for managing the Mojo Shell.
+ */
+public class MojoShellActivity extends Activity {
+ private static final String TAG = "MojoShellActivity";
+
+ @Override
+ protected void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.mojo_shell_activity);
+
+ try {
+ LibraryLoader.ensureInitialized();
bulach 2013/10/24 12:58:04 yeah, not saying to do now, but just highlighting
abarth-chromium 2013/10/24 13:43:05 I'm sorry, but I didn't understand this comment.
bulach 2013/10/24 16:27:57 ops, sorry I wasn't clear.. :) it's perfectly fine
+ } catch (UnsatisfiedLinkError e) {
+ Log.e(TAG, "libmojo_shell initialization failed.", e);
+ finish();
+ return;
+ }
+ Log.i(TAG, "libmojo_shell initialization success.");
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698