Prevented IllegalArgumentException if service was not registered
This commit is contained in:
parent
fd6f93abc1
commit
4a22f1be42
|
@ -44,7 +44,11 @@ public class PlayerWidgetService extends Service {
|
|||
super.onDestroy();
|
||||
if (AppConfig.DEBUG)
|
||||
Log.d(TAG, "Service is about to be destroyed");
|
||||
unbindService(mConnection);
|
||||
try {
|
||||
unbindService(mConnection);
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.w(TAG, "IllegalArgumentException when trying to unbind service");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue