Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Block wink feature (EYE_GESTURE) when running app.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Apr 26, 2014
1 parent 7eb89aa commit a3df447
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
</intent-filter>
<meta-data android:name="com.google.android.glass.VoiceTrigger" android:resource="@xml/start_movies" />
</activity>

<receiver android:name="com.stefansundin.glass.IntentBlocker">
<intent-filter android:priority="1000">
<action android:name="com.google.glass.action.EYE_GESTURE"/>
</intent-filter>
</receiver>

</application>

</manifest>
15 changes: 15 additions & 0 deletions src/com/stefansundin/glass/IntentBlocker.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.stefansundin.glass;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class IntentBlocker extends BroadcastReceiver {

public void onReceive(Context context, Intent intent) {
abortBroadcast();
Log.d("stefan", "Blocking intent.");
}

}
1 change: 1 addition & 0 deletions src/com/stefansundin/glass/movies/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ protected void onCreate(Bundle savedInstanceState) {
for (String filename : filenames) {
movieList.add(filename);
}
listView.setSelection(0);

mSpeech = new TextToSpeech(this, this);

Expand Down

0 comments on commit a3df447

Please sign in to comment.