Commit 1d821e22 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Remove unused code for apiSdk

parent eb550bf6
......@@ -327,26 +327,6 @@ void Java_org_videolan_vlc_LibVLC_nativeDestroy(JNIEnv *env, jobject thiz)
(*env)->SetIntField(env, thiz, field, 0);
}
int currentSdk( JNIEnv *p_env, jobject thiz )
{
jclass cls = (*p_env)->FindClass( p_env, "org/videolan/vlc/Util" );
if ( !cls )
{
LOGE("Failed to load util class (org/videolan/vlc/Util)" );
return 0;
}
jmethodID methodSdkVersion = (*p_env)->GetStaticMethodID( p_env, cls,
"getApiLevel", "()I" );
if ( !methodSdkVersion )
{
LOGE("Failed to load method getApiLevel()" );
return 0;
}
int version = (*p_env)->CallStaticIntMethod( p_env, cls, methodSdkVersion );
LOGI("Phone running on API level %d\n", version );
return version;
}
void Java_org_videolan_vlc_LibVLC_detachEventManager(JNIEnv *env, jobject thiz)
{
if (eventManagerInstance != NULL) {
......
......@@ -21,7 +21,6 @@
package org.videolan.vlc;
import java.io.File;
import java.lang.reflect.Field;
import java.text.DecimalFormat;
import android.content.Context;
......@@ -88,30 +87,6 @@ public class Util {
return time;
}
private static int apiLevel = 0;
/**
* Returns the current Android SDK version
* This function is called by the native code.
* This is used to know if we should use the native audio output,
* or the amem as a fallback.
*/
public static int getApiLevel() {
if (apiLevel > 0)
return apiLevel;
if (android.os.Build.VERSION.SDK.equalsIgnoreCase("3")) {
apiLevel = 3;
} else {
try {
final Field f = android.os.Build.VERSION.class.getDeclaredField("SDK_INT");
apiLevel = (Integer) f.get(null);
} catch (final Exception e) {
return 0;
}
}
return apiLevel;
}
public static Bitmap scaleDownBitmap(Context context, Bitmap bitmap, int width) {
if (bitmap != null) {
final float densityMultiplier = context.getResources().getDisplayMetrics().density;
......
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