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

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

Issue 38993002: Build mojo_shell on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix desktop build 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/LibraryLoader.java
diff --git a/mojo/shell/android/shell_apk/src/org/chromium/mojo_shell_apk/LibraryLoader.java b/mojo/shell/android/shell_apk/src/org/chromium/mojo_shell_apk/LibraryLoader.java
new file mode 100644
index 0000000000000000000000000000000000000000..479d7b1326f97872758b374f5889a95328a1effd
--- /dev/null
+++ b/mojo/shell/android/shell_apk/src/org/chromium/mojo_shell_apk/LibraryLoader.java
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 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;
+import org.chromium.base.JNINamespace;
+
+@JNINamespace("mojo")
+public class LibraryLoader {
+ private static Boolean sInitialized = false;
+
+ public static void ensureInitialized() throws UnsatisfiedLinkError {
+ if (!sInitialized)
+ return;
darin (slow to review) 2013/10/24 03:52:47 nit: indentation
+ sInitialized = true;
+ System.loadLibrary("mojo_shell");
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698