Commit 7504675f authored by Geoffrey Métais's avatar Geoffrey Métais

Fix crash on startup when abi mismatch

parent 47f59fba
......@@ -119,6 +119,8 @@ public class VLCApplication extends Application {
sTV = AndroidDevices.isAndroidTv() || !AndroidDevices.hasTsp();
if (!VLCInstance.testCompatibleCPU(this))
return;
Dialog.setCallbacks(VLCInstance.get(), mDialogCallbacks);
// Disable remote control receiver on Fire TV.
......
......@@ -20,6 +20,7 @@
package org.videolan.vlc.util;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.AssetManager;
......@@ -136,8 +137,10 @@ public class VLCInstance {
public static synchronized boolean testCompatibleCPU(Context context) {
if (sLibVLC == null && !VLCUtil.hasCompatibleCPU(context)) {
final Intent i = new Intent(context, CompatErrorActivity.class);
context.startActivity(i);
if (context instanceof Activity) {
final Intent i = new Intent(context, CompatErrorActivity.class);
context.startActivity(i);
}
return false;
} else
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment