Fixed possible crash if activity wasn't connected to the service
This commit is contained in:
parent
238f415315
commit
0c02286f83
|
@ -547,7 +547,11 @@ public class MediaplayerActivity extends SherlockFragmentActivity implements
|
|||
}
|
||||
break;
|
||||
case PlaybackService.NOTIFICATION_TYPE_RELOAD:
|
||||
unbindService(mConnection);
|
||||
try {
|
||||
unbindService(mConnection);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (positionObserver != null) {
|
||||
positionObserver.cancel(true);
|
||||
positionObserver = null;
|
||||
|
|
Loading…
Reference in New Issue