Added performAction in PlaybackActivity. Made performAction in FullPlaybackActivity override it.

This fixes the bug #44 where swipe up/down was not toggling controls when that preference was set
This commit is contained in:
Xiao Bao Clark 2015-08-22 10:17:18 +10:00
parent 107cce708a
commit e7075936fd
2 changed files with 10 additions and 4 deletions

View File

@ -710,13 +710,14 @@ public class FullPlaybackActivity extends PlaybackActivity
mSeekBarTracking = false;
}
public void performAction(Action action)
@Override
protected void performAction(Action action)
{
if (action == Action.ToggleControls) {
setControlsVisible(!mControlsVisible);
mHandler.sendEmptyMessage(MSG_SAVE_CONTROLS);
} else {
PlaybackService.get(this).performAction(action, this);
super.performAction(action);
}
}

View File

@ -540,13 +540,18 @@ public abstract class PlaybackActivity extends Activity
@Override
public void upSwipe()
{
PlaybackService.get(this).performAction(mUpAction, this);
performAction(mUpAction);
}
@Override
public void downSwipe()
{
PlaybackService.get(this).performAction(mDownAction, this);
performAction(mDownAction);
}
protected void performAction(Action action)
{
PlaybackService.get(this).performAction(action, this);
}
private static final int GROUP_SHUFFLE = 100;