summaryrefslogtreecommitdiffstats
path: root/src/net/hoopajoo/android/SoftKeys/Keys.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/hoopajoo/android/SoftKeys/Keys.java')
-rw-r--r--src/net/hoopajoo/android/SoftKeys/Keys.java52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/Keys.java b/src/net/hoopajoo/android/SoftKeys/Keys.java
index b16c741..9a28721 100644
--- a/src/net/hoopajoo/android/SoftKeys/Keys.java
+++ b/src/net/hoopajoo/android/SoftKeys/Keys.java
@@ -435,32 +435,34 @@ public class Keys extends Activity implements OnClickListener, OnLongClickListen
}
// check for key actions from notifications
- if( true ) {
+ if( i != null ) {
String action = i.getAction();
- int keyid = 0;
- if( action.equals( ACTION_HOME ) ) {
- app.doHomeAction( false );
- this.finish();
- return;
- }
-
- if( action.equals( ACTION_BACK ) ) {
- keyid = K.KEYID_BACK;
- }
-
- if( action.equals( ACTION_MENU ) ) {
- keyid = K.KEYID_MENU;
- }
-
- if( action.equals( ACTION_SEARCH ) ) {
- keyid = K.KEYID_SEARCH;
- }
-
- if( keyid != 0 ) {
- //Log.d( "SoftKeys.SendInput", "resolved key: " + keyid );
- app.sendKeys( new int[] { keyid } );
- this.finish();
- return;
+ if( action != null ) {
+ int keyid = 0;
+ if( action.equals( ACTION_HOME ) ) {
+ app.doHomeAction( false );
+ this.finish();
+ return;
+ }
+
+ if( action.equals( ACTION_BACK ) ) {
+ keyid = K.KEYID_BACK;
+ }
+
+ if( action.equals( ACTION_MENU ) ) {
+ keyid = K.KEYID_MENU;
+ }
+
+ if( action.equals( ACTION_SEARCH ) ) {
+ keyid = K.KEYID_SEARCH;
+ }
+
+ if( keyid != 0 ) {
+ //Log.d( "SoftKeys.SendInput", "resolved key: " + keyid );
+ app.sendKeys( new int[] { keyid } );
+ this.finish();
+ return;
+ }
}
}