Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Commit

Permalink
Add javadocs to the isStopAction methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jadkik committed Jan 9, 2014
1 parent aa44bf7 commit 61ccb13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/com/adam/aslfms/receiver/BuiltInMusicAppReceiver.java
Expand Up @@ -60,6 +60,14 @@ public BuiltInMusicAppReceiver(String stopAction, String appPackage,
app_name = appName;
}

/**
* Depending on the action received decide whether it should signal a stop or not.
* By default, it compares it to the unique `this.stop_action`, but there might be
* multiple actions that cause a stop signal.
*
* @param action the received action
* @return true when the received action is a stop action, false otherwise
*/
protected boolean isStopAction(String action) {
return action.equals(stop_action);
}
Expand Down
8 changes: 8 additions & 0 deletions src/com/adam/aslfms/receiver/SEMCMusicReceiver.java
Expand Up @@ -18,6 +18,14 @@ public SEMCMusicReceiver() {
}

@Override
/**
* Checks that the action received is either the one used in the
* newer Sony Xperia devices or that of the previous versions
* of the app.
*
* @param action the received action
* @return true when the received action is a stop action, false otherwise
*/
protected boolean isStopAction(String action) {
return action.equals(ACTION_SEMC_STOP) || action.equals(ACTION_SEMC_STOP_LEGACY);
}
Expand Down

0 comments on commit 61ccb13

Please sign in to comment.