diff options
Diffstat (limited to 'src/net/hoopajoo/android/SoftKeys/SendInput.java')
-rw-r--r-- | src/net/hoopajoo/android/SoftKeys/SendInput.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/SendInput.java b/src/net/hoopajoo/android/SoftKeys/SendInput.java index 7e56521..e54d0e8 100644 --- a/src/net/hoopajoo/android/SoftKeys/SendInput.java +++ b/src/net/hoopajoo/android/SoftKeys/SendInput.java @@ -86,7 +86,7 @@ public class SendInput extends Activity { String key = e.getString( "keyname" ); //Log.d( "SoftKeys.SendInput", "resolving: " + key ); if( key.equals( "home" ) ) { - ((Globals)getApplication()).doHomeAction( longClick ); + app.doHomeAction( longClick ); this.finish(); return; }else{ @@ -99,7 +99,7 @@ public class SendInput extends Activity { } if( action.equals( ACTION_HOME ) ) { - ((Globals)getApplication()).doHomeAction( false ); + app.doHomeAction( false ); this.finish(); return; } @@ -118,12 +118,9 @@ public class SendInput extends Activity { if( keyid != 0 ) { //Log.d( "SoftKeys.SendInput", "resolved key: " + keyid ); - ((Globals)getApplication()).sendKeys( new int[] { keyid } ); + app.sendKeys( new int[] { keyid } ); } - // todo: make me a broadcast receiver.. or maybe this should be removed all together? - // any good reasons to allow other apps to call hw keys? - this.finish(); - + this.finish(); } } |