-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added word substitution settings for voice control.
- Loading branch information
1 parent
4a2c575
commit 56bcbd4
Showing
13 changed files
with
214 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
fermata/src/main/java/me/aap/fermata/ui/activity/VoiceCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package me.aap.fermata.ui.activity; | ||
|
||
/** | ||
* @author Andrey Pavlenko | ||
*/ | ||
public class VoiceCommand { | ||
public static final int ACTION_PLAY = 1; | ||
public static final int ACTION_FIND = 2; | ||
public static final int ACTION_OPEN = 4; | ||
|
||
private final String query; | ||
private final int action; | ||
|
||
public VoiceCommand(String query, int action) { | ||
this.query = query; | ||
this.action = action; | ||
} | ||
|
||
public String getQuery() { | ||
return query; | ||
} | ||
|
||
public int getAction() { | ||
return action; | ||
} | ||
|
||
public boolean isPlay() { | ||
return (getAction() & ACTION_PLAY) != 0; | ||
} | ||
|
||
public boolean isFind() { | ||
return (getAction() & ACTION_FIND) != 0; | ||
} | ||
|
||
public boolean isOpen() { | ||
return (getAction() & ACTION_OPEN) != 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.