Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 425916e4 authored by Oscar Rydhé's avatar Oscar Rydhé Committed by Johan Redestig
Browse files

Fix NullpointerException in MediaMetadataRetriever

According to the API documentation and the ICS implementation
the setDataSource(String) method throws an
IllegalArgumentException if path is null. In JB a
NullpointerException is thrown instead. This fix restores
the earlier behaviour.

Change-Id: Ic47baadf91076acc227d92d84f6b8d1d6ecd0c03
parent d547bcec
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@ public class MediaMetadataRetriever
     * @throws IllegalArgumentException If the path is invalid.
     */
    public void setDataSource(String path) throws IllegalArgumentException {
        if (path == null) {
            throw new IllegalArgumentException();
        }

        FileInputStream is = null;
        try {
            is = new FileInputStream(path);