prevent volumeup/down default behaviour

This commit is contained in:
Julien Bouquillon 2012-05-22 21:42:46 +02:00
parent b323f329cc
commit 8356ac67e8

View File

@ -1090,13 +1090,13 @@ public class DroidGap extends Activity implements CordovaInterface {
// If volumedown key
else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
this.appView.loadUrl("javascript:cordova.fireDocumentEvent('volumedownbutton');");
return super.onKeyUp(keyCode, event);
return true;
}
// If volumeup key
else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
this.appView.loadUrl("javascript:cordova.fireDocumentEvent('volumeupbutton');");
return super.onKeyUp(keyCode, event);
return true;
}
return false;