File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
mediacontroller/src/main/java/com/example/android/mediacontroller Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -697,6 +697,11 @@ public void onMetadataChanged(MediaMetadataCompat metadata) {
697697 onUpdate ();
698698 }
699699
700+ @ Override
701+ public void onSessionDestroyed () {
702+ showToastAndFinish ("MediaSession has been released" );
703+ }
704+
700705 private void onUpdate () {
701706 String mediaInfoStr = fetchMediaInfo ();
702707 if (mediaInfoStr != null ) {
@@ -911,7 +916,8 @@ public int getNewListSize() {
911916
912917 @ Override
913918 public boolean areItemsTheSame (int oldItemPosition , int newItemPosition ) {
914- return actions .get (oldItemPosition ).getAction ()
919+ return actions .size () == mActions .size () &&
920+ actions .get (oldItemPosition ).getAction ()
915921 .equals (mActions .get (newItemPosition ).getAction ());
916922 }
917923
You can’t perform that action at this time.
0 commit comments