Modified last of reflection calls to use ReflectHelper class
Also modified ReflectHelper class to consolidate the API and
modified browser code to reflect the API changes.
Change-Id: I708f43cf3c1432adc7cd78c25264330a673ffeb5
diff --git a/src/com/android/browser/DownloadHandler.java b/src/com/android/browser/DownloadHandler.java
index 1de6ac6..1e969c5 100644
--- a/src/com/android/browser/DownloadHandler.java
+++ b/src/com/android/browser/DownloadHandler.java
@@ -117,7 +117,7 @@
private static boolean isAudioFileType(int fileType){
Object[] params = {Integer.valueOf(fileType)};
Class[] type = new Class[] {int.class};
- Boolean result = (Boolean) ReflectHelper.invokeStaticMethod("android.media.MediaFile",
+ Boolean result = (Boolean) ReflectHelper.invokeMethod("android.media.MediaFile",
"isAudioFileType", type, params);
return result;
}
@@ -125,7 +125,7 @@
private static boolean isVideoFileType(int fileType){
Object[] params = {Integer.valueOf(fileType)};
Class[] type = new Class[] {int.class};
- Boolean result = (Boolean) ReflectHelper.invokeStaticMethod("android.media.MediaFile",
+ Boolean result = (Boolean) ReflectHelper.invokeMethod("android.media.MediaFile",
"isVideoFileType", type, params);
return result;
}
@@ -160,7 +160,7 @@
// For those file types other than audio or video, download it immediately.
Object[] params = {mimetype};
Class[] type = new Class[] {String.class};
- Integer result = (Integer) ReflectHelper.invokeStaticMethod("android.media.MediaFile",
+ Integer result = (Integer) ReflectHelper.invokeMethod("android.media.MediaFile",
"getFileTypeForMimeType", type, params);
int fileType = result.intValue();
if ("http".equalsIgnoreCase(scheme) &&