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

Unified Diff: remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java

Issue 2228783002: [Remoting Android] Fix component build runtime error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
index 27c734cd873c10508b9e1d8645cb86b222b2dd58..565e70cc9de05b70b661eb337949753b885a7f76 100644
--- a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
+++ b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
@@ -23,6 +23,8 @@ public class JniInterface {
private static final String TOKEN_SCOPE = "oauth2:https://www.googleapis.com/auth/chromoting";
+ private static final String LIBRARY_NAME = "remoting_client_jni";
+
// Used to fetch auth token for native client.
private static OAuthTokenConsumer sLoggerTokenConsumer;
@@ -36,7 +38,12 @@ public class JniInterface {
public static void loadLibrary(Context context) {
ContextUtils.initApplicationContext(context.getApplicationContext());
sLoggerTokenConsumer = new OAuthTokenConsumer(context.getApplicationContext(), TOKEN_SCOPE);
- System.loadLibrary("remoting_client_jni");
+ try {
+ System.loadLibrary(LIBRARY_NAME);
+ } catch (UnsatisfiedLinkError e) {
+ Log.w(TAG, "Couldn't load " + LIBRARY_NAME + ", trying " + LIBRARY_NAME + ".cr");
+ System.loadLibrary(LIBRARY_NAME + ".cr");
+ }
ContextUtils.initApplicationContextForNative();
nativeLoadNative();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698