Disable key repeats when the screen is off.
This prevents an endless stream of key repeats spamming the keyguard if a volume key is pressed at the same time you turn off the screen with the power button. This is part of a fix for bug b/2198537 Change-Id: I0d7e335fee79cbebba96b2cd908458c3c94c839e Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
@@ -2218,5 +2218,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
mPowerManager.userActivity(curTime, false, LocalPowerManager.OTHER_EVENT);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean allowKeyRepeat() {
|
||||
// disable key repeat when screen is off
|
||||
return mScreenOn;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user