mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 15:48:26 -04:00
Proper volume key interception
This commit is contained in:
parent
3706d1c932
commit
b3135aa735
@ -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…
x
Reference in New Issue
Block a user