Make double tap song selector dismissal activate for any action

This commit is contained in:
Christopher Eby committed 2010-04-02 11:16:01 -05:00
1 parent ededdcf716
commit 81fa1dd75f
1 file changed
+3 -4
+3 -4
View File
@@ -59,7 +59,7 @@ public class SongSelector extends Dialog implements AdapterView.OnItemClickListe
private int mDefaultAction;
private boolean mDefaultIsLastAction;
private long mLastPlayedId;
private long mLastActedId;
private ListView getList(int tab)
{
@@ -157,8 +157,7 @@ public class SongSelector extends Dialog implements AdapterView.OnItemClickListe
getContext().startService(intent);
if (action == PlaybackService.ACTION_PLAY)
mLastPlayedId = intent.getIntExtra("id", -1);
mLastActedId = intent.getIntExtra("id", -1);
}
private void expand(MediaAdapter.MediaView view)
@@ -183,7 +182,7 @@ public class SongSelector extends Dialog implements AdapterView.OnItemClickListe
MediaAdapter.MediaView mediaView = (MediaAdapter.MediaView)view;
if (mediaView.isExpanderPressed())
expand(mediaView);
else if (mDefaultAction == PlaybackService.ACTION_PLAY && id == mLastPlayedId)
else if (id == mLastActedId)
dismiss();
else
sendSongIntent(((MediaAdapter)list.getAdapter()).buildSongIntent(mDefaultAction, pos));