aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-04-11 16:15:07 -0700
committerScott Jackson <daneren2005@gmail.com>2015-04-11 16:15:07 -0700
commitff868797b593af560ed54b404b83a424ebe4227c (patch)
tree5dc0669d0530670ef98a0d9f820d33de328426bf /src/github/daneren2005
parentba43a5ea2da9752e7bf0deb231c9132e00106c3c (diff)
downloaddsub-ff868797b593af560ed54b404b83a424ebe4227c.tar.gz
dsub-ff868797b593af560ed54b404b83a424ebe4227c.tar.bz2
dsub-ff868797b593af560ed54b404b83a424ebe4227c.zip
Fixed #420: Add GSM voice search (search for x on DSub)
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/activity/VoiceQueryReceiverActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/activity/VoiceQueryReceiverActivity.java b/src/github/daneren2005/dsub/activity/VoiceQueryReceiverActivity.java
index f3a56920..7ae0ba77 100644
--- a/src/github/daneren2005/dsub/activity/VoiceQueryReceiverActivity.java
+++ b/src/github/daneren2005/dsub/activity/VoiceQueryReceiverActivity.java
@@ -38,6 +38,7 @@ import github.daneren2005.dsub.provider.DSubSearchProvider;
* @author Sindre Mehus
*/
public class VoiceQueryReceiverActivity extends Activity {
+ private static String GMS_SEARCH_ACTION = "com.google.android.gms.actions.SEARCH_ACTION";
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -48,7 +49,9 @@ public class VoiceQueryReceiverActivity extends Activity {
if (query != null) {
Intent intent = new Intent(VoiceQueryReceiverActivity.this, SubsonicFragmentActivity.class);
intent.putExtra(Constants.INTENT_EXTRA_NAME_QUERY, query);
- intent.putExtra(Constants.INTENT_EXTRA_NAME_AUTOPLAY, true);
+ if(!GMS_SEARCH_ACTION.equals(getIntent().getAction())) {
+ intent.putExtra(Constants.INTENT_EXTRA_NAME_AUTOPLAY, true);
+ }
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
Util.startActivityWithoutTransition(VoiceQueryReceiverActivity.this, intent);
}