Back to project page HeadphoneController.
The source code is released under:
GNU General Public License
If you think the Android project HeadphoneController listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ca.mbabic.headphonecontroller.statemachine; //from ww w.j a va 2s.co m import android.util.Log; import ca.mbabic.headphonecontroller.commands.CommandExecutor; import ca.mbabic.headphonecontroller.commands.HCCommandContext; import ca.mbabic.headphonecontroller.commands.SkipCommand; /** * State representing the media button having been clicked exactly once since * the last command execution/interval expiration. * @author Marko Babic * */ public class TwoPressState extends HCState { private static final String TAG = ".statemachine.TwoPressState"; public TwoPressState() { isTerminal = false; nextState = new ThreePressState(); executor = CommandExecutor.getInstance(); } @Override public void executeCommand() { Log.i(TAG, "Executing TwoPressState command."); executor.executeCommandForState(TwoPressState.class);; } @Override public HCState getNextState() { return nextState; } }