Possible fix for null context on resume #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Happened on several occasions with current master code but cannot be reliably reproduced. The stack trace always looks exactly the same:
USER_COMMENT=null
ANDROID_VERSION=4.1.2
APP_VERSION_NAME=0.9.0
BRAND=Google
PHONE_MODEL=Nexus S
CUSTOM_DATA=
STACK_TRACE=java.lang.RuntimeException: Unable to resume activity
{org.xbmc.android.remote/org.xbmc.android.remote.presentation.activity.NowPlayingActivity}:
java.lang.NullPointerException
android.app.ActivityThread.performResumeActivity(ActivityThread.java:2701)
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2729)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2215)
Caused by: java.lang.NullPointerException
at android.content.ComponentName.(ComponentName.java:75)
at android.content.Intent.(Intent.java:3324)
org.xbmc.android.jsonrpc.io.ConnectionManager.bindService(ConnectionManager.java:221)
org.xbmc.android.jsonrpc.io.ConnectionManager.call(ConnectionManager.java:161)
org.xbmc.android.remote.business.cm.AbstractManager.callRaw(AbstractManager.java:112)
org.xbmc.android.remote.business.cm.ControlManager.getCurrentlyPlaying(ControlManager.java:154)
org.xbmc.android.remote.business.NowPlayingPollerThread.subscribe(NowPlayingPollerThread.java:121)
org.xbmc.android.remote.presentation.controller.NowPlayingController.onActivityResume(NowPlayingController.java:218)
org.xbmc.android.remote.presentation.activity.NowPlayingActivity.onResume(NowPlayingActivity.java:260)
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1184)