Do not wake from stylus buttons when disabled

Bug: 279032702
Test: manual
Change-Id: Ifaa2dcbd98711a16a796f997fda9c67d16093619
This commit is contained in:
Prabir Pradhan
2023-04-20 16:25:28 +00:00
parent f08a702087
commit 5a64ec093c

View File

@@ -4576,6 +4576,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case KeyEvent.KEYCODE_BACK:
return mWakeOnBackKeyPress;
case KeyEvent.KEYCODE_STYLUS_BUTTON_PRIMARY:
case KeyEvent.KEYCODE_STYLUS_BUTTON_SECONDARY:
case KeyEvent.KEYCODE_STYLUS_BUTTON_TERTIARY:
case KeyEvent.KEYCODE_STYLUS_BUTTON_TAIL:
return mStylusButtonsEnabled;
}
return true;