mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-19 13:00:12 -07:00
Proper volume key interception
This commit is contained in:
parent
3706d1c932
commit
b3135aa735
1 changed files with 2 additions and 1 deletions
|
|
@ -635,7 +635,8 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
*/
|
||||
|
||||
//Filtering useless events
|
||||
if(event.getFlags() == KeyEvent.FLAG_FROM_SYSTEM) return false; //Volume keys and stuff
|
||||
if(event.getAction() == KeyEvent.KEYCODE_VOLUME_UP
|
||||
|| event.getAction() == KeyEvent.KEYCODE_VOLUME_DOWN) return false;
|
||||
if(event.getRepeatCount() != 0
|
||||
|| event.getAction() == KeyEvent.ACTION_MULTIPLE
|
||||
|| event.getKeyCode() == KeyEvent.KEYCODE_UNKNOWN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue