Add wrapper method for native JNI call.
This is to check whether a given mimeType is supported in Android media framework. issue: 2816278 Change-Id: I66d379d039c4e1f4a8528654ece006335fd4463f
This commit is contained in:
@@ -22,6 +22,7 @@ import android.database.Cursor;
|
||||
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;
|
||||
@@ -252,6 +253,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
|
||||
|
||||
Reference in New Issue
Block a user