每当用户尝试使用我的媒体播放器播放某些曲目时,我都会在某些设备上收到此错误。
Fatal Exception: java.lang.IllegalStateException: onLoadChildren sent null list for id root
at android.service.media.MediaBrowserService$3.onResultSent(MediaBrowserService.java:473)
at android.service.media.MediaBrowserService$3.onResultSent(MediaBrowserService.java:469)
at android.service.media.MediaBrowserService$Result.sendResult(MediaBrowserService.java:131)
at android.support.v4.media.MediaBrowserServiceCompatApi21$ResultWrapper.sendResult(MediaBrowserServiceCompatApi21.java:77)
at android.support.v4.media.MediaBrowserServiceCompat$MediaBrowserServiceImplApi21$3.onResultSent(MediaBrowserServiceCompat.java:366)
at android.support.v4.media.MediaBrowserServiceCompat$MediaBrowserServiceImplApi21$3.onResultSent(MediaBrowserServiceCompat.java:354)
at android.support.v4.media.MediaBrowserServiceCompat$Result.sendResult(MediaBrowserServiceCompat.java:606)
at com.radioafrica.music.playback.MusicPlaybackService.onLoadChildren(MusicPlaybackService.java:102)
at android.support.v4.media.MediaBrowserServiceCompat$MediaBrowserServiceImplApi21.onLoadChildren(MediaBrowserServiceCompat.java:374)
at android.support.v4.media.MediaBrowserServiceCompatApi21$MediaBrowserServiceAdaptor.onLoadChildren(MediaBrowserServiceCompatApi21.java:128)
at android.service.media.MediaBrowserService.performLoadChildren(MediaBrowserService.java:495)
at android.service.media.MediaBrowserService.addSubscription(MediaBrowserService.java:459)
at android.service.media.MediaBrowserService.access$400(MediaBrowserService.java:68)
at android.service.media.MediaBrowserService$ServiceBinder$3.run(MediaBrowserService.java:247)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7325)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
我的onLoadChildren
方法代码是:
@Override
public void onLoadChildren(@NonNull String s, @NonNull Result<List<MediaBrowserCompat.MediaItem>> result) {
result.sendResult(null);
}
是什么导致这对某些用户失败并为其他用户工作?