I want to override the volume keys so that instead of controlling the ringer volume or media volume depending on the fact if there is sound playing at the moment or not, to control an internal application volume, regardgless of system volume.
This is what I'm doing:
public boolean onKeyUp(int keyCode, KeyEvent msg) {
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP){
adjustVolume(+1);
return true;
}
}
It is my understanding that if I do return true, the event should be killed thus preventing further propagation to the system default behavior. But this is not the case for some reason.
Is my logic flawed or ?


