Skip to content
Snippets Groups Projects
Commit 6fd9a0d4 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

LibVLC: AWindow: declare native methods in the subclass

Otherwise, old Android versions fail to register them.
parent 30c43c1a
No related branches found
No related tags found
No related merge requests found
......@@ -437,7 +437,14 @@ public class AWindow implements IVLCVout {
return mAWindowNativeHandler;
}
@SuppressWarnings("unused, JniMissingFunction")
private final AWindowNativeHandler mAWindowNativeHandler = new AWindowNativeHandler() {
@Override
protected native void nativeOnMouseEvent(long nativeHandle, int action, int button, int x, int y);
@Override
protected native void nativeOnWindowSize(long nativeHandle, int width, int height);
@Override
public Surface getVideoSurface() {
return getNativeSurface(ID_VIDEO);
......
......@@ -22,7 +22,6 @@ package org.videolan.libvlc;
import android.view.Surface;
@SuppressWarnings("unused, JniMissingFunction")
public abstract class AWindowNativeHandler {
/**
* Callback called from {@link IVLCVout#sendMouseEvent}.
......@@ -33,7 +32,7 @@ public abstract class AWindowNativeHandler {
* @param x x coordinate.
* @param y y coordinate.
*/
protected native void nativeOnMouseEvent(long nativeHandle, int action, int button, int x, int y);
protected abstract void nativeOnMouseEvent(long nativeHandle, int action, int button, int x, int y);
/**
* Callback called from {@link IVLCVout#setWindowSize}.
......@@ -42,7 +41,7 @@ public abstract class AWindowNativeHandler {
* @param width width of the window.
* @param height height of the window.
*/
protected native void nativeOnWindowSize(long nativeHandle, int width, int height);
protected abstract void nativeOnWindowSize(long nativeHandle, int width, int height);
/**
* Get the valid Video surface.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment