Merge pull request #78 from lishoujun/develop
add null check to playerNotificationManager and player on Destroy
This commit is contained in:
commit
44034a8a41
@ -118,11 +118,13 @@ public class VideoPlayerService extends Service {
|
|||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
|
|
||||||
Log.v(TAG, "onDestroy...");
|
Log.v(TAG, "onDestroy...");
|
||||||
|
if (playerNotificationManager != null) {
|
||||||
playerNotificationManager.setPlayer(null);
|
playerNotificationManager.setPlayer(null);
|
||||||
|
}
|
||||||
|
if (player != null) {
|
||||||
player.release();
|
player.release();
|
||||||
player = null;
|
player = null;
|
||||||
|
}
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user