This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block long press to avoid accidentally launching Google Search.
- Loading branch information
Stefan Sundin
committed
Nov 7, 2013
1 parent
5379654
commit 4325f05
Showing
3 changed files
with
45 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.stefansundin.glass.movies" | ||
android:versionCode="1" | ||
android:versionName="1.0" > | ||
package="com.stefansundin.glass.movies" | ||
android:versionCode="1" | ||
android:versionName="1.0"> | ||
|
||
<uses-sdk | ||
android:minSdkVersion="15" | ||
android:targetSdkVersion="15" /> | ||
<uses-sdk | ||
android:minSdkVersion="15" | ||
android:targetSdkVersion="15"/> | ||
|
||
<uses-permission android:name="android.permission.RECORD_AUDIO"/> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO"/> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
<application | ||
android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
|
||
<receiver android:name="com.stefansundin.glass.BlockLongTapReceiver"> | ||
<intent-filter android:priority="1000"> | ||
<action android:name="com.google.glass.action.LONG_PRESS"/> | ||
</intent-filter> | ||
</receiver> | ||
</application> | ||
|
||
</manifest> |
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,17 @@ | ||
package com.stefansundin.glass; | ||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.util.Log; | ||
|
||
public class BlockLongTapReceiver extends BroadcastReceiver { | ||
|
||
public void onReceive(Context context, Intent intent) { | ||
if (intent.getAction().equals("com.google.glass.action.LONG_PRESS")) { | ||
abortBroadcast(); | ||
Log.d("stefan", "Blocking long press."); | ||
} | ||
} | ||
|
||
} |
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