Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcedf0cc authored by AlexandrKozlovskiy's avatar AlexandrKozlovskiy Committed by Nolen Johnson
Browse files

FMRadio: Fix press and hold media rewind keys

* In this case it will constantly move to
  previous/next station, when we have not
  pressed the media keys.

Change-Id: If6b82c2ad2c04a9cbba2bcae50eda736d42b2323
parent 6f90646a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -178,10 +178,11 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan
                        result = true;
                        break;
                    }
                    else {
                    else if (repeatCount == 1) {
                        keyCode = keyCode == KeyEvent.KEYCODE_MEDIA_SKIP_BACKWARD
                                || keyCode == KeyEvent.KEYCODE_MEDIA_STEP_BACKWARD ?
                                KeyEvent.KEYCODE_MEDIA_PREVIOUS : KeyEvent.KEYCODE_MEDIA_NEXT;
                        repeatCount = 0;
                        result = true;
                    }
                case KeyEvent.KEYCODE_MEDIA_PREVIOUS: