Removed overrides, fixed CB-1620

This commit is contained in:
Joe Bowser 2012-10-12 14:43:46 -07:00
parent 0ffffa9029
commit e562e4e7b9
3 changed files with 21 additions and 2 deletions

View File

@ -156,7 +156,6 @@ public class AccelListener extends CordovaPlugin implements SensorEventListener
// Set a timeout callback on the main thread.
Handler handler = new Handler(Looper.getMainLooper());
handler.postDelayed(new Runnable() {
@Override
public void run() {
AccelListener.this.timeout();
}

View File

@ -112,7 +112,6 @@ public class CompassListener extends CordovaPlugin implements SensorEventListene
// Set a timeout callback on the main thread.
Handler handler = new Handler(Looper.getMainLooper());
handler.postDelayed(new Runnable() {
@Override
public void run() {
CompassListener.this.timeout();
}

View File

@ -1015,6 +1015,27 @@ public class DroidGap extends Activity implements CordovaInterface {
return super.onKeyUp(keyCode, event);
}
/*
* Android 2.x needs to be able to check where the cursor is. Android 4.x does not
*
* (non-Javadoc)
* @see android.app.Activity#onKeyDown(int, android.view.KeyEvent)
*/
@Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
//Determine if the focus is on the current view or not
if (appView.getHitTestResult() != null &&
appView.getHitTestResult().getType() == WebView.HitTestResult.EDIT_TEXT_TYPE &&
keyCode == KeyEvent.KEYCODE_BACK) {
return appView.onKeyDown(keyCode, event);
}
else
return super.onKeyDown(keyCode, event);
}
/**
* Called when a message is sent to plugin.
*