aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2013-12-01 11:24:27 +0100
committerChris "Koying" Browet <cbro@semperpax.com>2013-12-01 11:36:28 +0100
commit48298e1e93b2965097dbd0fcded1656595dd490c (patch)
tree99818f8cb60d776ecf8b8b312f92392e688bf36c /tools
parent8c3a58d4625dfcc4f2b1aae53b831c10ea21d483 (diff)
FIX: [droid] catch UnsatisfiedLinkErrors when invoking native
Diffstat (limited to 'tools')
-rw-r--r--tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java8
-rw-r--r--tools/android/packaging/xbmc/src/org/xbmc/xbmc/XBMCBroadcastReceiver.java6
2 files changed, 12 insertions, 2 deletions
diff --git a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java
index a94f9254ad..35ad6084ed 100644
--- a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java
+++ b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/Main.java
@@ -3,10 +3,12 @@ package org.xbmc.xbmc;
import android.app.NativeActivity;
import android.content.Intent;
import android.os.Bundle;
+import android.util.Log;
public class Main extends NativeActivity
{
native void _onNewIntent(Intent intent);
+
public Main()
{
super();
@@ -22,7 +24,11 @@ public class Main extends NativeActivity
protected void onNewIntent(Intent intent)
{
super.onNewIntent(intent);
- _onNewIntent(intent);
+ try {
+ _onNewIntent(intent);
+ } catch (UnsatisfiedLinkError e) {
+ Log.e("Main", "Native not registered");
+ }
}
}
diff --git a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/XBMCBroadcastReceiver.java b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/XBMCBroadcastReceiver.java
index a3c7886de4..93e37a43de 100644
--- a/tools/android/packaging/xbmc/src/org/xbmc/xbmc/XBMCBroadcastReceiver.java
+++ b/tools/android/packaging/xbmc/src/org/xbmc/xbmc/XBMCBroadcastReceiver.java
@@ -13,6 +13,10 @@ public class XBMCBroadcastReceiver extends BroadcastReceiver
public void onReceive(Context context, Intent intent)
{
Log.d("XBMCBroadcastReceiver", "Received Intent");
- _onReceive(intent);
+ try {
+ _onReceive(intent);
+ } catch (UnsatisfiedLinkError e) {
+ Log.e("XBMCBroadcastReceiver", "Native not registered");
+ }
}
}