Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Android MediaProvider

MediaProvider: Avoid null pointer exceptions inside getCompressedAlbu…

…mArt

Check if path is not null to avoid a java.lang.NullPointerException.
If path is null, the following exception stack trace will be thrown:

java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
    at java.io.File.fixSlashes(File.java:185)
    at java.io.File.<init>(File.java:134)
    at com.android.providers.media.MediaProvider.getCompressedAlbumArt(MediaProvider.java:4846)
    at com.android.providers.media.MediaProvider.makeThumbInternal(MediaProvider.java:5015)
    at com.android.providers.media.MediaProvider.getThumb(MediaProvider.java:5011)
    at com.android.providers.media.MediaProvider.openFile(MediaProvider.java:4601)
    at android.content.ContentProvider.openAssetFile(ContentProvider.java:1334)
    at android.content.ContentProvider.openTypedAssetFile(ContentProvider.java:1514)
    at android.content.ContentProvider.openTypedAssetFile(ContentProvider.java:1580)
    at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:391)
    at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:312)
    at android.os.Binder.execTransact(Binder.java:446)

Change-Id: Ie27605590db20e0e4e12095d32864a246cc25573
latest commit a1b71b05da
Cristoforo Cataldo Christopher83 authored Decad3nce committed
Something went wrong with that request. Please try again.