/soc/2012/michael/android: 115cd5c45064: Fixed host build librar...
Michael Zangl
michael at soc.pidgin.im
Wed Jul 18 06:29:28 EDT 2012
Changeset: 115cd5c45064676f20bc9ca3d69a34704989866c
Author: Michael Zangl <michael at soc.pidgin.im>
Date: 2012-07-17 22:09 +0200
Branch: soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/115cd5c45064
Description:
Fixed host build library problems. Added the ability to disable android library loading.
diffstat:
android/workspace/im.pidgin.libpurple/.cproject | 1 +
android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleLibraryLoader.java | 19 +++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diffs (68 lines):
diff --git a/android/workspace/im.pidgin.libpurple/.cproject b/android/workspace/im.pidgin.libpurple/.cproject
--- a/android/workspace/im.pidgin.libpurple/.cproject
+++ b/android/workspace/im.pidgin.libpurple/.cproject
@@ -195,6 +195,7 @@
<option defaultValue="true" id="gnu.c.link.so.debug.option.shared.405347103" name="Shared (-shared)" superClass="gnu.c.link.so.debug.option.shared" valueType="boolean"/>
<option id="gnu.c.link.option.libs.164998706" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
<listOptionValue builtIn="false" value="gobject-2.0"/>
+ <listOptionValue builtIn="false" value="purple"/>
<listOptionValue builtIn="false" value="gmodule-2.0"/>
<listOptionValue builtIn="false" value="gthread-2.0"/>
<listOptionValue builtIn="false" value="glib-2.0"/>
diff --git a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleLibraryLoader.java b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleLibraryLoader.java
--- a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleLibraryLoader.java
+++ b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleLibraryLoader.java
@@ -1,7 +1,5 @@
package im.pidgin.libpurple.core;
-
-
/**
* Loads the libraries needed to do any native operation.
* <p>
@@ -13,10 +11,13 @@
public class PurpleLibraryLoader {
private static boolean loaded = false;
private static Object mutex = new Object();
-
+
private PurpleLibraryLoader() {
}
+ /**
+ * Loads the libraries needed for Android.
+ */
public static void load() {
synchronized (mutex) {
if (!loaded) {
@@ -28,7 +29,7 @@
purpleLibraryLoader.loadLibrary("intl", "8");
purpleLibraryLoader.loadLibrary("gettextlib-0.18.1", null);
purpleLibraryLoader.loadLibrary("gettextsrc-0.18.1", null);
- //purpleLibraryLoader.loadLibrary("gettextpo", "0");
+ // purpleLibraryLoader.loadLibrary("gettextpo", "0");
purpleLibraryLoader.loadLibrary("xml2", "2");
purpleLibraryLoader.loadLibrary("dbus-1", "3");
purpleLibraryLoader.loadLibrary("glib-2.0", "0");
@@ -42,6 +43,7 @@
}
}
}
+
private void loadLibrary(String name, String major) {
String realname = name;
if (major != null) {
@@ -49,4 +51,13 @@
}
System.loadLibrary(realname);
}
+
+ /**
+ * Fakes a loud of all libraries.
+ */
+ public static void fakeLoad() {
+ synchronized (mutex) {
+ loaded = true;
+ }
+ }
}
More information about the Commits
mailing list