mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-28 22:17:50 +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
|
// If volumedown key
|
||||||
else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
|
else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
|
||||||
this.appView.loadUrl("javascript:cordova.fireDocumentEvent('volumedownbutton');");
|
this.appView.loadUrl("javascript:cordova.fireDocumentEvent('volumedownbutton');");
|
||||||
return super.onKeyUp(keyCode, event);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If volumeup key
|
// If volumeup key
|
||||||
else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
|
else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
|
||||||
this.appView.loadUrl("javascript:cordova.fireDocumentEvent('volumeupbutton');");
|
this.appView.loadUrl("javascript:cordova.fireDocumentEvent('volumeupbutton');");
|
||||||
return super.onKeyUp(keyCode, event);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user