[Media ML] Sync with original implementation
Originally, a volume key long press listener would have been called for the first ACTION_DOWN KeyEvent with repeat count equal to 0, but the new implementation does not call it. This CL fixes the current implementation to match the original implementation. Bug: 157988289 Test: manually Change-Id: I563215fc522e952412ebbae1ddaa1a6b1b646c53
This commit is contained in:
@@ -2572,6 +2572,9 @@ public class MediaSessionService extends SystemService implements Monitor {
|
||||
}
|
||||
} else {
|
||||
if (mKeyType == KEY_TYPE_VOLUME) {
|
||||
if (isFirstLongPressKeyEvent(keyEvent)) {
|
||||
dispatchVolumeKeyLongPressLocked(mTrackingFirstDownKeyEvent);
|
||||
}
|
||||
dispatchVolumeKeyLongPressLocked(keyEvent);
|
||||
} else if (isFirstLongPressKeyEvent(keyEvent)
|
||||
&& isVoiceKey(keyEvent.getKeyCode())) {
|
||||
|
||||
Reference in New Issue
Block a user