summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2010-10-05 16:59:05 -0700
committerShimeng (Simon) Wang <swang@google.com>2010-10-15 14:18:01 -0700
commitbf9cf4d80dd45ac0938c3ba698dc348fbc4290d7 (patch)
treea79f72df33fe486c8cec693546403c973fb3088c /core/java
parent31e4d66ada01ea0714304309967a38d07bfce6c6 (diff)
downloadframeworks_base-bf9cf4d80dd45ac0938c3ba698dc348fbc4290d7.zip
frameworks_base-bf9cf4d80dd45ac0938c3ba698dc348fbc4290d7.tar.gz
frameworks_base-bf9cf4d80dd45ac0938c3ba698dc348fbc4290d7.tar.bz2
DO NOT MERGE
Add wrapper method for native JNI call. This is to check whether a given mimeType is supported in Android media framework. issue: 3101402 Change-Id: Ic8b412c045c36113c830296dacb42ed5f7371c9d
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/webkit/WebViewCore.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index bf4d95b..f54b207 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -28,6 +28,7 @@ import android.graphics.Picture;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Region;
+import android.media.MediaFile;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
@@ -255,6 +256,13 @@ final class WebViewCore {
return mSettings;
}
+ /*
+ * Given mimeType, check whether it's supported in Android media framework.
+ * mimeType could be such as "audio/ogg" and "video/mp4".
+ */
+ /* package */ static boolean supportsMimeType(String mimeType) {
+ return MediaFile.getFileTypeForMimeType(mimeType) > 0;
+ }
/**
* Add an error message to the client's console.
* @param message The message to add