mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
prevent volumeup/down default behaviour
This commit is contained in:
parent
b323f329cc
commit
8356ac67e8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user