Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Casanowow Life for love
VLC-Android
Commits
1d821e22
Commit
1d821e22
authored
Jun 21, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code for apiSdk
parent
eb550bf6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
45 deletions
+0
-45
vlc-android/jni/libvlcjni.c
vlc-android/jni/libvlcjni.c
+0
-20
vlc-android/src/org/videolan/vlc/Util.java
vlc-android/src/org/videolan/vlc/Util.java
+0
-25
No files found.
vlc-android/jni/libvlcjni.c
View file @
1d821e22
...
...
@@ -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
)
{
...
...
vlc-android/src/org/videolan/vlc/Util.java
View file @
1d821e22
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment